mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit '9951907f6fc37a8d41566dbee09f7c15ff587de6'
* commit '9951907f6fc37a8d41566dbee09f7c15ff587de6': h264: move redundant_pic_count into the per-slice context Conflicts: libavcodec/h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
da7f4c32ab
@ -277,7 +277,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;
|
||||
slice->redundant_pic_cnt = sl->redundant_pic_count;
|
||||
if (sl->slice_type == AV_PICTURE_TYPE_B)
|
||||
slice->direct_spatial_mv_pred_flag = sl->direct_spatial_mv_pred;
|
||||
slice->cabac_init_idc = h->pps.cabac ? sl->cabac_init_idc : 0;
|
||||
|
@ -1629,7 +1629,7 @@ again:
|
||||
ff_vdpau_h264_picture_start(h);
|
||||
}
|
||||
|
||||
if (hx->redundant_pic_count == 0) {
|
||||
if (sl->redundant_pic_count == 0) {
|
||||
if (avctx->hwaccel) {
|
||||
ret = avctx->hwaccel->decode_slice(avctx,
|
||||
&buf[buf_index - consumed],
|
||||
|
@ -393,6 +393,8 @@ typedef struct H264SliceContext {
|
||||
ptrdiff_t mb_linesize; ///< may be equal to s->linesize or s->linesize * 2, for mbaff
|
||||
ptrdiff_t mb_uvlinesize;
|
||||
|
||||
int redundant_pic_count;
|
||||
|
||||
/**
|
||||
* number of neighbors (top and/or left) that used 8x8 dct
|
||||
*/
|
||||
@ -620,8 +622,6 @@ typedef struct H264Context {
|
||||
*/
|
||||
int max_pic_num;
|
||||
|
||||
int redundant_pic_count;
|
||||
|
||||
H264Picture default_ref_list[2][32]; ///< base reference list for all slices of a coded picture
|
||||
H264Picture *short_ref[32];
|
||||
H264Picture *long_ref[32];
|
||||
|
@ -656,7 +656,7 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
|
||||
h->dequant_coeff_pps = h1->dequant_coeff_pps;
|
||||
|
||||
// POC timing
|
||||
copy_fields(h, h1, poc_lsb, redundant_pic_count);
|
||||
copy_fields(h, h1, poc_lsb, default_ref_list);
|
||||
|
||||
// reference lists
|
||||
copy_fields(h, h1, short_ref, thread_context);
|
||||
@ -1790,7 +1790,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl, H264Contex
|
||||
ff_init_poc(h, h->cur_pic_ptr->field_poc, &h->cur_pic_ptr->poc);
|
||||
|
||||
if (h->pps.redundant_pic_cnt_present)
|
||||
h->redundant_pic_count = get_ue_golomb(&h->gb);
|
||||
sl->redundant_pic_count = get_ue_golomb(&h->gb);
|
||||
|
||||
ret = ff_set_ref_count(h, sl);
|
||||
if (ret < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user