[FFmpeg-devel] [PATCH 5/6] swscale/swscale_unscaled: clear the low bits in planar8ToP01xleWrapper
Michael Niedermayer
michael at niedermayer.cc
Mon Oct 21 02:52:25 EEST 2024
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
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
If one takes all money from those who grow wealth and gives it to those who
do not grow wealth, 10 years later, almost the same people who where wealthy
will be wealthy again, the same people who where poor will be poor again.
-------------- 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/2ee5f8d2/attachment.sig>
More information about the ffmpeg-devel
mailing list