summaryrefslogtreecommitdiff
path: root/libavcodec/svq3.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-01-17 22:28:46 +0100
committerAnton Khirnov <anton@khirnov.net>2015-03-21 11:27:13 +0100
commit56febc993b928ccc039a32158ca60b234c311875 (patch)
treecf903dfec7dc8d31049ad427fb9265363e1b1988 /libavcodec/svq3.c
parent5f390eef8ee2b8adab00c5d2923a52aa261eb999 (diff)
h264: move the slice type variables into the per-slice context
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r--libavcodec/svq3.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 163a49eeda..e1dbb894fe 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -817,7 +817,7 @@ static int svq3_decode_slice_header(AVCodecContext *avctx)
return -1;
}
- h->slice_type = golomb_to_pict_type[slice_id];
+ sl->slice_type = golomb_to_pict_type[slice_id];
if ((header & 0x9F) == 2) {
i = (h->mb_num < 64) ? 6 : (1 + av_log2(h->mb_num - 1));
@@ -828,8 +828,8 @@ static int svq3_decode_slice_header(AVCodecContext *avctx)
h->mb_skip_run = 0;
}
- h->slice_num = get_bits(&h->gb, 8);
- sl->qscale = get_bits(&h->gb, 5);
+ sl->slice_num = get_bits(&h->gb, 8);
+ sl->qscale = get_bits(&h->gb, 5);
s->adaptive_quant = get_bits1(&h->gb);
/* unknown fields */
@@ -1134,7 +1134,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
if (svq3_decode_slice_header(avctx))
return -1;
- h->pict_type = h->slice_type;
+ h->pict_type = sl->slice_type;
if (h->pict_type != AV_PICTURE_TYPE_B)
FFSWAP(H264Picture*, s->next_pic, s->last_pic);
@@ -1198,7 +1198,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
"%c hpel:%d, tpel:%d aqp:%d qp:%d, slice_num:%02X\n",
av_get_picture_type_char(h->pict_type),
s->halfpel_flag, s->thirdpel_flag,
- s->adaptive_quant, h->slice_ctx[0].qscale, h->slice_num);
+ s->adaptive_quant, h->slice_ctx[0].qscale, sl->slice_num);
if (avctx->skip_frame >= AVDISCARD_NONREF && h->pict_type == AV_PICTURE_TYPE_B ||
avctx->skip_frame >= AVDISCARD_NONKEY && h->pict_type != AV_PICTURE_TYPE_I ||
@@ -1213,7 +1213,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
}
if (h->pict_type == AV_PICTURE_TYPE_B) {
- h->frame_num_offset = h->slice_num - h->prev_frame_num;
+ h->frame_num_offset = sl->slice_num - h->prev_frame_num;
if (h->frame_num_offset < 0)
h->frame_num_offset += 256;
@@ -1224,7 +1224,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
}
} else {
h->prev_frame_num = h->frame_num;
- h->frame_num = h->slice_num;
+ h->frame_num = sl->slice_num;
h->prev_frame_num_offset = h->frame_num - h->prev_frame_num;
if (h->prev_frame_num_offset < 0)