aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-13 08:46:56 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-06-20 18:58:39 +0200
commit1745d12d6741dc1c43442c58bd2f5d78aac6fd28 (patch)
tree0af8eaa7b01dbe3799598374aeffd964555a14f3
parent65d5ccb808ec93de46a2458ea8cc082ce4460f34 (diff)
downloadffmpeg-1745d12d6741dc1c43442c58bd2f5d78aac6fd28.tar.gz
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>
-rw-r--r--libavcodec/h261enc.c3
-rw-r--r--libavcodec/msmpeg4.c4
2 files changed, 1 insertions, 6 deletions
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index 01bce533a0..dd4419ec8c 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.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;
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 50fd581a83..872dc8db67 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -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){