[FFmpeg-devel] [PATCH v4 3/3] swscale: add input/output support for X2BGR10LE

2021-09-24 Thread Manuel Stoeckl
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

Re: [FFmpeg-devel] [PATCH] swscale/yuv2rgb: fix shift values for conversion to X2RGB10

2021-09-23 Thread Manuel Stoeckl
> 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

[FFmpeg-devel] [PATCH v3 3/3] swscale: add input/output support for X2BGR10LE

2021-09-23 Thread Manuel Stoeckl
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

[FFmpeg-devel] [PATCH v3 2/3] lavu/pix_fmt: add pixel format for x2bgr10

2021-09-23 Thread Manuel Stoeckl
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

[FFmpeg-devel] [PATCH v3 1/3] swscale/yuv2rgb: fix conversion to X2RGB10

2021-09-23 Thread Manuel Stoeckl
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

Re: [FFmpeg-devel] [PATCH] swscale/yuv2rgb: fix shift values for conversion to X2RGB10

2021-09-22 Thread Manuel Stoeckl
> > > > 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

[FFmpeg-devel] [PATCH v2 2/2] swscale: add input/output support for X2BGR10LE

2021-09-21 Thread Manuel Stoeckl
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

[FFmpeg-devel] [PATCH v2 1/2] lavu/pix_fmt: add pixel format for x2bgr10

2021-09-21 Thread Manuel Stoeckl
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

[FFmpeg-devel] [PATCH] swscale/yuv2rgb: fix shift values for conversion to X2RGB10

2021-09-20 Thread Manuel Stoeckl
)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

Re: [FFmpeg-devel] [PATCH 2/2] swscale: add input/output support for X2BGR10LE

2021-09-19 Thread Manuel Stoeckl
> > 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

[FFmpeg-devel] [PATCH 1/2] lavu/pix_fmt: add pixel format for x2bgr10

2021-09-18 Thread Manuel Stoeckl
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

[FFmpeg-devel] [PATCH 2/2] swscale: add input/output support for X2BGR10LE

2021-09-18 Thread Manuel Stoeckl
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