summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-21 14:30:19 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-21 14:30:19 +0100
commit97c8ecaadab4e246d969fadd44072025b64747e4 (patch)
tree0261278a3cfd7a66ff9875eb6d5722d68d375477 /libavcodec/h264.c
parent2cc08cad9ecf2d2524bc572a4e9bbe659b330d5c (diff)
parent56febc993b928ccc039a32158ca60b234c311875 (diff)
Merge commit '56febc993b928ccc039a32158ca60b234c311875'
* commit '56febc993b928ccc039a32158ca60b234c311875': h264: move the slice type variables into the per-slice context Conflicts: libavcodec/h264.c libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 102291cf2a..6397707d3c 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1072,7 +1072,7 @@ int ff_pred_weight_table(H264Context *h, H264SliceContext *sl)
}
}
}
- if (h->slice_type_nos != AV_PICTURE_TYPE_B)
+ if (sl->slice_type_nos != AV_PICTURE_TYPE_B)
break;
}
sl->use_weight = sl->use_weight || sl->use_weight_chroma;
@@ -1296,7 +1296,7 @@ int ff_h264_set_parameter_from_sps(H264Context *h)
return 0;
}
-int ff_set_ref_count(H264Context *h)
+int ff_set_ref_count(H264Context *h, H264SliceContext *sl)
{
int ref_count[2], list_count;
int num_ref_idx_active_override_flag;
@@ -1305,17 +1305,17 @@ int ff_set_ref_count(H264Context *h)
ref_count[0] = h->pps.ref_count[0];
ref_count[1] = h->pps.ref_count[1];
- if (h->slice_type_nos != AV_PICTURE_TYPE_I) {
+ if (sl->slice_type_nos != AV_PICTURE_TYPE_I) {
unsigned max[2];
max[0] = max[1] = h->picture_structure == PICT_FRAME ? 15 : 31;
- if (h->slice_type_nos == AV_PICTURE_TYPE_B)
+ if (sl->slice_type_nos == AV_PICTURE_TYPE_B)
h->direct_spatial_mv_pred = get_bits1(&h->gb);
num_ref_idx_active_override_flag = get_bits1(&h->gb);
if (num_ref_idx_active_override_flag) {
ref_count[0] = get_ue_golomb(&h->gb) + 1;
- if (h->slice_type_nos == AV_PICTURE_TYPE_B) {
+ if (sl->slice_type_nos == AV_PICTURE_TYPE_B) {
ref_count[1] = get_ue_golomb(&h->gb) + 1;
} else
// full range is spec-ok in this case, even for frames
@@ -1329,7 +1329,7 @@ int ff_set_ref_count(H264Context *h)
return AVERROR_INVALIDDATA;
}
- if (h->slice_type_nos == AV_PICTURE_TYPE_B)
+ if (sl->slice_type_nos == AV_PICTURE_TYPE_B)
list_count = 2;
else
list_count = 1;
@@ -1579,7 +1579,7 @@ again:
break;
if (h->sei_recovery_frame_cnt >= 0) {
- if (h->frame_num != h->sei_recovery_frame_cnt || hx->slice_type_nos != AV_PICTURE_TYPE_I)
+ if (h->frame_num != h->sei_recovery_frame_cnt || sl->slice_type_nos != AV_PICTURE_TYPE_I)
h->valid_recovery_point = 1;
if ( h->recovery_frame < 0