aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-01-29 05:05:59 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-02-13 19:49:29 +0100
commit18e75f493d8b6f582d6691b9ed19c5ada04f1051 (patch)
tree07c656b969d72809e92b3538fae726a9229a540a /libavcodec
parent6c2ce1695485b73599afada454653889047580e7 (diff)
downloadffmpeg-18e75f493d8b6f582d6691b9ed19c5ada04f1051.tar.gz
avcodec/mpegvideo: Remove write-only [fb]_code
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ituh263enc.c1
-rw-r--r--libavcodec/mpeg12enc.c5
-rw-r--r--libavcodec/mpeg4videoenc.c8
-rw-r--r--libavcodec/mpegvideo.h2
-rw-r--r--libavcodec/mpegvideo_enc.c8
5 files changed, 0 insertions, 24 deletions
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 11d8873253..8bedecb36e 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -679,7 +679,6 @@ void ff_h263_encode_mb(MpegEncContext * s,
if(interleaved_stats){
if (!s->mb_intra) {
s->p_tex_bits+= get_bits_diff(s);
- s->f_count++;
}else{
s->i_tex_bits+= get_bits_diff(s);
s->i_count++;
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 7ffbfbca5b..03692994b5 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -938,7 +938,6 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
put_sbits(&s->pb, 2, cbp);
}
}
- s->f_count++;
} else {
if (s->mv_type == MV_TYPE_16X16) {
if (cbp) { // With coded bloc pattern
@@ -969,7 +968,6 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
s->last_mv[0][1][0] = s->mv[0][0][0];
s->last_mv[0][0][1] =
s->last_mv[0][1][1] = s->mv[0][0][1];
- s->f_count++;
}
if (s->mv_dir & MV_DIR_BACKWARD) {
mpeg1_encode_motion(s,
@@ -982,7 +980,6 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
s->last_mv[1][1][0] = s->mv[1][0][0];
s->last_mv[1][0][1] =
s->last_mv[1][1][1] = s->mv[1][0][1];
- s->b_count++;
}
} else {
av_assert2(s->mv_type == MV_TYPE_FIELD);
@@ -1015,7 +1012,6 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
s->last_mv[0][i][0] = s->mv[0][i][0];
s->last_mv[0][i][1] = s->mv[0][i][1] * 2;
}
- s->f_count++;
}
if (s->mv_dir & MV_DIR_BACKWARD) {
for (i = 0; i < 2; i++) {
@@ -1029,7 +1025,6 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
s->last_mv[1][i][0] = s->mv[1][i][0];
s->last_mv[1][i][1] = s->mv[1][i][1] * 2;
}
- s->b_count++;
}
}
s->mv_bits += get_bits_diff(s);
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 1f67fafe34..094c4e5fb3 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -564,8 +564,6 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
if (!mb_type) {
av_assert2(s->mv_dir & MV_DIRECT);
ff_h263_encode_motion_vector(s, motion_x, motion_y, 1);
- s->b_count++;
- s->f_count++;
} else {
av_assert2(mb_type > 0 && mb_type < 4);
if (s->mv_type != MV_TYPE_FIELD) {
@@ -578,7 +576,6 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
s->last_mv[0][1][0] = s->mv[0][0][0];
s->last_mv[0][0][1] =
s->last_mv[0][1][1] = s->mv[0][0][1];
- s->f_count++;
}
if (s->mv_dir & MV_DIR_BACKWARD) {
ff_h263_encode_motion_vector(s,
@@ -589,7 +586,6 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
s->last_mv[1][1][0] = s->mv[1][0][0];
s->last_mv[1][0][1] =
s->last_mv[1][1][1] = s->mv[1][0][1];
- s->b_count++;
}
} else {
if (s->mv_dir & MV_DIR_FORWARD) {
@@ -609,7 +605,6 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
s->last_mv[0][i][0] = s->mv[0][i][0];
s->last_mv[0][i][1] = s->mv[0][i][1] * 2;
}
- s->f_count++;
}
if (s->mv_dir & MV_DIR_BACKWARD) {
for (i = 0; i < 2; i++) {
@@ -620,7 +615,6 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
s->last_mv[1][i][0] = s->mv[1][i][0];
s->last_mv[1][i][1] = s->mv[1][i][1] * 2;
}
- s->b_count++;
}
}
}
@@ -796,8 +790,6 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
if (interleaved_stats)
s->p_tex_bits += get_bits_diff(s);
-
- s->f_count++;
}
} else {
int cbp;
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index c4ac7bc966..d96cd7f1ec 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -327,8 +327,6 @@ typedef struct MpegEncContext {
int i_tex_bits;
int p_tex_bits;
int i_count;
- int f_count;
- int b_count;
int skip_count;
int misc_bits; ///< cbp, mb_type
int last_bits; ///< temp var used for calculating the above vars
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 8d2acdc5b1..9c2243eed7 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2433,8 +2433,6 @@ static inline void copy_context_before_encode(MpegEncContext *d, MpegEncContext
d->i_tex_bits= s->i_tex_bits;
d->p_tex_bits= s->p_tex_bits;
d->i_count= s->i_count;
- d->f_count= s->f_count;
- d->b_count= s->b_count;
d->skip_count= s->skip_count;
d->misc_bits= s->misc_bits;
d->last_bits= 0;
@@ -2462,8 +2460,6 @@ static inline void copy_context_after_encode(MpegEncContext *d, MpegEncContext *
d->i_tex_bits= s->i_tex_bits;
d->p_tex_bits= s->p_tex_bits;
d->i_count= s->i_count;
- d->f_count= s->f_count;
- d->b_count= s->b_count;
d->skip_count= s->skip_count;
d->misc_bits= s->misc_bits;
@@ -2767,8 +2763,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
s->i_tex_bits=0;
s->p_tex_bits=0;
s->i_count=0;
- s->f_count=0;
- s->b_count=0;
s->skip_count=0;
for(i=0; i<3; i++){
@@ -3398,8 +3392,6 @@ static void merge_context_after_encode(MpegEncContext *dst, MpegEncContext *src)
MERGE(i_tex_bits);
MERGE(p_tex_bits);
MERGE(i_count);
- MERGE(f_count);
- MERGE(b_count);
MERGE(skip_count);
MERGE(misc_bits);
MERGE(current_picture.encoding_error[0]);