[FFmpeg-devel] [PATCH] fftools/ffplay: fix YUV conversion mode

Jan Ekström jeebjp at gmail.com
Mon Jun 27 10:03:55 EEST 2022


On Tue, Jun 21, 2022 at 10:46 PM Niklas Haas <ffmpeg at haasn.xyz> wrote:
>
> From: Niklas Haas <git at haasn.dev>
>
> GL and Metal cache the state at time of texture creation. GLES2 and
> Direct3D 11 use the state at time of the render copy call.
>
> So the only way we can get the correct behavior consistently is by
> making sure the state is set for both the upload *and* the draw call.
> This probably isn't our bug to fix (upstream should make itself behave
> consistently and also document its functions), but as it stands,
> `ffplay` is misrendering BT.709 as BT.601 on my stock Linux system, and
> that leaves a bad taste in my mouth.
>
> Signed-off-by: Niklas Haas <git at haasn.dev>
> ---

Moves the color space setting earlier, as well as clears the state in
case of an additional failure exit case with upload.

LGTM.

Jan


More information about the ffmpeg-devel mailing list