]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264_cabac.c
lavc: Add spherical packet side data API
[ffmpeg] / libavcodec / h264_cabac.c
index 80e438985ac9d5fff3f4a4e35816b5f51b642cef..b28e486e52e960995128ed74032f1c4436897c4f 100644 (file)
 #include "cabac_functions.h"
 #include "internal.h"
 #include "avcodec.h"
-#include "h264.h"
+#include "h264dec.h"
 #include "h264data.h"
 #include "h264_mvpred.h"
 #include "mpegutils.h"
 
 #if ARCH_X86
-#include "x86/h264_i386.h"
+#include "x86/h264_cabac.c"
 #endif
 
 #include <assert.h>
@@ -2340,7 +2340,7 @@ decode_intra_mb:
             }
         }
         if (sl->top_type && !IS_8x8DCT(sl->top_type)){
-            uint32_t top_empty = CABAC(h) && !IS_INTRA(mb_type) ? 0 : 0x40404040;
+            uint32_t top_empty = !IS_INTRA(mb_type) ? 0 : 0x40404040;
             AV_WN32A(&nnz_cache[4+8* 0], top_empty);
             AV_WN32A(&nnz_cache[4+8* 5], top_empty);
             AV_WN32A(&nnz_cache[4+8*10], top_empty);
@@ -2385,8 +2385,8 @@ decode_intra_mb:
                 if (sl->qscale < 0) sl->qscale += max_qp + 1;
                 else                sl->qscale -= max_qp + 1;
             }
-            sl->chroma_qp[0] = get_chroma_qp(h, 0, sl->qscale);
-            sl->chroma_qp[1] = get_chroma_qp(h, 1, sl->qscale);
+            sl->chroma_qp[0] = get_chroma_qp(h->ps.pps, 0, sl->qscale);
+            sl->chroma_qp[1] = get_chroma_qp(h->ps.pps, 1, sl->qscale);
         }else
             sl->last_qscale_diff=0;