diff options
author | trav90 <travawine@palemoon.org> | 2018-10-20 14:50:33 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-20 14:50:33 -0500 |
commit | 070c2cb24ce1ff32a538346c7c1dbbe83fc7e171 (patch) | |
tree | 694c92e475d384af18aff2e5930cfb73e4bc383e /dom/media | |
parent | e5b30fc95e191a50da4b8735aaf52baa8d384a0e (diff) | |
download | UXP-070c2cb24ce1ff32a538346c7c1dbbe83fc7e171.tar UXP-070c2cb24ce1ff32a538346c7c1dbbe83fc7e171.tar.gz UXP-070c2cb24ce1ff32a538346c7c1dbbe83fc7e171.tar.lz UXP-070c2cb24ce1ff32a538346c7c1dbbe83fc7e171.tar.xz UXP-070c2cb24ce1ff32a538346c7c1dbbe83fc7e171.zip |
Downsample av1 images unconditionally
Adding partial support for 10/12-bit video images seems to have broken the native pixel-stride support we were using to pass 8-bit AV1 frame data formatted in 16-bit pixel values, resulting in vertical green lines.
Revert to the earlier behavior of always downsampling to 8 bit data. This is slower, but at least displays correctly.
Diffstat (limited to 'dom/media')
-rw-r--r-- | dom/media/platforms/agnostic/AOMDecoder.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dom/media/platforms/agnostic/AOMDecoder.cpp b/dom/media/platforms/agnostic/AOMDecoder.cpp index 7a5fba052..b5d21375e 100644 --- a/dom/media/platforms/agnostic/AOMDecoder.cpp +++ b/dom/media/platforms/agnostic/AOMDecoder.cpp @@ -164,8 +164,8 @@ AOMDecoder::DoDecode(MediaRawData* aSample) while ((img = aom_codec_get_frame(&mCodec, &iter))) { // Track whether the underlying buffer is 8 or 16 bits per channel. bool highbd = bool(img->fmt & AOM_IMG_FMT_HIGHBITDEPTH); - if (img->bit_depth > 8) { - // Downsample images with more than 8 significant bits per channel. + if (highbd) { + // Downsample images with more than 8 bits per channel. aom_img_fmt_t fmt8 = static_cast<aom_img_fmt_t>(img->fmt ^ AOM_IMG_FMT_HIGHBITDEPTH); img8.reset(aom_img_alloc(NULL, fmt8, img->d_w, img->d_h, 16)); if (img8 == nullptr) { |