This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 695b71794446de1e9ea7306eeb554cf36fd2c976 Author: James Almer <[email protected]> AuthorDate: Sun Dec 14 18:07:53 2025 -0300 Commit: James Almer <[email protected]> CommitDate: Sun Dec 14 18:21:58 2025 -0300 avcodec/libsvtjpegxsdec: Replace divisions by shifts Based on a patch by Andreas Rheinhardt Signed-off-by: James Almer <[email protected]> --- libavcodec/libsvtjpegxsdec.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/libsvtjpegxsdec.c b/libavcodec/libsvtjpegxsdec.c index 2499f32059..23b119e924 100644 --- a/libavcodec/libsvtjpegxsdec.c +++ b/libavcodec/libsvtjpegxsdec.c @@ -102,7 +102,6 @@ static int svt_jpegxs_dec_decode(AVCodecContext* avctx, AVFrame* picture, int* g int ret; svt_jpeg_xs_frame_t dec_input; svt_jpeg_xs_frame_t dec_output; - uint32_t pixel_size; if (!svt_dec->decoder_initialized) { err = svt_jpeg_xs_decoder_get_single_frame_size_with_proxy( @@ -179,11 +178,10 @@ static int svt_jpegxs_dec_decode(AVCodecContext* avctx, AVFrame* picture, int* g if (ret < 0) return ret; - pixel_size = svt_dec->config.bit_depth <= 8 ? 1 : 2; - + unsigned pixel_shift = svt_dec->config.bit_depth <= 8 ? 0 : 1; for (int comp = 0; comp < svt_dec->config.components_num; comp++) { dec_input.image.data_yuv[comp] = picture->data[comp]; - dec_input.image.stride[comp] = picture->linesize[comp]/pixel_size; + dec_input.image.stride[comp] = picture->linesize[comp] >> pixel_shift; dec_input.image.alloc_size[comp] = picture->linesize[comp] * svt_dec->config.components[comp].height; } _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
