Bug 1866020 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I can also repro on a Pixel 8 running Android 14, but not a 6a or 7 running Android 13. So the assumption is this affects all Tensor Pixel devices (6, 7, 8; normal, a, Pro)

Interestingly I cannot repro in Chrome normally. However, when you swipe up from the bottom of the screen to open the app switcher, the chrome thumbnail does reproduce the problem. Likewise taking a screenshot of Chrome reproduces the problem.

My hunch is that the video data is in a dataspace not handled by either our gles renderer nor chrome's. However, in normal circumstances I believe chrome uses `SurfaceControl` to composite the screen, which presumably does handle the dataspace correctly.

Logcat shows this on an affected device:

```
     CCodecBuffers: [c2.exynos.h264.decoder#888:2D-Output] popFromStashAndRegister: at 0us, output format changed to AMessage(what = 0x00000000) = {
     CCodecBuffers:   int32_t android._color-format = 2130708361
     CCodecBuffers:   int32_t android._video-scaling = 1
     CCodecBuffers:   int32_t rotation-degrees = 0
     CCodecBuffers:   int32_t color-standard = 10
     CCodecBuffers:   int32_t color-range = 2
     CCodecBuffers:   int32_t color-transfer = 3
     CCodecBuffers:   float cta861.max-cll = 0.000000
     CCodecBuffers:   float cta861.max-fall = 0.000000
     CCodecBuffers:   int32_t sar-height = 1
     CCodecBuffers:   int32_t sar-width = 1
     CCodecBuffers:   Rect crop(0, 0, 479, 639)
     CCodecBuffers:   int32_t width = 480
     CCodecBuffers:   int32_t height = 640
     CCodecBuffers:   int32_t max-height = 1080
     CCodecBuffers:   int32_t max-width = 1920
     CCodecBuffers:   string mime = "video/raw"
     CCodecBuffers:   int32_t priority = 0
     CCodecBuffers:   int32_t android._dataspace = 281673728
     CCodecBuffers:   int32_t color-format = 2130708361
     CCodecBuffers: }
```

And this on an unaffected device:
```
     CCodec  : setup formats output: AMessage(what = 0x00000000) = {
     CCodec  :   int32_t android._color-format = 2130708361
     CCodec  :   int32_t android._video-scaling = 1
     CCodec  :   int32_t rotation-degrees = 0
     CCodec  :   int32_t color-standard = 4
     CCodec  :   int32_t color-range = 2
     CCodec  :   int32_t color-transfer = 3
     CCodec  :   float cta861.max-cll = 0.000000
     CCodec  :   float cta861.max-fall = 0.000000
     CCodec  :   int32_t sar-height = 1
     CCodec  :   int32_t sar-width = 1
     CCodec  :   Rect crop(0, 0, 95, 127)
     CCodec  :   int32_t width = 96
     CCodec  :   int32_t height = 128
     CCodec  :   int32_t max-height = 1080
     CCodec  :   int32_t max-width = 1920
     CCodec  :   string mime = "video/raw"
     CCodec  :   int32_t priority = 0
     CCodec  :   int32_t android._dataspace = 259
     CCodec  :   int32_t color-format = 2130708361
     CCodec  : }
```

Interestingly, on unaffected devices `color-standard` is `4` and `android._dataspace` is `259`. On affected devices they are `10` and `281673728` on affected.

