aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-08 14:40:04 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-12 18:29:10 +0200
commit5da07f18e5cb0a65b2eb5cd7308a80aa2749379c (patch)
treefa52fee8b913b1bb0c80bff7a66e2b3eaf243980
parenteffc7676e39174171413c332df87f9c973aa0315 (diff)
downloadffmpeg-5da07f18e5cb0a65b2eb5cd7308a80aa2749379c.tar.gz
avcodec/msmpeg4enc: Remove dead code for inexistent VC-1 encoder
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/msmpeg4enc.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/libavcodec/msmpeg4enc.c b/libavcodec/msmpeg4enc.c
index 59a18532c2..7147015042 100644
--- a/libavcodec/msmpeg4enc.c
+++ b/libavcodec/msmpeg4enc.c
@@ -492,8 +492,7 @@ void ff_msmpeg4_encode_mb(MpegEncContext * s,
static void msmpeg4_encode_dc(MpegEncContext * s, int level, int n, int *dir_ptr)
{
int sign, code;
- int pred, av_uninit(extquant);
- int extrabits = 0;
+ int pred;
int16_t *dc_val;
pred = ff_msmpeg4_pred_dc(s, n, &dc_val, dir_ptr);
@@ -527,15 +526,6 @@ static void msmpeg4_encode_dc(MpegEncContext * s, int level, int n, int *dir_ptr
code = level;
if (code > DC_MAX)
code = DC_MAX;
- else if( s->msmpeg4_version>=6 ) {
- if( s->qscale == 1 ) {
- extquant = (level + 3) & 0x3;
- code = ((level+3)>>2);
- } else if( s->qscale == 2 ) {
- extquant = (level + 1) & 0x1;
- code = ((level+1)>>1);
- }
- }
if (s->dc_table_index == 0) {
if (n < 4) {
@@ -551,13 +541,8 @@ static void msmpeg4_encode_dc(MpegEncContext * s, int level, int n, int *dir_ptr
}
}
- if(s->msmpeg4_version>=6 && s->qscale<=2)
- extrabits = 3 - s->qscale;
-
if (code == DC_MAX)
- put_bits(&s->pb, 8 + extrabits, level);
- else if(extrabits > 0)//== VC1 && s->qscale<=2
- put_bits(&s->pb, extrabits, extquant);
+ put_bits(&s->pb, 8, level);
if (level != 0) {
put_bits(&s->pb, 1, sign);
@@ -596,7 +581,7 @@ void ff_msmpeg4_encode_block(MpegEncContext * s, int16_t * block, int n)
}
/* recalculate block_last_index for M$ wmv1 */
- if(s->msmpeg4_version>=4 && s->msmpeg4_version<6 && s->block_last_index[n]>0){
+ if (s->msmpeg4_version >= 4 && s->block_last_index[n] > 0) {
for(last_index=63; last_index>=0; last_index--){
if(block[scantable[last_index]]) break;
}
@@ -656,7 +641,7 @@ void ff_msmpeg4_encode_block(MpegEncContext * s, int16_t * block, int n)
s->esc3_run_length= 6;
//ESCLVLSZ + ESCRUNSZ
if(s->qscale<8)
- put_bits(&s->pb, 6 + (s->msmpeg4_version>=6), 3);
+ put_bits(&s->pb, 6, 3);
else
put_bits(&s->pb, 8, 3);
}