[FFmpeg-devel] [PATCH]Force tv range for mpeg4 gray output

Michael Niedermayer michaelni at gmx.at
Sat May 9 13:54:03 CEST 2015


On Sat, May 09, 2015 at 12:30:32PM +0200, Carl Eugen Hoyos wrote:
[...]
> @@ -48,8 +48,11 @@ static enum AVPixelFormat h263_get_format(AVCodecContext *avctx)
>      if (avctx->codec->id == AV_CODEC_ID_MSS2)
>          return AV_PIX_FMT_YUV420P;
>  
> -    if (CONFIG_GRAY && (avctx->flags & CODEC_FLAG_GRAY))
> +    if (CONFIG_GRAY && (avctx->flags & CODEC_FLAG_GRAY)) {
> +        if (avctx->color_range == AVCOL_RANGE_UNSPECIFIED)
> +            avctx->color_range = AVCOL_RANGE_MPEG;
>          return AV_PIX_FMT_GRAY8;
> +    }

LGTM

better documentation is welcome as well

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150509/27441578/attachment.asc>


More information about the ffmpeg-devel mailing list