avcodec/h261enc, msmpeg4: Avoid setting dc_scale_tables unnecessarily

It is unnecessary because ff_mpeg1_dc_scale_table is the default
for both dc_scale_tables.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
release/7.1
Andreas Rheinhardt 7 months ago
parent 65d5ccb808
commit 1745d12d67
  1. 3
      libavcodec/h261enc.c
  2. 4
      libavcodec/msmpeg4.c

@ -34,7 +34,6 @@
#include "mpegvideo.h"
#include "h261.h"
#include "h261enc.h"
#include "mpegvideodata.h"
#include "mpegvideoenc.h"
static uint8_t uni_h261_rl_len [64*64*2*2];
@ -388,8 +387,6 @@ av_cold int ff_h261_encode_init(MpegEncContext *s)
s->min_qcoeff = -127;
s->max_qcoeff = 127;
s->y_dc_scale_table =
s->c_dc_scale_table = ff_mpeg1_dc_scale_table;
s->ac_esc_length = 6+6+8;
s->intra_ac_vlc_length = s->inter_ac_vlc_length = uni_h261_rl_len;

@ -41,7 +41,6 @@
#include "mpeg4videodata.h"
#include "msmpeg4data.h"
#include "msmpeg4_vc1_data.h"
#include "mpegvideodata.h"
/*
* You can also call this codec: MPEG-4 with a twist!
@ -122,8 +121,7 @@ av_cold void ff_msmpeg4_common_init(MpegEncContext *s)
switch(s->msmpeg4_version){
case MSMP4_V1:
case MSMP4_V2:
s->y_dc_scale_table=
s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
// Correct *_dc_scale_tables (ff_mpeg1_dc_scale_table) is the default
break;
case MSMP4_V3:
if(s->workaround_bugs){

Loading…
Cancel
Save