Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] swscale/output: don't leave the alpha channel undefined in vuyx and xv36le
Date: Tue, 13 Aug 2024 23:27:11 +0200
Message-ID: <20240813212711.GP4991@pb2> (raw)
In-Reply-To: <20240813142517.25219-1-jamrial@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2406 bytes --]

On Tue, Aug 13, 2024 at 11:25:17AM -0300, James Almer wrote:
> It's non-determistic, as shown by poisoning avfilter buffers instead of zeroing them.
> 
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
>  libswscale/output.c                      | 6 +++---
>  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-fieldorder | 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        | 2 +-
>  tests/ref/fate/filter-pixfmts-scale      | 4 ++--
>  tests/ref/fate/filter-pixfmts-transpose  | 4 ++--
>  tests/ref/fate/filter-pixfmts-vflip      | 4 ++--
>  12 files changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git a/libswscale/output.c b/libswscale/output.c
> index e8dd2145ce..fb21e79f47 100644
> --- a/libswscale/output.c
> +++ b/libswscale/output.c
> @@ -2650,7 +2650,7 @@ yuv2xv36le_X_c(SwsContext *c, const int16_t *lumFilter,
>  {
>      int i;
>      for (i = 0; i < dstW; i++) {
> -        int Y = 1 << 14, U = 1 << 14, V = 1 << 14;
> +        int Y = 1 << 14, U = 1 << 14, V = 1 << 14, A = 255;
>          int j;
>  
>          for (j = 0; j < lumFilterSize; j++)
> @@ -2664,6 +2664,7 @@ yuv2xv36le_X_c(SwsContext *c, const int16_t *lumFilter,
>          AV_WL16(dest + 8 * i + 2, av_clip_uintp2(Y >> 15, 12) << 4);
>          AV_WL16(dest + 8 * i + 0, av_clip_uintp2(U >> 15, 12) << 4);
>          AV_WL16(dest + 8 * i + 4, av_clip_uintp2(V >> 15, 12) << 4);
> +        AV_WL16(dest + 8 * i + 6, A);
>      }
>  }
>  
> @@ -2718,8 +2719,7 @@ yuv2vuyX_X_c(SwsContext *c, const int16_t *lumFilter,
>          dest[4 * i    ] = V;
>          dest[4 * i + 1] = U;
>          dest[4 * i + 2] = Y;
> -        if (destHasAlpha)
> -            dest[4 * i + 3] = A;
> +        dest[4 * i + 3] = A;
>      }
>  }

probably ok

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The day soldiers stop bringing you their problems is the day you have stopped 
leading them. They have either lost confidence that you can help or concluded 
you do not care. Either case is a failure of leadership. - Colin Powell

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

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

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

      parent reply	other threads:[~2024-08-13 21:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13 14:25 James Almer
2024-08-13 15:08 ` Timo Rothenpieler
2024-08-13 15:39   ` James Almer
2024-08-13 17:27 ` James Almer
2024-08-13 21:27 ` Michael Niedermayer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240813212711.GP4991@pb2 \
    --to=michael@niedermayer.cc \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git