Commit 6415d909 authored by Miguel Casas's avatar Miguel Casas Committed by Commit Bot

media/gpu/vaapi: tag ColorSpace of decoded VideoFrames

This CL uses the (H264|VP8|VP9)VaapiVideoDecoderDelegate's ColorSpace
for the decoded VideoFrames, if the former is valid. This ColorSpace
comes ultimately from the codec parsers e.g. [1,2] (VP8 doesn't seem to
support it in the VP8 frame itself, so it'll fall back to the container
provide one).

[1] https://source.chromium.org/chromium/chromium/src/+/master:media/filters/vp9_parser.cc;l=296;drc=24d1cda83eb280883bf7950900b7948b4b3f102a
[2] https://source.chromium.org/chromium/chromium/src/+/master:media/gpu/h264_decoder.cc;l=644;drc=fa9094c73631d4b167dc422d62ac40915462423a

Bug: b:147021705
Change-Id: I19c629f3c60a383e842206e18052057affa466ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2247330
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: default avatarJao-ke Chin-Lee <jchinlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780042}
parent 4ff76abc
......@@ -379,7 +379,7 @@ void VaapiVideoDecoder::SurfaceReady(scoped_refptr<VASurface> va_surface,
}
const auto gfx_color_space = color_space.ToGfxColorSpace();
if (gfx_color_space.IsHDR())
if (gfx_color_space.IsValid())
video_frame->set_color_space(gfx_color_space);
output_cb_.Run(std::move(video_frame));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment