[FFmpeg-cvslog] avcodec/h261enc, msmpeg4: Avoid setting dc_scale_tables unnecessarily
Andreas Rheinhardt
git at videolan.org
Thu Jun 20 20:01:10 EEST 2024
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Thu Jun 13 08:46:56 2024 +0200| [1745d12d6741dc1c43442c58bd2f5d78aac6fd28] | committer: Andreas Rheinhardt
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 at outlook.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1745d12d6741dc1c43442c58bd2f5d78aac6fd28
---
libavcodec/h261enc.c | 3 ---
libavcodec/msmpeg4.c | 4 +---
2 files changed, 1 insertion(+), 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){
More information about the ffmpeg-cvslog
mailing list