]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h264.c
Merge commit '5c4b98de4d101ea715ef86847306a510afd0db0c'
[ffmpeg] / libavcodec / h264.c
index a68a911cd4e8075196e3a03142cb38d390759441..dd324a9f9d6140c12182893a36d48dcf797d584d 100644 (file)
@@ -90,16 +90,16 @@ static void h264_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type,
     fill_rectangle(&sl->ref_cache[0][scan8[0]], 4, 4, 8, ref, 1);
     fill_rectangle(sl->mv_cache[0][scan8[0]], 4, 4, 8,
                    pack16to32((*mv)[0][0][0], (*mv)[0][0][1]), 4);
-    h->mb_mbaff =
-    h->mb_field_decoding_flag = 0;
+    sl->mb_mbaff =
+    sl->mb_field_decoding_flag = 0;
     ff_h264_hl_decode_mb(h, &h->slice_ctx[0]);
 }
 
-void ff_h264_draw_horiz_band(H264Context *h, H264SliceContext *sl,
+void ff_h264_draw_horiz_band(const H264Context *h, H264SliceContext *sl,
                              int y, int height)
 {
     AVCodecContext *avctx = h->avctx;
-    AVFrame *cur  = &h->cur_pic.f;
+    const AVFrame   *cur  = &h->cur_pic.f;
     AVFrame *last = sl->ref_list[0][0].f.data[0] ? &sl->ref_list[0][0].f : NULL;
     const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
     int vshift = desc->log2_chroma_h;
@@ -115,7 +115,7 @@ void ff_h264_draw_horiz_band(H264Context *h, H264SliceContext *sl,
         return;
 
     if (avctx->draw_horiz_band) {
-        AVFrame *src;
+        const AVFrame *src;
         int offset[AV_NUM_DATA_POINTERS];
         int i;
 
@@ -144,7 +144,7 @@ void ff_h264_draw_horiz_band(H264Context *h, H264SliceContext *sl,
  * Check if the top & left blocks are available if needed and
  * change the dc mode so it only uses the available blocks.
  */
-int ff_h264_check_intra4x4_pred_mode(H264Context *h, H264SliceContext *sl)
+int ff_h264_check_intra4x4_pred_mode(const H264Context *h, H264SliceContext *sl)
 {
     static const int8_t top[12] = {
         -1, 0, LEFT_DC_PRED, -1, -1, -1, -1, -1, 0
@@ -191,7 +191,7 @@ int ff_h264_check_intra4x4_pred_mode(H264Context *h, H264SliceContext *sl)
  * Check if the top & left blocks are available if needed and
  * change the dc mode so it only uses the available blocks.
  */
-int ff_h264_check_intra_pred_mode(H264Context *h, H264SliceContext *sl,
+int ff_h264_check_intra_pred_mode(const H264Context *h, H264SliceContext *sl,
                                   int mode, int is_chroma)
 {
     static const int8_t top[4]  = { LEFT_DC_PRED8x8, 1, -1, -1 };