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>
This commit is contained in:
Andreas Rheinhardt 2024-06-13 08:46:56 +02:00
parent 65d5ccb808
commit 1745d12d67
2 changed files with 1 additions and 6 deletions

View File

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

View File

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