Add fix for 8-bit H264 HDR content

8-bit H264 HDR content is not rendered correctly in Chrome on Windows.
This is a temporary fix that converts the 8-bit buffer to a 10-bit
buffer if the color space indicates that the buffer should be
rendered as HDR.

Bug: webrtc:10575
Change-Id: I106612ec489c6371fa774424a4cf07d9bad40fc3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134040
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27766}
This commit is contained in:
Johannes Kron
2019-04-25 11:51:55 +02:00
committed by Commit Bot
parent 4b1afbe60a
commit 042559fb92
3 changed files with 57 additions and 37 deletions

View File

@ -68,6 +68,7 @@ class H264DecoderImpl : public H264Decoder {
const char* ImplementationName() const override;
private:
const bool kEnable8bitHdrFix_;
// Called by FFmpeg when it needs a frame buffer to store decoded frames in.
// The |VideoFrame| returned by FFmpeg at |Decode| originate from here. Their
// buffers are reference counted and freed by FFmpeg using |AVFreeBuffer2|.