diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 14:30:19 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-21 14:30:19 +0100 |
commit | 97c8ecaadab4e246d969fadd44072025b64747e4 (patch) | |
tree | 0261278a3cfd7a66ff9875eb6d5722d68d375477 /libavcodec/dxva2_h264.c | |
parent | 2cc08cad9ecf2d2524bc572a4e9bbe659b330d5c (diff) | |
parent | 56febc993b928ccc039a32158ca60b234c311875 (diff) | |
download | ffmpeg-streaming-97c8ecaadab4e246d969fadd44072025b64747e4.zip ffmpeg-streaming-97c8ecaadab4e246d969fadd44072025b64747e4.tar.gz |
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/dxva2_h264.c')
-rw-r--r-- | libavcodec/dxva2_h264.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index cc57153..a964a4c 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -223,8 +223,8 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, slice->first_mb_in_slice = (h->mb_y >> FIELD_OR_MBAFF_PICTURE(h)) * h->mb_width + h->mb_x; slice->NumMbsForSlice = 0; /* XXX it is set once we have all slices */ slice->BitOffsetToSliceData = get_bits_count(&h->gb); - slice->slice_type = ff_h264_get_slice_type(h); - if (h->slice_type_fixed) + slice->slice_type = ff_h264_get_slice_type(sl); + if (sl->slice_type_fixed) slice->slice_type += 5; slice->luma_log2_weight_denom = sl->luma_log2_weight_denom; slice->chroma_log2_weight_denom = sl->chroma_log2_weight_denom; @@ -278,7 +278,7 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice, slice->slice_qs_delta = 0; /* XXX not implemented by FFmpeg */ slice->slice_qp_delta = sl->qscale - h->pps.init_qp; slice->redundant_pic_cnt = h->redundant_pic_count; - if (h->slice_type == AV_PICTURE_TYPE_B) + if (sl->slice_type == AV_PICTURE_TYPE_B) slice->direct_spatial_mv_pred_flag = h->direct_spatial_mv_pred; slice->cabac_init_idc = h->pps.cabac ? h->cabac_init_idc : 0; if (h->deblocking_filter < 2) @@ -417,6 +417,7 @@ static int dxva2_h264_decode_slice(AVCodecContext *avctx, uint32_t size) { const H264Context *h = avctx->priv_data; + const H264SliceContext *sl = &h->slice_ctx[0]; struct dxva_context *ctx = avctx->hwaccel_context; const H264Picture *current_picture = h->cur_pic_ptr; struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; @@ -438,7 +439,7 @@ static int dxva2_h264_decode_slice(AVCodecContext *avctx, &ctx_pic->pp, position, size); ctx_pic->slice_count++; - if (h->slice_type != AV_PICTURE_TYPE_I && h->slice_type != AV_PICTURE_TYPE_SI) + if (sl->slice_type != AV_PICTURE_TYPE_I && sl->slice_type != AV_PICTURE_TYPE_SI) ctx_pic->pp.wBitFields &= ~(1 << 15); /* Set IntraPicFlag to 0 */ return 0; } |