diff mbox series

[FFmpeg-devel,1/2] avcodec/mjpegdec: use memset to clear alpha

Message ID 20231213182657.9190-1-cus@passwd.hu
State Accepted
Commit e6b9bfaac3f36ba49c08b8da72c6514030cc4476
Headers show
Series [FFmpeg-devel,1/2] avcodec/mjpegdec: use memset to clear alpha | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Marton Balint Dec. 13, 2023, 6:26 p.m. UTC
Signed-off-by: Marton Balint <cus@passwd.hu>
---
 libavcodec/mjpegdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Marton Balint Dec. 28, 2023, 8:43 p.m. UTC | #1
On Wed, 13 Dec 2023, Marton Balint wrote:

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

Will apply the series.

Regards,
Marton

>
> 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".
>
diff mbox series

Patch

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);
         }
     }