Bug 1409105 - Downsample av1 images unconditionally. r=kinetik

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 behaviour of always downsampling to 8 bit data.
This is slower for the demo stream, but at least displays correctly.

MozReview-Commit-ID: 8kSd9kph9DE

--HG--
extra : rebase_source : 040795b4d99a2001397c0021f34d39535aa4aa2d
This commit is contained in:
Ralph Giles 2017-10-17 12:24:50 -07:00
Родитель d2c0e62e07
Коммит 1809099a2f
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -193,8 +193,8 @@ AOMDecoder::ProcessDecode(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) {