]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_mvpred.h
Check for huffman tree building error in vp6 decoder.
[ffmpeg] / libavcodec / h264_mvpred.h
index d2677eaa6c39aa67ab19b106dd4bdf8964961ea6..b46d0985a83c23af06a38883befb0941b60b600e 100644 (file)
@@ -510,7 +510,7 @@ static void fill_decode_caches(H264Context *h, int mb_type){
     if(top_type){
         nnz = h->non_zero_count[top_xy];
         AV_COPY32(&nnz_cache[4+8* 0], &nnz[4*3]);
-        if(CHROMA444){
+        if(!s->chroma_y_shift){
             AV_COPY32(&nnz_cache[4+8* 5], &nnz[4* 7]);
             AV_COPY32(&nnz_cache[4+8*10], &nnz[4*11]);
         }else{
@@ -534,6 +534,11 @@ static void fill_decode_caches(H264Context *h, int mb_type){
                 nnz_cache[3+8* 7 + 2*8*i]= nnz[left_block[8+1+2*i]+4*4];
                 nnz_cache[3+8*11 + 2*8*i]= nnz[left_block[8+0+2*i]+8*4];
                 nnz_cache[3+8*12 + 2*8*i]= nnz[left_block[8+1+2*i]+8*4];
+            }else if(CHROMA422) {
+                nnz_cache[3+8* 6 + 2*8*i]= nnz[left_block[8+0+2*i]-2+4*4];
+                nnz_cache[3+8* 7 + 2*8*i]= nnz[left_block[8+1+2*i]-2+4*4];
+                nnz_cache[3+8*11 + 2*8*i]= nnz[left_block[8+0+2*i]-2+8*4];
+                nnz_cache[3+8*12 + 2*8*i]= nnz[left_block[8+1+2*i]-2+8*4];
             }else{
                 nnz_cache[3+8* 6 +   8*i]= nnz[left_block[8+4+2*i]];
                 nnz_cache[3+8*11 +   8*i]= nnz[left_block[8+5+2*i]];