1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/mpegvideo: Remove write-only [fb]_code

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-01-29 05:05:59 +01:00
parent 6c2ce16954
commit 18e75f493d
5 changed files with 0 additions and 24 deletions

View File

@ -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++;

View File

@ -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);

View File

@ -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;

View File

@ -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

View File

@ -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]);