[FFmpeg-devel] [PATCH 1/2] libavcodec/jpeg2000dec: Enhance pix fmt selection
Carl Eugen Hoyos
ceffmpeg at gmail.com
Thu Jul 2 00:42:21 EEST 2020
Am Mi., 1. Juli 2020 um 20:34 Uhr schrieb <gautamramk at gmail.com>:
>
> From: Gautam Ramakrishnan <gautamramk at gmail.com>
>
> This patch assigns default pix format values when
> a match does not take place.
> ---
> libavcodec/jpeg2000dec.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
> index 3f4a9ef96c..86f9170723 100644
> --- a/libavcodec/jpeg2000dec.c
> +++ b/libavcodec/jpeg2000dec.c
> @@ -436,6 +436,15 @@ static int get_siz(Jpeg2000DecoderContext *s)
> s->cdef[3] = 3;
> i = 0;
> }
> + } else if (ncomponents == 3 && s->precision == 8) {
> + s->avctx->pix_fmt = AV_PIX_FMT_RGB24;
> + i = 0;
> + } else if (ncomponents == 2 && s->precision == 8) {
> + s->avctx->pix_fmt = AV_PIX_FMT_YA8;
> + i = 0;
Which samples does this fix / why is this a good idea?
Carl Eugen
More information about the ffmpeg-devel
mailing list