[FFmpeg-devel] [PATCH] swscale: treat gray as a jpeg style format
wm4
nfxjfg at googlemail.com
Sat Jul 6 13:20:53 CEST 2013
On Sat, 6 Jul 2013 03:28:01 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:
> Fixes Ticket2684
>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> ---
> libswscale/utils.c | 2 +
> tests/ref/fate/filter-alphaextract_alphamerge_rgb | 100 +++---
> tests/ref/fate/filter-alphaextract_alphamerge_yuv | 100 +++---
> tests/ref/fate/filter-edgedetect | 2 +-
> tests/ref/fate/filter-gradfun-sample | 40 +--
> tests/ref/fate/filter-pixdesc | 2 +-
> tests/ref/fate/filter-pixfmts-copy | 2 +-
> tests/ref/fate/filter-pixfmts-crop | 2 +-
> tests/ref/fate/filter-pixfmts-field | 2 +-
> tests/ref/fate/filter-pixfmts-hflip | 2 +-
> tests/ref/fate/filter-pixfmts-il | 2 +-
> tests/ref/fate/filter-pixfmts-null | 2 +-
> tests/ref/fate/filter-pixfmts-pad | 2 +-
> tests/ref/fate/filter-pixfmts-rotate | 2 +-
> tests/ref/fate/filter-pixfmts-scale | 2 +-
> tests/ref/fate/filter-pixfmts-tinterlace_merge | 2 +-
> tests/ref/fate/filter-pixfmts-tinterlace_pad | 2 +-
> tests/ref/fate/filter-pixfmts-vflip | 2 +-
> tests/ref/fate/gifenc-gray | 346
> ++++++++++-----------
> tests/ref/lavf/pam | 4 +-
> tests/ref/lavf/pgm | 4 +-
> tests/ref/lavf/pgmpipe | 4 +-
> tests/ref/lavf/pixfmt | 2 +-
> tests/ref/lavf/xwd | 4 +-
> tests/ref/vsynth/vsynth1-qtrlegray | 8 +-
> tests/ref/vsynth/vsynth2-qtrlegray | 6 +- 26 files
> changed, 325 insertions(+), 323 deletions(-)
>
> diff --git a/libswscale/utils.c b/libswscale/utils.c
> index fb0a7ad..5170321 100644
> --- a/libswscale/utils.c
> +++ b/libswscale/utils.c
> @@ -1012,6 +1012,8 @@ static int handle_jpeg(enum AVPixelFormat
> *format) case AV_PIX_FMT_YUVJ440P:
> *format = AV_PIX_FMT_YUV440P;
> return 1;
> + case AV_PIX_FMT_GRAY8:
> + return 1;
> default:
> return 0;
> }
Maybe I'm missing something, but isn't the range supposed to be
controlled by the parameters passed to sws_setColorspaceDetails?
More information about the ffmpeg-devel
mailing list