[FFmpeg-devel] [PATCH] swscale: treat gray as a jpeg style format

Michael Niedermayer michaelni at gmx.at
Sat Jul 6 13:46:34 CEST 2013


On Sat, Jul 06, 2013 at 01:20:53PM +0200, wm4 wrote:
> 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?

yes, does this patch break that somehow ?
or am i misunderstanding what you meant ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130706/9d222778/attachment.asc>


More information about the ffmpeg-devel mailing list