[FFmpeg-devel] [PATCH 5/6] swscale/swscale_unscaled: clear the low bits in planar8ToP01xleWrapper
Michael Niedermayer
michael at niedermayer.cc
Mon Oct 21 03:05:18 EEST 2024
On Sun, Oct 20, 2024 at 08:56:07PM -0300, James Almer wrote:
> On 10/20/2024 8:52 PM, Michael Niedermayer wrote:
> > On Fri, Oct 18, 2024 at 11:34:47PM -0300, James Almer wrote:
> > > This makes the unscaled output of p010le and p016le match the generic path.
> > >
> > > Signed-off-by: James Almer <jamrial at gmail.com>
> > > ---
> > > libswscale/swscale_unscaled.c | 6 +++---
> > > tests/ref/fate/filter-pixdesc-p010le | 2 +-
> > > tests/ref/fate/filter-pixdesc-p016le | 2 +-
> > > tests/ref/fate/filter-pixfmts-copy | 4 ++--
> > > tests/ref/fate/filter-pixfmts-crop | 4 ++--
> > > tests/ref/fate/filter-pixfmts-field | 4 ++--
> > > tests/ref/fate/filter-pixfmts-hflip | 4 ++--
> > > tests/ref/fate/filter-pixfmts-il | 4 ++--
> > > tests/ref/fate/filter-pixfmts-null | 4 ++--
> > > tests/ref/fate/filter-pixfmts-pad | 4 ++--
> > > tests/ref/fate/filter-pixfmts-scale | 4 ++--
> > > tests/ref/fate/filter-pixfmts-transpose | 4 ++--
> > > tests/ref/fate/filter-pixfmts-vflip | 4 ++--
> > > 13 files changed, 25 insertions(+), 25 deletions(-)
> > >
> > > diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
> > > index edb51a8250..a7fdb438a6 100644
> > > --- a/libswscale/swscale_unscaled.c
> > > +++ b/libswscale/swscale_unscaled.c
> > > @@ -340,7 +340,7 @@ static int planar8ToP01xleWrapper(SwsContext *c, const uint8_t *const src[],
> > > const uint8_t *tsrc0 = src0;
> > > for (x = c->srcW; x > 0; x--) {
> > > t = *tsrc0++;
> > > - output_pixel(tdstY++, t | (t << 8));
> > > + output_pixel(tdstY++, t << 8);
> > > }
> > > src0 += srcStride[0];
> > > dstY += dstStride[0] / 2;
> > > @@ -351,9 +351,9 @@ static int planar8ToP01xleWrapper(SwsContext *c, const uint8_t *const src[],
> > > const uint8_t *tsrc2 = src2;
> > > for (x = c->srcW / 2; x > 0; x--) {
> > > t = *tsrc1++;
> > > - output_pixel(tdstUV++, t | (t << 8));
> > > + output_pixel(tdstUV++, t << 8);
> > > t = *tsrc2++;
> > > - output_pixel(tdstUV++, t | (t << 8));
> > > + output_pixel(tdstUV++, t << 8);
> >
> > does this turn white into gray ?
> > i mean 0xFF -> 0xFF00 instead of 0xFFFF
>
> Is 0xFF white in YUV?
no, i did not read this carefull, please disregard my comment
> And do you know a way to test that?
that is a good question
[...]
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Never trust a computer, one day, it may think you are the virus. -- Compn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241021/0d470ae8/attachment.sig>
More information about the ffmpeg-devel
mailing list