diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-01-17 22:28:46 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-03-21 11:27:13 +0100 |
commit | 56febc993b928ccc039a32158ca60b234c311875 (patch) | |
tree | cf903dfec7dc8d31049ad427fb9265363e1b1988 /libavcodec/h264_mvpred.h | |
parent | 5f390eef8ee2b8adab00c5d2923a52aa261eb999 (diff) | |
download | ffmpeg-56febc993b928ccc039a32158ca60b234c311875.tar.gz |
h264: move the slice type variables into the per-slice context
Diffstat (limited to 'libavcodec/h264_mvpred.h')
-rw-r--r-- | libavcodec/h264_mvpred.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h index abf26b6e4e..ce7716a2aa 100644 --- a/libavcodec/h264_mvpred.h +++ b/libavcodec/h264_mvpred.h @@ -423,22 +423,22 @@ static void fill_decode_neighbors(H264Context *h, H264SliceContext *sl, int mb_t sl->left_type[LBOT] = h->cur_pic.mb_type[left_xy[LBOT]]; if (FMO) { - if (h->slice_table[topleft_xy] != h->slice_num) + if (h->slice_table[topleft_xy] != sl->slice_num) sl->topleft_type = 0; - if (h->slice_table[top_xy] != h->slice_num) + if (h->slice_table[top_xy] != sl->slice_num) sl->top_type = 0; - if (h->slice_table[left_xy[LTOP]] != h->slice_num) + if (h->slice_table[left_xy[LTOP]] != sl->slice_num) sl->left_type[LTOP] = sl->left_type[LBOT] = 0; } else { - if (h->slice_table[topleft_xy] != h->slice_num) { + if (h->slice_table[topleft_xy] != sl->slice_num) { sl->topleft_type = 0; - if (h->slice_table[top_xy] != h->slice_num) + if (h->slice_table[top_xy] != sl->slice_num) sl->top_type = 0; - if (h->slice_table[left_xy[LTOP]] != h->slice_num) + if (h->slice_table[left_xy[LTOP]] != sl->slice_num) sl->left_type[LTOP] = sl->left_type[LBOT] = 0; } } - if (h->slice_table[topright_xy] != h->slice_num) + if (h->slice_table[topright_xy] != sl->slice_num) sl->topright_type = 0; } @@ -720,7 +720,7 @@ static void fill_decode_caches(H264Context *h, H264SliceContext *sl, int mb_type } AV_ZERO16(mvd_cache[2 + 8 * 0]); AV_ZERO16(mvd_cache[2 + 8 * 2]); - if (h->slice_type_nos == AV_PICTURE_TYPE_B) { + if (sl->slice_type_nos == AV_PICTURE_TYPE_B) { uint8_t *direct_cache = &h->direct_cache[scan8[0]]; uint8_t *direct_table = h->direct_table; fill_rectangle(direct_cache, 4, 4, 8, MB_TYPE_16x16 >> 1, 1); @@ -810,7 +810,7 @@ static void av_unused decode_mb_skip(H264Context *h, H264SliceContext *sl) if (MB_FIELD(h)) mb_type |= MB_TYPE_INTERLACED; - if (h->slice_type_nos == AV_PICTURE_TYPE_B) { + if (sl->slice_type_nos == AV_PICTURE_TYPE_B) { // just for fill_caches. pred_direct_motion will set the real mb_type mb_type |= MB_TYPE_L0L1 | MB_TYPE_DIRECT2 | MB_TYPE_SKIP; if (h->direct_spatial_mv_pred) { @@ -829,7 +829,7 @@ static void av_unused decode_mb_skip(H264Context *h, H264SliceContext *sl) write_back_motion(h, sl, mb_type); h->cur_pic.mb_type[mb_xy] = mb_type; h->cur_pic.qscale_table[mb_xy] = sl->qscale; - h->slice_table[mb_xy] = h->slice_num; + h->slice_table[mb_xy] = sl->slice_num; sl->prev_mb_skipped = 1; } |