aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/svq1.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-05-12 02:19:12 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-05-12 02:19:12 +0000
commit3178a8658450672229ac7602104f9b849ac66d55 (patch)
tree3812ac451f7fc17a8ecc766f4113be9c293f8d45 /libavcodec/svq1.c
parent5e13a73006958c201a6aa07de9b8cf6040616f97 (diff)
downloadffmpeg-3178a8658450672229ac7602104f9b849ac66d55.tar.gz
support skiped blocks in SVQ1
Originally committed as revision 3127 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/svq1.c')
-rw-r--r--libavcodec/svq1.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/libavcodec/svq1.c b/libavcodec/svq1.c
index 1bf65217ec..eaf0c3ab8d 100644
--- a/libavcodec/svq1.c
+++ b/libavcodec/svq1.c
@@ -1649,13 +1649,20 @@ av_log(s->avctx, AV_LOG_INFO, "* level 5 vector @ %d, %d:\n", x * 16, y * 16);
score[1]+= encode_block(s, src+16*x, temp+16, decoded, stride, 5, 64, lambda, 0);
best= score[1] <= score[0];
+
+ vlc= svq1_block_type_vlc[SVQ1_BLOCK_SKIP];
+ score[2]= s->dsp.sse[0](NULL, src+16*x, ref, stride, 16);
+ score[2]+= vlc[1]*lambda;
+ if(score[2] < score[best] && mx==0 && my==0){
+ best=2;
+ s->dsp.put_pixels_tab[0][0](decoded, ref, stride, 16);
+ for(i=0; i<6; i++){
+ count[2][i]=0;
+ }
+ put_bits(&s->pb, vlc[1], vlc[0]);
+ }
}
-#if 0
- if(skiped_score <= score[best]){
- best=3;
- ...
- }
-#endif
+
if(best==1){
for(i=0; i<6; i++){
count[1][i]= put_bits_count(&s->reorder_pb[i]);