1## 5.3\. Video Decoding 2 3Handheld device implementations: 4 5* [H-0-1] MUST support decoding of H.264 AVC. 6* [H-0-2] MUST support decoding of H.265 HEVC. 7* [H-0-3] MUST support decoding of MPEG-4 SP. 8* [H-0-4] MUST support decoding of VP8. 9* [H-0-5] MUST support decoding of VP9. 10 11Television device implementations: 12 13* [T-0-1] MUST support decoding of H.264 AVC. 14* [T-0-2] MUST support decoding of H.265 HEVC. 15* [T-0-3] MUST support decoding of MPEG-4 SP. 16* [T-0-4] MUST support decoding of VP8. 17* [T-0-5] MUST support decoding of VP9. 18* [T-SR] Are Strongly Recommended to support MPEG-2 decoding. 19 20 21Automotive device implementations: 22 23* [A-0-1] MUST support decoding of H.264 AVC. 24* [A-0-2] MUST support decoding of MPEG-4 SP. 25* [A-0-3] MUST support decoding of VP8. 26* [A-0-4] MUST support decoding of VP9. 27* [A-SR] Are Strongly Recommended to support H.265 HEVC decoding. 28 29 30If device implementations support VP8, VP9, H.264, or H.265 codecs, they: 31 32* [C-1-1] MUST support dynamic video resolution and frame rate switching 33through the standard Android APIs within the same stream for all VP8, VP9, 34H.264, and H.265 codecs in real time and up to the maximum resolution supported 35by each codec on the device. 36 37If device implementations declare support for the Dolby Vision decoder through 38[`HDR_TYPE_DOLBY_VISION`](https://developer.android.com/reference/android/view/Display.HdrCapabilities.html#HDR_TYPE_DOLBY_VISION) 39, they: 40 41* [C-2-1] MUST provide a Dolby Vision-capable extractor. 42* [C-2-2] MUST properly display Dolby Vision content on the device screen or 43on a standard video output port (e.g., HDMI). 44* [C-2-3] MUST set the track index of backward-compatible base-layer(s) (if 45present) to be the same as the combined Dolby Vision layer's track index. 46 47### 5.3.1\. MPEG-2 48 49If device implementations support MPEG-2 decoders, they: 50 51* [C-1-1] MUST support the Main Profile High Level. 52 53### 5.3.2\. H.263 54 55If device implementations support H.263 decoders, they: 56 57* [C-1-1] MUST support Baseline Profile Level 30 and Level 45. 58 59### 5.3.3\. MPEG-4 60 61If device implementations with MPEG-4 decoders, they: 62 63* [C-1-1] MUST support Simple Profile Level 3. 64 65### 5.3.4\. H.264 66 67If device implementations support H.264 decoders, they: 68 69* [C-1-1] MUST support Main Profile Level 3.1 and Baseline Profile. Support 70for ASO (Arbitrary Slice Ordering), FMO (Flexible Macroblock Ordering) and RS 71(Redundant Slices) is OPTIONAL. 72* [C-1-2] MUST be capable of decoding videos with the SD (Standard Definition) 73 profiles listed in the following table and encoded with the Baseline Profile 74 and Main Profile Level 3.1 (including 720p30). 75* SHOULD be capable of decoding videos with the HD (High Definition) profiles 76 as indicated in the following table. 77 78If the height that is reported by the `Display.getSupportedModes()` method is 79equal or greater than the video resolution, device implementations: 80 81* [C-2-1] MUST support the HD 720p video encoding profiles in the following 82table. 83* [C-2-2] MUST support the HD 1080p video encoding profiles in the following 84table. 85 86If Television device implementations support H.264 decoders, they: 87 88* [T-1-1] MUST support High Profile Level 4.2 and the HD 1080p (at 60 fps) 89decoding profile. 90* [T-1-2] MUST be capable of decoding videos with both HD profiles as 91indicated in the following table and encoded with either the Baseline Profile, 92Main Profile, or the High Profile Level 4.2 93 94<table> 95 <tr> 96 <th></th> 97 <th>SD (Low quality)</th> 98 <th>SD (High quality)</th> 99 <th>HD 720p</th> 100 <th>HD 1080p</th> 101 </tr> 102 <tr> 103 <th>Video resolution</th> 104 <td>320 x 240 px</td> 105 <td>720 x 480 px</td> 106 <td>1280 x 720 px</td> 107 <td>1920 x 1080 px</td> 108 </tr> 109 <tr> 110 <th>Video frame rate</th> 111 <td>30 fps</td> 112 <td>30 fps</td> 113 <td>60 fps</td> 114 <td>30 fps (60 fps<sup>Television</sup>)</td> 115 </tr> 116 <tr> 117 <th>Video bitrate</th> 118 <td>800 Kbps </td> 119 <td>2 Mbps</td> 120 <td>8 Mbps</td> 121 <td>20 Mbps</td> 122 </tr> 123</table> 124 125### 5.3.5\. H.265 (HEVC) 126 127If device implementations support H.265 codec, they: 128 129* [C-1-1] MUST support the Main Profile Level 3 Main tier and the SD video 130decoding profiles as indicated in the following table. 131* SHOULD support the HD decoding profiles as indicated in the following table. 132* [C-1-2] MUST support the HD decoding profiles as indicated in the following 133table if there is a hardware decoder. 134 135If the height that is reported by the `Display.getSupportedModes()` method is 136equal to or greater than the video resolution, then: 137 138* [C-2-1] Device implementations MUST support at least one of H.265 or VP9 139decoding of 720, 1080 and UHD profiles. 140 141If Television device implementations support H.265 codec and the HD 1080p 142decoding profile, they: 143 144* [T-1-1] MUST support the Main Profile Level 4.1 Main tier. 145* [T-SR] STRONGLY RECOMMENDED to support 60 fps video frame rate 146for HD 1080p. 147 148If Television device implementations support H.265 codec and the UHD decoding 149profile, then: 150 151* [T-2-1] The codec MUST support Main10 Level 5 Main Tier profile. 152 153<table> 154 <tr> 155 <th></th> 156 <th>SD (Low quality)</th> 157 <th>SD (High quality)</th> 158 <th>HD 720p</th> 159 <th>HD 1080p</th> 160 <th>UHD</th> 161 </tr> 162 <tr> 163 <th>Video resolution</th> 164 <td>352 x 288 px</td> 165 <td>720 x 480 px</td> 166 <td>1280 x 720 px</td> 167 <td>1920 x 1080 px</td> 168 <td>3840 x 2160 px</td> 169 </tr> 170 <tr> 171 <th>Video frame rate</th> 172 <td>30 fps</td> 173 <td>30 fps</td> 174 <td>30 fps</td> 175 <td>30/60 fps (60 fps<sup>Television with H.265 hardware decoding</sup>)</td> 176 <td>60 fps</td> 177 </tr> 178 <tr> 179 <th>Video bitrate</th> 180 <td>600 Kbps </td> 181 <td>1.6 Mbps</td> 182 <td>4 Mbps</td> 183 <td>5 Mbps</td> 184 <td>20 Mbps</td> 185 </tr> 186</table> 187 188 189### 5.3.6\. VP8 190 191If device implementations support VP8 codec, they: 192 193* [C-1-1] MUST support the SD decoding profiles in the following table. 194* SHOULD use a hardware VP8 codec that meets the 195[requirements]("http://www.webmproject.org/hardware/rtc-coding-requirements/"). 196* SHOULD support the HD decoding profiles in the following table. 197 198 199If the height as reported by the `Display.getSupportedModes()` method is equal 200or greater than the video resolution, then: 201 202* [C-2-1] Device implementations MUST support 720p profiles in the 203following table. 204* [C-2-2] Device implementations MUST support 1080p profiles in the 205following table. 206 207If Television device implementations support VP8 codec, they: 208 209* [T-1-1] MUST support the HD 1080p60 decoding profile. 210 211If Television device implementations support VP8 codec and support 720p, they: 212 213* [T-2-1] MUST support the HD 720p60 decoding profile. 214 215 216 217<table> 218 <tr> 219 <th></th> 220 <th>SD (Low quality)</th> 221 <th>SD (High quality)</th> 222 <th>HD 720p</th> 223 <th>HD 1080p</th> 224 </tr> 225 <tr> 226 <th>Video resolution</th> 227 <td>320 x 180 px</td> 228 <td>640 x 360 px</td> 229 <td>1280 x 720 px</td> 230 <td>1920 x 1080 px</td> 231 </tr> 232 <tr> 233 <th>Video frame rate</th> 234 <td>30 fps</td> 235 <td>30 fps</td> 236 <td>30 fps (60 fps<sup>Television</sup>)</td> 237 <td>30 (60 fps<sup>Television</sup>)</td> 238 </tr> 239 <tr> 240 <th>Video bitrate</th> 241 <td>800 Kbps </td> 242 <td>2 Mbps</td> 243 <td>8 Mbps</td> 244 <td>20 Mbps</td> 245 </tr> 246</table> 247 248 249### 5.3.7\. VP9 250 251If device implementations support VP9 codec, they: 252 253* [C-1-1] MUST support the SD video decoding profiles as indicated in the 254following table. 255* SHOULD support the HD decoding profiles as indicated in the following table. 256 257If device implementations support VP9 codec and a hardware decoder: 258 259* [C-2-2] MUST support the HD decoding profiles as indicated in the following 260table. 261 262If the height that is reported by the `Display.getSupportedModes()` method is 263equal to or greater than the video resolution, then: 264 265* [C-3-1] Device implementations MUST support at least one of VP9 or H.265 266decoding of the 720, 1080 and UHD profiles. 267 268If Television device implementations support VP9 codec and the UHD video 269decoding, they: 270 271* [T-1-1] MUST support 8-bit color depth and SHOULD support VP9 Profile 2 272(10-bit). 273 274If Television device implementations support VP9 codec, the 1080p profile and 275VP9 hardware decoding, they: 276 277* [T-2-1] MUST support 60 fps for 1080p. 278 279<table> 280 <tr> 281 <th></th> 282 <th>SD (Low quality)</th> 283 <th>SD (High quality)</th> 284 <th>HD 720p</th> 285 <th>HD 1080p</th> 286 <th>UHD</th> 287 </tr> 288 <tr> 289 <th>Video resolution</th> 290 <td>320 x 180 px</td> 291 <td>640 x 360 px</td> 292 <td>1280 x 720 px</td> 293 <td>1920 x 1080 px</td> 294 <td>3840 x 2160 px</td> 295 </tr> 296 <tr> 297 <th>Video frame rate</th> 298 <td>30 fps</td> 299 <td>30 fps</td> 300 <td>30 fps</td> 301 <td>30 fps (60 fps<sup>Television with VP9 hardware decoding</sup>)</td> 302 <td>60 fps</td> 303 </tr> 304 <tr> 305 <th>Video bitrate</th> 306 <td>600 Kbps</td> 307 <td>1.6 Mbps</td> 308 <td>4 Mbps</td> 309 <td>5 Mbps</td> 310 <td>20 Mbps</td> 311 </tr> 312</table>