diff options
author | Clément Bœsch <u@pkh.me> | 2016-06-19 12:53:19 +0200 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2016-06-19 13:00:28 +0200 |
commit | 98456d4d69e0fdcc328bb9e684ae776f5bc824e1 (patch) | |
tree | 16a529ca336fa8dab8771725f007f8d7b15390ac /libavcodec | |
parent | 0ed14bba12328cc8d85ef4aaf6916f15528830b5 (diff) | |
parent | 0ba471d7d864c712f45d7ac6aca4829aba025adc (diff) | |
download | ffmpeg-98456d4d69e0fdcc328bb9e684ae776f5bc824e1.tar.gz |
Merge commit '0ba471d7d864c712f45d7ac6aca4829aba025adc'
* commit '0ba471d7d864c712f45d7ac6aca4829aba025adc':
h264: eliminate copy_fields
Added a copy of default_ref which isn't present in Libav.
Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264_slice.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 45e076b9c1..2ef3065e28 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -292,10 +292,6 @@ static void copy_picture_range(H264Picture **to, H264Picture **from, int count, } } -#define copy_fields(to, from, start_field, end_field) \ - memcpy(&(to)->start_field, &(from)->start_field, \ - (char *)&(to)->end_field - (char *)&(to)->start_field) - static int h264_slice_header_init(H264Context *h); int ff_h264_update_thread_context(AVCodecContext *dst, @@ -420,8 +416,25 @@ int ff_h264_update_thread_context(AVCodecContext *dst, h->nal_length_size = h1->nal_length_size; h->sei.unregistered.x264_build = h1->sei.unregistered.x264_build; - // POC timing - copy_fields(h, h1, poc, current_slice); + memcpy(&h->poc, &h1->poc, sizeof(h->poc)); + + h->curr_pic_num = h1->curr_pic_num; + h->max_pic_num = h1->max_pic_num; + + memcpy(h->default_ref, h1->default_ref, sizeof(h->default_ref)); + memcpy(h->short_ref, h1->short_ref, sizeof(h->short_ref)); + memcpy(h->long_ref, h1->long_ref, sizeof(h->long_ref)); + memcpy(h->delayed_pic, h1->delayed_pic, sizeof(h->delayed_pic)); + memcpy(h->last_pocs, h1->last_pocs, sizeof(h->last_pocs)); + + h->next_output_pic = h1->next_output_pic; + h->next_outputed_poc = h1->next_outputed_poc; + + memcpy(h->mmco, h1->mmco, sizeof(h->mmco)); + h->mmco_index = h1->mmco_index; + h->mmco_reset = h1->mmco_reset; + h->long_ref_count = h1->long_ref_count; + h->short_ref_count = h1->short_ref_count; copy_picture_range(h->short_ref, h1->short_ref, 32, h, h1); copy_picture_range(h->long_ref, h1->long_ref, 32, h, h1); |