4 is [`COLOR_STANDARD_BT601_NTSC`](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/media/java/android/media/MediaFormat.java;l=1448;drc=cf7c80525b676dd5aa5c235e79b4594834b2b49d) and 259 appears to be [`HAL_DATASPACE_V0_BT601_525`](https://cs.android.com/android/platform/superproject/main/+/main:system/core/libsystem/include/system/graphics-base-v1.0.h;l=89;drc=d4035b6eb1192f71af7adae47bf17d22c7356fa1) . I'm not sure what `10` and `281673728` are.
I can also repro on a Pixel 8 running Android 14, but not a 6a or 7 running Android 13. So the assumption is this affects all Tensor Pixel devices (6, 7, 8; normal, a, Pro)

Interestingly I cannot repro in Chrome normally. However, when you swipe up from the bottom of the screen to open the app switcher, the chrome thumbnail does reproduce the problem. Likewise taking a screenshot of Chrome reproduces the problem.

My hunch is that the video data is in a dataspace not handled by either our gles renderer nor chrome's. However, in normal circumstances I believe chrome uses `SurfaceControl` to composite the screen, which presumably does handle the dataspace correctly.

Logcat shows this on an affected device:

```
     CCodecBuffers: [c2.exynos.h264.decoder#888:2D-Output] popFromStashAndRegister: at 0us, output format changed to AMessage(what = 0x00000000) = {
     CCodecBuffers:   int32_t android._color-format = 2130708361
     CCodecBuffers:   int32_t android._video-scaling = 1
     CCodecBuffers:   int32_t rotation-degrees = 0
     CCodecBuffers:   int32_t color-standard = 10
     CCodecBuffers:   int32_t color-range = 2
     CCodecBuffers:   int32_t color-transfer = 3
     CCodecBuffers:   float cta861.max-cll = 0.000000
     CCodecBuffers:   float cta861.max-fall = 0.000000
     CCodecBuffers:   int32_t sar-height = 1
     CCodecBuffers:   int32_t sar-width = 1
     CCodecBuffers:   Rect crop(0, 0, 479, 639)
     CCodecBuffers:   int32_t width = 480
     CCodecBuffers:   int32_t height = 640
     CCodecBuffers:   int32_t max-height = 1080
     CCodecBuffers:   int32_t max-width = 1920
     CCodecBuffers:   string mime = "video/raw"
     CCodecBuffers:   int32_t priority = 0
     CCodecBuffers:   int32_t android._dataspace = 281673728
     CCodecBuffers:   int32_t color-format = 2130708361
     CCodecBuffers: }
```

And this on an unaffected device:
```
     CCodec  : setup formats output: AMessage(what = 0x00000000) = {
     CCodec  :   int32_t android._color-format = 2130708361
     CCodec  :   int32_t android._video-scaling = 1
     CCodec  :   int32_t rotation-degrees = 0
     CCodec  :   int32_t color-standard = 4
     CCodec  :   int32_t color-range = 2
     CCodec  :   int32_t color-transfer = 3
     CCodec  :   float cta861.max-cll = 0.000000
     CCodec  :   float cta861.max-fall = 0.000000
     CCodec  :   int32_t sar-height = 1
     CCodec  :   int32_t sar-width = 1
     CCodec  :   Rect crop(0, 0, 95, 127)
     CCodec  :   int32_t width = 96
     CCodec  :   int32_t height = 128
     CCodec  :   int32_t max-height = 1080
     CCodec  :   int32_t max-width = 1920
     CCodec  :   string mime = "video/raw"
     CCodec  :   int32_t priority = 0
     CCodec  :   int32_t android._dataspace = 259
     CCodec  :   int32_t color-format = 2130708361
     CCodec  : }
```

Interestingly, on unaffected devices `color-standard` is `4` and `android._dataspace` is `259`. On affected devices they are `10` and `281673728` on affected.

4 is [`COLOR_STANDARD_BT601_NTSC`](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/media/java/android/media/MediaFormat.java;l=1409;drc=cf7c80525b676dd5aa5c235e79b4594834b2b49d) and 259 appears to be [`HAL_DATASPACE_V0_BT601_525`](https://cs.android.com/android/platform/superproject/main/+/main:system/core/libsystem/include/system/graphics-base-v1.0.h;l=89;drc=d4035b6eb1192f71af7adae47bf17d22c7356fa1) . I'm not sure what `10` and `281673728` are.
I can also repro on a Pixel 8 running Android 14, but not a 6a or 7 running Android 13. So the assumption is this affects all Tensor Pixel devices (6, 7, 8; normal, a, Pro)

Interestingly I cannot repro in Chrome normally. However, when you swipe up from the bottom of the screen to open the app switcher, the chrome thumbnail does reproduce the problem. Likewise taking a screenshot of Chrome reproduces the problem.

My hunch is that the video data is in a dataspace not handled by either our gles renderer nor chrome's. However, in normal circumstances I believe chrome uses `SurfaceControl` to composite the screen, which presumably does handle the dataspace correctly.

Logcat shows this on an affected device:

```
     CCodecBuffers: [c2.exynos.h264.decoder#888:2D-Output] popFromStashAndRegister: at 0us, output format changed to AMessage(what = 0x00000000) = {
     CCodecBuffers:   int32_t android._color-format = 2130708361
     CCodecBuffers:   int32_t android._video-scaling = 1
     CCodecBuffers:   int32_t rotation-degrees = 0
     CCodecBuffers:   int32_t color-standard = 10
     CCodecBuffers:   int32_t color-range = 2
     CCodecBuffers:   int32_t color-transfer = 3
     CCodecBuffers:   float cta861.max-cll = 0.000000
     CCodecBuffers:   float cta861.max-fall = 0.000000
     CCodecBuffers:   int32_t sar-height = 1
     CCodecBuffers:   int32_t sar-width = 1
     CCodecBuffers:   Rect crop(0, 0, 479, 639)
     CCodecBuffers:   int32_t width = 480
     CCodecBuffers:   int32_t height = 640
     CCodecBuffers:   int32_t max-height = 1080
     CCodecBuffers:   int32_t max-width = 1920
     CCodecBuffers:   string mime = "video/raw"
     CCodecBuffers:   int32_t priority = 0
     CCodecBuffers:   int32_t android._dataspace = 281673728
     CCodecBuffers:   int32_t color-format = 2130708361
     CCodecBuffers: }
```

And this on an unaffected device:
```
     CCodec  : setup formats output: AMessage(what = 0x00000000) = {
     CCodec  :   int32_t android._color-format = 2130708361
     CCodec  :   int32_t android._video-scaling = 1
     CCodec  :   int32_t rotation-degrees = 0
     CCodec  :   int32_t color-standard = 4
     CCodec  :   int32_t color-range = 2
     CCodec  :   int32_t color-transfer = 3
     CCodec  :   float cta861.max-cll = 0.000000
     CCodec  :   float cta861.max-fall = 0.000000
     CCodec  :   int32_t sar-height = 1
     CCodec  :   int32_t sar-width = 1
     CCodec  :   Rect crop(0, 0, 95, 127)
     CCodec  :   int32_t width = 96
     CCodec  :   int32_t height = 128
     CCodec  :   int32_t max-height = 1080
     CCodec  :   int32_t max-width = 1920
     CCodec  :   string mime = "video/raw"
     CCodec  :   int32_t priority = 0
     CCodec  :   int32_t android._dataspace = 259
     CCodec  :   int32_t color-format = 2130708361
     CCodec  : }
```

Interestingly, on unaffected devices `color-standard` is `4` and `android._dataspace` is `259`. On affected devices they are `10` and `281673728` on affected.

4 is [`COLOR_STANDARD_BT601_NTSC`](https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/media/java/android/media/MediaFormat.java;l=1409;drc=cf7c80525b676dd5aa5c235e79b4594834b2b49d) and 259 appears to be [`HAL_DATASPACE_V0_BT601_525`](https://cs.android.com/android/platform/superproject/main/+/main:system/core/libsystem/include/system/graphics-base-v1.0.h;l=89;drc=d4035b6eb1192f71af7adae47bf17d22c7356fa1) . I'm not sure what `10` and `281673728` are.

EDIT: 10 appears to come from [here](https://cs.android.com/android/platform/superproject/main/+/main:prebuilts/vndk/v31/arm/include/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/ColorUtils.h;l=60;drc=381a66b15fc8d71a68eb480d7a29abcdc75301e1): `kColorStandardDCI_P3`. Which makes sense given the color_primaries=smpte432 discovery below.

Back to Bug 1866020 Comment 7