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 > > [0,255], but the color channel value

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

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

2021-09-22 Thread Michael Niedermayer
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 > [0,255], but the color channel values in X2RGB10

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

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