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 <jamr...@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? And do you know a way to test that?
Like i said in the commit message, the output of this function after this change matches what the code in output.c generates.

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to