changeset 11298:b79f22337b6f libavcodec

Move init of right side of ref_cache from fill_caches() to init_the_darn_decoder().
author michael
date Fri, 26 Feb 2010 03:27:52 +0000
parents b5836ef8e74e
children 14535f3deafb
files h264.c h264.h
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/h264.c	Fri Feb 26 02:54:03 2010 +0000
+++ b/h264.c	Fri Feb 26 03:27:52 2010 +0000
@@ -872,6 +872,10 @@
         avctx->ticks_per_frame = 2;
     }
 
+    h->ref_cache[0][scan8[5 ]+1] = h->ref_cache[0][scan8[7 ]+1] = h->ref_cache[0][scan8[13]+1] =
+    h->ref_cache[1][scan8[5 ]+1] = h->ref_cache[1][scan8[7 ]+1] = h->ref_cache[1][scan8[13]+1] = PART_NOT_AVAILABLE;
+
+
     if(avctx->extradata_size > 0 && avctx->extradata && *(char *)avctx->extradata == 1){
         int i, cnt, nalsize;
         unsigned char *p = avctx->extradata;
--- a/h264.h	Fri Feb 26 02:54:03 2010 +0000
+++ b/h264.h	Fri Feb 26 03:27:52 2010 +0000
@@ -1037,9 +1037,6 @@
                 continue;
 
             if(!(mb_type&(MB_TYPE_SKIP|MB_TYPE_DIRECT2))) {
-            h->ref_cache[list][scan8[5 ]+1] =
-            h->ref_cache[list][scan8[7 ]+1] =
-            h->ref_cache[list][scan8[13]+1] =  //FIXME remove past 3 (init somewhere else)
             h->ref_cache[list][scan8[4 ]] =
             h->ref_cache[list][scan8[12]] = PART_NOT_AVAILABLE;
             AV_ZERO32(h->mv_cache [list][scan8[4 ]]);