AV_PIX_FMT_GRAY8/16 are considered YUV formats, and the color_range is not set - so the API user will have to assume limitted range. (Unless the API user adds a special-case for the PNG decoder.)
Just export the correct range - full range. --- libavcodec/pngdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 1f8a77b..72d75fb 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -633,6 +633,8 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, return AVERROR_INVALIDDATA; } + avctx->color_range = AVCOL_RANGE_JPEG; + if ((ret = ff_thread_get_buffer(avctx, &s->picture, AV_GET_BUFFER_FLAG_REF)) < 0) return ret; ff_thread_finish_setup(avctx); -- 2.1.4 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel