summaryrefslogtreecommitdiff
path: root/libavcodec/mpegvideo_enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-07-07 15:04:05 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-07 15:08:55 +0200
commit462c6cdb8ed256d2063815b67ca4d14e62e25802 (patch)
tree324761563d86a2e3e2e8a47dc28e53a407bf8857 /libavcodec/mpegvideo_enc.c
parent8324bd51867fdc8a79cbdb5850d36bfd0c741d3f (diff)
parent8d686ca59db14900ad5c12b547fb8a7afc8b0b94 (diff)
Merge commit '8d686ca59db14900ad5c12b547fb8a7afc8b0b94'
* commit '8d686ca59db14900ad5c12b547fb8a7afc8b0b94': dsputil: Split off *_8x8basis to a separate context Conflicts: libavcodec/dsputil.c libavcodec/mpegvideo_enc.c libavcodec/x86/dsputilenc_mmx.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_enc.c')
-rw-r--r--libavcodec/mpegvideo_enc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 7dbe2a4996..4a453f3723 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -818,6 +818,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
if (ff_MPV_common_init(s) < 0)
return -1;
+ ff_mpegvideoencdsp_init(&s->mpvencdsp, avctx);
ff_qpeldsp_init(&s->qdsp);
s->avctx->coded_frame = s->current_picture.f;
@@ -4090,7 +4091,7 @@ STOP_TIMER("memset rem[]")}
run_tab[rle_index++]=run;
run=0;
- s->dsp.add_8x8basis(rem, basis[j], coeff);
+ s->mpvencdsp.add_8x8basis(rem, basis[j], coeff);
}else{
run++;
}
@@ -4104,7 +4105,7 @@ STOP_TIMER("init rem[]")
{START_TIMER
#endif
for(;;){
- int best_score=s->dsp.try_8x8basis(rem, weight, basis[0], 0);
+ int best_score = s->mpvencdsp.try_8x8basis(rem, weight, basis[0], 0);
int best_coeff=0;
int best_change=0;
int run2, best_unquant_change=0, analyze_gradient;
@@ -4148,7 +4149,8 @@ STOP_TIMER("dct")}
if(new_coeff >= 2048 || new_coeff < 0)
continue;
- score= s->dsp.try_8x8basis(rem, weight, basis[0], new_coeff - old_coeff);
+ score = s->mpvencdsp.try_8x8basis(rem, weight, basis[0],
+ new_coeff - old_coeff);
if(score<best_score){
best_score= score;
best_coeff= 0;
@@ -4271,7 +4273,8 @@ STOP_TIMER("dct")}
unquant_change= new_coeff - old_coeff;
av_assert2((score < 100*lambda && score > -100*lambda) || lambda==0);
- score+= s->dsp.try_8x8basis(rem, weight, basis[j], unquant_change);
+ score += s->mpvencdsp.try_8x8basis(rem, weight, basis[j],
+ unquant_change);
if(score<best_score){
best_score= score;
best_coeff= i;
@@ -4345,7 +4348,7 @@ if(256*256*256*64 % count == 0){
}
}
- s->dsp.add_8x8basis(rem, basis[j], best_unquant_change);
+ s->mpvencdsp.add_8x8basis(rem, basis[j], best_unquant_change);
}else{
break;
}