On Mon, 17 Mar 2014 16:30:21 +0100, Vittorio Giovara 
<[email protected]> wrote:
> ---
>  libavcodec/mpegvideo_enc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
> index ec49db7..f42bae0 100644
> --- a/libavcodec/mpegvideo_enc.c
> +++ b/libavcodec/mpegvideo_enc.c
> @@ -245,7 +245,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
>          if (avctx->pix_fmt != AV_PIX_FMT_YUVJ420P &&
>              avctx->pix_fmt != AV_PIX_FMT_YUVJ422P &&
>              ((avctx->pix_fmt != AV_PIX_FMT_YUV420P &&
> -              avctx->pix_fmt != AV_PIX_FMT_YUV422P) ||
> +              avctx->pix_fmt != AV_PIX_FMT_YUV422P &&
> +              avctx->color_range != AVCOL_RANGE_MPEG) ||

Ugh, the condition is getting too convoluted to follow.
Could you split it up in separate checks, like
if (pixfmt is jpeg or range is jpeg)
    format ok
else if (std compliance is experimental and (pixfmt is yuv or or range is mpeg))
    format ok;
else
    format not ok;

-- 
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to