Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/2] avcodec/mjpegdec: use memset to clear alpha
@ 2023-12-13 18:26 Marton Balint
  2023-12-13 18:26 ` [FFmpeg-devel] [PATCH 2/2] avcodec/mjpegdec: avoid indirection when accessing avctx Marton Balint
  2023-12-28 20:43 ` [FFmpeg-devel] [PATCH 1/2] avcodec/mjpegdec: use memset to clear alpha Marton Balint
  0 siblings, 2 replies; 3+ messages in thread
From: Marton Balint @ 2023-12-13 18:26 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Marton Balint

Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavcodec/mjpegdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 8676155ecf..8191606f43 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2793,8 +2793,8 @@ the_end:
                 dst[0][j] = g*257 >> 16;
                 dst[1][j] = b*257 >> 16;
                 dst[2][j] = r*257 >> 16;
-                dst[3][j] = 255;
             }
+            memset(dst[3], 255, w);
         }
     }
     if (s->adobe_transform == 2 && s->avctx->pix_fmt == AV_PIX_FMT_YUVA444P) {
@@ -2816,8 +2816,8 @@ the_end:
                 dst[0][j] = r*257 >> 16;
                 dst[1][j] = (g*257 >> 16) + 128;
                 dst[2][j] = (b*257 >> 16) + 128;
-                dst[3][j] = 255;
             }
+            memset(dst[3], 255, w);
         }
     }
 
-- 
2.35.3

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-12-28 20:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-13 18:26 [FFmpeg-devel] [PATCH 1/2] avcodec/mjpegdec: use memset to clear alpha Marton Balint
2023-12-13 18:26 ` [FFmpeg-devel] [PATCH 2/2] avcodec/mjpegdec: avoid indirection when accessing avctx Marton Balint
2023-12-28 20:43 ` [FFmpeg-devel] [PATCH 1/2] avcodec/mjpegdec: use memset to clear alpha Marton Balint

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