Signed-off-by: Manuel Stoeckl
---
This is the same as PATCH v3 3/3 of the same name, except with the
filter-pixdesc-x2bgr10le test reference value fixed. (My local ffmpeg
copy sometimes fails to set up and run the filter-pixdesc-* tests, so I
missed this.)
libswscale/input.c
> On Mon, Sep 20, 2021 at 10:21:23PM -0400, Manuel Stoeckl wrote:
> > This resolves a problem where conversions from YUV to X2RGB10LE
> > would produce color values a factor 4 too small.
> >
> > The variable 'yval' used later in the switch case 30 has range
> &g
Signed-off-by: Manuel Stoeckl
---
libswscale/input.c | 15 +--
libswscale/output.c | 9 -
libswscale/utils.c | 1 +
libswscale/yuv2rgb.c | 9 ++---
tests/ref/fate/filter-pixdesc
The new format (given in big/little endian forms) matches the
existing X2RGB10 format, except with B and R channels switched.
AV_PIX_FMT_X2BGR10 data often is created by OpenGL programs
whose buffers use the GL_RGB10 internal format.
Signed-off-by: Manuel Stoeckl
---
doc/APIchanges
This resolves a problem where conversions from YUV to X2RGB10LE
would produce color values a factor 4 too small, because an 8-bit
value was placed in a 10-bit channel.
Signed-off-by: Manuel Stoeckl
---
libswscale/yuv2rgb.c | 2 +-
tests/ref/fate/filter-pixdesc-x2rgb10le | 2
> >
> > The variable 'yval' used later in the switch case 30 has range
> > [0,255], but the color channel values in X2RGB10 have two more
> > bits than 'yval' and can go up to 1023. Increasing (r|g|b)base
> > by 2 effectively multiplies yval by 4 and fixes this discrepancy.
>
> does white have
Signed-off-by: Manuel Stoeckl
---
libswscale/input.c | 15 +--
libswscale/output.c | 9 -
libswscale/utils.c | 1 +
libswscale/yuv2rgb.c | 9 ++---
tests/ref/fate/filter-pixdesc
The new format (given in big/little endian forms) matches the
existing X2RGB10 format, except with B and R channels switched.
AV_PIX_FMT_X2BGR10 data often is created by OpenGL programs
whose buffers use the GL_RGB10 internal format.
Signed-off-by: Manuel Stoeckl
---
doc/APIchanges
)base
by 2 effectively multiplies yval by 4 and fixes this discrepancy.
Signed-off-by: Manuel Stoeckl
---
libswscale/yuv2rgb.c | 6 +++---
tests/ref/fate/filter-pixdesc-x2rgb10le | 2 +-
tests/ref/fate/filter-pixfmts-copy | 2 +-
tests/ref/fate/filter-pixfmts-crop
>
> have you confirmed that all the added codepathes produce correct
> looking output ?
>
I've attached a test program which should cover all the modified code
paths. The new X2BGR10 code works just as well as the X2RGB10 code, but:
* converting FROM X2RGB10LE or X2BGR10LE works
* converting
The new format (given in big/little endian forms) matches the
existing X2RGB10 format, except with B and R channels switched.
AV_PIX_FMT_X2BGR10 data often is created by OpenGL programs
whose buffers use the GL_RGB10 internal format.
Signed-off-by: Manuel Stoeckl
---
doc/APIchanges
Signed-off-by: Manuel Stoeckl
---
libswscale/input.c | 15 +--
libswscale/output.c | 9 -
libswscale/utils.c | 1 +
libswscale/yuv2rgb.c | 9 ++---
tests/ref/fate/filter-pixdesc
12 matches
Mail list logo