changeset 2018:552ae05eb513 libavcodec

support skiped blocks in SVQ1
author michael
date Wed, 12 May 2004 02:19:12 +0000
parents f089d25c82f0
children 93edc9073ffc
files svq1.c
diffstat 1 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/svq1.c	Wed May 12 02:03:24 2004 +0000
+++ b/svq1.c	Wed May 12 02:19:12 2004 +0000
@@ -1649,13 +1649,20 @@
                     
                     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]);