[FFmpeg-cvslog] avcodec/svq1enc: Stop copying PutBitContext unnecessarily

Andreas Rheinhardt git at videolan.org
Thu Jun 20 20:00:29 EEST 2024


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Jun  6 01:21:55 2024 +0200| [0b0a4a7e69c0cd80ec7f9caf925ad9e4bc7d0810] | committer: Andreas Rheinhardt

avcodec/svq1enc: Stop copying PutBitContext unnecessarily

Possible since 404fe63e23433aa559cee5366cb26f78b425e7e5.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b0a4a7e69c0cd80ec7f9caf925ad9e4bc7d0810
---

 libavcodec/svq1enc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 6e687166b8..4065c9b21a 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -468,16 +468,14 @@ static int svq1_encode_plane(SVQ1EncContext *s, int plane,
 
                     put_bits(&s->reorder_pb[5], SVQ1_BLOCK_INTER_LEN, SVQ1_BLOCK_INTER_CODE);
 
-                    s->m.pb = s->reorder_pb[5];
                     mx      = motion_ptr[0];
                     my      = motion_ptr[1];
                     av_assert1(mx     >= -32 && mx     <= 31);
                     av_assert1(my     >= -32 && my     <= 31);
                     av_assert1(pred_x >= -32 && pred_x <= 31);
                     av_assert1(pred_y >= -32 && pred_y <= 31);
-                    ff_h263_encode_motion(&s->m.pb, mx - pred_x, 1);
-                    ff_h263_encode_motion(&s->m.pb, my - pred_y, 1);
-                    s->reorder_pb[5] = s->m.pb;
+                    ff_h263_encode_motion(&s->reorder_pb[5], mx - pred_x, 1);
+                    ff_h263_encode_motion(&s->reorder_pb[5], my - pred_y, 1);
                     score[1]        += lambda * put_bits_count(&s->reorder_pb[5]);
 
                     dxy = (mx & 1) + 2 * (my & 1);



More information about the ffmpeg-cvslog mailing list