This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 7efd09813f71c6817342a23902bdc4c7e5f68db3 Author: Andreas Rheinhardt <[email protected]> AuthorDate: Sun Dec 14 17:00:06 2025 +0100 Commit: Andreas Rheinhardt <[email protected]> CommitDate: Sun Dec 14 21:06:00 2025 +0100 avcodec/libsvtjpegxsenc: Don't copy unnecessarily Reviewed-by: James Almer <[email protected]> Signed-off-by: Andreas Rheinhardt <[email protected]> --- libavcodec/libsvtjpegxsenc.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/libavcodec/libsvtjpegxsenc.c b/libavcodec/libsvtjpegxsenc.c index 9daf226c9d..2a7c67fe44 100644 --- a/libavcodec/libsvtjpegxsenc.c +++ b/libavcodec/libsvtjpegxsenc.c @@ -55,9 +55,9 @@ static int svt_jpegxs_enc_encode(AVCodecContext* avctx, AVPacket* pkt, { SvtJpegXsEncodeContext* svt_enc = avctx->priv_data; - svt_jpeg_xs_bitstream_buffer_t out_buf; - svt_jpeg_xs_image_buffer_t in_buf; svt_jpeg_xs_frame_t enc_input; + svt_jpeg_xs_bitstream_buffer_t *const out_buf = &enc_input.bitstream; + svt_jpeg_xs_image_buffer_t *const in_buf = &enc_input.image; svt_jpeg_xs_frame_t enc_output; SvtJxsErrorType_t err = SvtJxsErrorNone; @@ -67,19 +67,17 @@ static int svt_jpegxs_enc_encode(AVCodecContext* avctx, AVPacket* pkt, if (ret < 0) return ret; - out_buf.buffer = pkt->data;// output bitstream ptr - out_buf.allocation_size = pkt->size;// output bitstream size - out_buf.used_size = 0; + out_buf->buffer = pkt->data;// output bitstream ptr + out_buf->allocation_size = pkt->size;// output bitstream size + out_buf->used_size = 0; for (int comp = 0; comp < 3; comp++) { // svt-jpegxs require stride in pixel's not in bytes, this means that for 10 bit-depth, stride is half the linesize - in_buf.stride[comp] = frame->linesize[comp] / pixel_size; - in_buf.data_yuv[comp] = frame->data[comp]; - in_buf.alloc_size[comp] = in_buf.stride[comp] * svt_enc->encoder.source_height * pixel_size; + in_buf->stride[comp] = frame->linesize[comp] / pixel_size; + in_buf->data_yuv[comp] = frame->data[comp]; + in_buf->alloc_size[comp] = in_buf->stride[comp] * svt_enc->encoder.source_height * pixel_size; } - enc_input.bitstream = out_buf; - enc_input.image = in_buf; enc_input.user_prv_ctx_ptr = pkt; err = svt_jpeg_xs_encoder_send_picture(&svt_enc->encoder, &enc_input, 1 /*blocking*/); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
