avcodec: use RGB24 without a mask when encoding TIFF

Given the code below we accept a few chroma mapping, including AV_PIX_FMT_RGB24
which maps to VLC_CODEC_RGB24 regardless of endianness.

The libavcodec encoder does accept AV_PIX_FMT_RGB24, not AV_PIX_FMT_BGR24 [1].

[1] https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/HEAD:/libavcodec/tiffenc.c#l583
This commit is contained in:
Steve Lhomme 2023-09-04 09:14:56 +02:00
parent de4609beb7
commit 03463c279b

View File

@ -569,7 +569,7 @@ int InitVideoEnc( vlc_object_t *p_this )
if( p_enc->fmt_out.i_codec == VLC_CODEC_TIFF )
{
p_enc->fmt_in.i_codec =
p_enc->fmt_in.video.i_chroma = VLC_CODEC_RGB24M;
p_enc->fmt_in.video.i_chroma = VLC_CODEC_RGB24;
}
p_context->pix_fmt = GetFfmpegChroma( &p_enc->fmt_in.video );