Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-21 15:13:12 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-03-21 15:13:12 +0300
commit756dc7bd18b88fdde5c06c701375a6570500e58c (patch)
tree731502f3a57bdcc81d35202cc50da7770f38ef68 /libavcodec/dxva2_h264.c
parent06c70d45373dedc600f28e345685b130b60203c1 (diff)
parent92c6c2a605f9b077b8fbc25b7ed6625541232b87 (diff)
Merge commit '92c6c2a605f9b077b8fbc25b7ed6625541232b87'
* commit '92c6c2a605f9b077b8fbc25b7ed6625541232b87': h264: split weighted pred-related vars into per-slice context Conflicts: libavcodec/h264.c libavcodec/h264.h libavcodec/h264_mb.c libavcodec/svq3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dxva2_h264.c')
-rw-r--r--libavcodec/dxva2_h264.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index 6deccc3e9a..c5dccfe749 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -211,6 +211,7 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice,
const DXVA_PicParams_H264 *pp, unsigned position, unsigned size)
{
const H264Context *h = avctx->priv_data;
+ H264SliceContext *sl = &h->slice_ctx[0];
struct dxva_context *ctx = avctx->hwaccel_context;
unsigned list;
@@ -225,8 +226,8 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice,
slice->slice_type = ff_h264_get_slice_type(h);
if (h->slice_type_fixed)
slice->slice_type += 5;
- slice->luma_log2_weight_denom = h->luma_log2_weight_denom;
- slice->chroma_log2_weight_denom = h->chroma_log2_weight_denom;
+ 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)
@@ -250,15 +251,15 @@ static void fill_slice_long(AVCodecContext *avctx, DXVA_Slice_H264_Long *slice,
r->reference == PICT_BOTTOM_FIELD);
for (plane = 0; plane < 3; plane++) {
int w, o;
- if (plane == 0 && h->luma_weight_flag[list]) {
- w = h->luma_weight[i][list][0];
- o = h->luma_weight[i][list][1];
- } else if (plane >= 1 && h->chroma_weight_flag[list]) {
- w = h->chroma_weight[i][list][plane-1][0];
- o = h->chroma_weight[i][list][plane-1][1];
+ if (plane == 0 && sl->luma_weight_flag[list]) {
+ w = sl->luma_weight[i][list][0];
+ o = sl->luma_weight[i][list][1];
+ } else if (plane >= 1 && sl->chroma_weight_flag[list]) {
+ w = sl->chroma_weight[i][list][plane-1][0];
+ o = sl->chroma_weight[i][list][plane-1][1];
} else {
- w = 1 << (plane == 0 ? h->luma_log2_weight_denom :
- h->chroma_log2_weight_denom);
+ w = 1 << (plane == 0 ? sl->luma_log2_weight_denom :
+ sl->chroma_log2_weight_denom);
o = 0;
}
slice->Weights[list][i][plane][0] = w;