[FFmpeg-cvslog] avcodec/mpegvideo_enc: Remove unused function parameters
Andreas Rheinhardt
git at videolan.org
Sun Feb 13 21:26:05 EET 2022
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Sat Jan 29 06:23:41 2022 +0100| [cbf6cd91e6e155a9867030765eaf6d32b1b425e3] | committer: Andreas Rheinhardt
avcodec/mpegvideo_enc: Remove unused function parameters
Seems to have been always unused since these functions were introduced
in 1f0cd30fd9b656122436ecd625656a04f6235fb3.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbf6cd91e6e155a9867030765eaf6d32b1b425e3
---
libavcodec/mpegvideo_enc.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 5c8e13947f..55002db31e 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2418,7 +2418,9 @@ static av_always_inline void encode_mb(MpegEncContext *s, int motion_x, int moti
encode_mb_internal(s, motion_x, motion_y, 16, 16, 12, 0, 0, CHROMA_444);
}
-static inline void copy_context_before_encode(MpegEncContext *d, MpegEncContext *s, int type){
+static inline void copy_context_before_encode(MpegEncContext *d,
+ const MpegEncContext *s)
+{
int i;
memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop?
@@ -2444,7 +2446,9 @@ static inline void copy_context_before_encode(MpegEncContext *d, MpegEncContext
d->esc3_level_length= s->esc3_level_length;
}
-static inline void copy_context_after_encode(MpegEncContext *d, MpegEncContext *s, int type){
+static inline void copy_context_after_encode(MpegEncContext *d,
+ const MpegEncContext *s)
+{
int i;
memcpy(d->mv, s->mv, 2*4*2*sizeof(int));
@@ -2488,7 +2492,7 @@ static inline void encode_mb_hq(MpegEncContext *s, MpegEncContext *backup, MpegE
int score;
uint8_t *dest_backup[3];
- copy_context_before_encode(s, backup, type);
+ copy_context_before_encode(s, backup);
s->block= s->blocks[*next_block];
s->pb= pb[*next_block];
@@ -2528,7 +2532,7 @@ static inline void encode_mb_hq(MpegEncContext *s, MpegEncContext *backup, MpegE
*dmin= score;
*next_block^=1;
- copy_context_after_encode(best, s, type);
+ copy_context_after_encode(best, s);
}
}
@@ -2948,7 +2952,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
int next_block=0;
int pb_bits_count, pb2_bits_count, tex_pb_bits_count;
- copy_context_before_encode(&backup_s, s, -1);
+ copy_context_before_encode(&backup_s, s);
backup_s.pb= s->pb;
best_s.data_partitioning= s->data_partitioning;
best_s.partitioned_frame= s->partitioned_frame;
@@ -3182,7 +3186,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
s->current_picture.qscale_table[xy] = best_s.qscale;
- copy_context_after_encode(s, &best_s, -1);
+ copy_context_after_encode(s, &best_s);
pb_bits_count= put_bits_count(&s->pb);
flush_put_bits(&s->pb);
More information about the ffmpeg-cvslog
mailing list