aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dxva2_h264.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
commit95eb35f30513e335990ad0d5dca6ddc318477291 (patch)
tree468c7a537fd11445da96dcaddac3736ab5ef28c9 /libavcodec/dxva2_h264.c
parent7747726667c86877feed30c9e18460cb8e63f551 (diff)
downloadffmpeg-95eb35f30513e335990ad0d5dca6ddc318477291.tar.gz
h264: move the ref lists variables into the per-slice context
Diffstat (limited to 'libavcodec/dxva2_h264.c')
-rw-r--r--libavcodec/dxva2_h264.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index ef2fc3d898..fcd7b3a1f5 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -228,10 +228,10 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice,
slice->slice_type += 5;
slice->luma_log2_weight_denom = sl->luma_log2_weight_denom;
slice->chroma_log2_weight_denom = sl->chroma_log2_weight_denom;
- if (h->list_count > 0)
- slice->num_ref_idx_l0_active_minus1 = h->ref_count[0] - 1;
- if (h->list_count > 1)
- slice->num_ref_idx_l1_active_minus1 = h->ref_count[1] - 1;
+ if (sl->list_count > 0)
+ slice->num_ref_idx_l0_active_minus1 = sl->ref_count[0] - 1;
+ if (sl->list_count > 1)
+ slice->num_ref_idx_l1_active_minus1 = sl->ref_count[1] - 1;
slice->slice_alpha_c0_offset_div2 = h->slice_alpha_c0_offset / 2;
slice->slice_beta_offset_div2 = h->slice_beta_offset / 2;
slice->Reserved8Bits = 0;
@@ -239,8 +239,8 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice,
for (list = 0; list < 2; list++) {
unsigned i;
for (i = 0; i < FF_ARRAY_ELEMS(slice->RefPicList[list]); i++) {
- if (list < h->list_count && i < h->ref_count[list]) {
- const H264Picture *r = &h->ref_list[list][i];
+ if (list < sl->list_count && i < sl->ref_count[list]) {
+ const H264Picture *r = &sl->ref_list[list][i];
unsigned plane;
unsigned index;
if (ctx->workaround & FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO)
@@ -447,6 +447,7 @@ static int dxva2_h264_decode_slice(AVCodecContext *avctx,
static int dxva2_h264_end_frame(AVCodecContext *avctx)
{
H264Context *h = avctx->priv_data;
+ H264SliceContext *sl = &h->slice_ctx[0];
struct dxva2_picture_context *ctx_pic =
h->cur_pic_ptr->hwaccel_picture_private;
int ret;
@@ -458,7 +459,7 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx)
&ctx_pic->qm, sizeof(ctx_pic->qm),
commit_bitstream_and_slice_buffer);
if (!ret)
- ff_h264_draw_horiz_band(h, 0, h->avctx->height);
+ ff_h264_draw_horiz_band(h, sl, 0, h->avctx->height);
return ret;
}