summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264dec.h
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/h264dec: Fix potential array overreadMichael Niedermayer2017-11-151-0/+1
| | | | | | | | add padding before scantable arrays See: 522d850e68ec4b77d3477b3c8f55b1ba00a9d69a Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '45c4bf3df03ef53ae61fa1473424d4ae024f22e4'James Almer2017-11-081-0/+1
|\ | | | | | | | | | | | | * commit '45c4bf3df03ef53ae61fa1473424d4ae024f22e4': h264dec: track the last seen value of x264_build Merged-by: James Almer <jamrial@gmail.com>
| * h264dec: track the last seen value of x264_buildAnton Khirnov2017-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | Do not use the one in the SEI directly as that is reset at certain points. Inspired by patches from Michael Niedermayer <michaelni@gmx.at> and Anton Mitrofanov <BugMaster@narod.ru>. CC: libav-stable@libav.org
| * h264dec: export cropping information instead of handling it internallyAnton Khirnov2017-01-121-0/+5
| |
| * h264dec: be more explicit in handling container croppingAnton Khirnov2017-01-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The current condition can trigger in cases where it shouldn't, with unexpected results. Make sure that: - container cropping is really based on the original dimensions from the caller - those dimenions are discarded on size change The code is still quite hacky and eventually should be deprecated and removed, with the decision about which cropping is used delegated to the caller.
* | avcodec/h264dec: export cropping information instead of handling it internallyJames Almer2017-05-261-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This merges commit c3e84820d67cb1d8cfb4196f9b43971308a81571 from libav, originally written by Anton Khirnov and skipped in fc63d5ceb357c4b760cb02772de0b50d0557140f. libavcodec/h264_picture.c | 3 --- libavcodec/h264_ps.c | 9 --------- libavcodec/h264_slice.c | 25 +++++++++++++++++++------ libavcodec/h264dec.c | 13 +------------ libavcodec/h264dec.h | 9 +++++---- 5 files changed, 25 insertions(+), 34 deletions(-)
* | avcodec/h264dec: be more explicit in handling container croppingJames Almer2017-05-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | This merges commit 4fded0480f20f4d7ca5e776a85574de34dfead14 from libav, originally written by Anton Khirnov and skipped in fc63d5ceb357c4b760cb02772de0b50d0557140f. libavcodec/h264_slice.c | 20 +++++++++++++------- libavcodec/h264dec.c | 3 +++ libavcodec/h264dec.h | 5 +++++ 3 files changed, 21 insertions(+), 7 deletions(-)
* | Merge commit 'f1af37b51033ad90e56a8d7dfcc366f2bd9d2fed'Clément Bœsch2017-05-051-1/+0
|\ \ | |/ | | | | | | | | | | * commit 'f1af37b51033ad90e56a8d7dfcc366f2bd9d2fed': h264dec: make ff_h264_decode_init() static Merged-by: Clément Bœsch <cboesch@gopro.com>
| * h264dec: make ff_h264_decode_init() staticAnton Khirnov2017-01-091-1/+0
| | | | | | | | It is not called from outside h264dec.c anymore.
| * h264dec: make sure to only end a field if it has been startedAnton Khirnov2016-12-191-0/+5
| | | | | | | | | | | | | | | | Calling ff_h264_field_end() when the per-field state is not properly initialized leads to all kinds of undefined behaviour. CC: libav-stable@libav.org Bug-Id: 977 978 992
* | h264: revert 1189af429211ac650aac730368a6cf5b23756605.Ronald S. Bultje2017-03-281-8/+0
| | | | | | | | The patch introduces race conditions.
* | Merge commit '38efff92f1ef81f3de20ff0460ec7b70c253d714'Clément Bœsch2017-01-241-18/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '38efff92f1ef81f3de20ff0460ec7b70c253d714': FATE: add a test for H.264 with two fields per packet h264: fix decoding multiple fields per packet with slice threads This merge includes two commits because the FATE test was useful in order to make proper testing. The merge gets rid of the now unused: - SLICE_SINGLETHREAD and SLICE_SKIPED macros - max_contexts - "again" label in decode_nal_units() This commit also includes the fix from d3e4d406b. Thanks to wm4 and Michael Niedermayer for their testing. Merged-by: Clément Bœsch <u@pkh.me> Merged-by: Matthieu Bouron <matthieu.bouron@gmail.com>
| * h264: fix decoding multiple fields per packet with slice threadsAnton Khirnov2016-07-151-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Since we only know whether a NAL unit corresponds to a new field after parsing the slice header, this requires reorganizing the calls to slice parsing, per-slice/field/frame init and actual decoding. In the previous code, the function for slice header decoding also immediately started a new field/frame as necessary, so any slices already queued for decoding would no longer be decodable. After this patch, we first parse the slice header, and if we determine that a new field needs to be started we decode all the queued slices.
| * h264: eliminate decode_postinit()Anton Khirnov2016-07-151-1/+2
| | | | | | | | | | | | | | | | This function's purpose is not very well defined. Currently it does two (only marginally related) things: selecting the next output frame and calling ff_thread_finish_setup() for frame threading. The first of those more properly belongs under field_start(), while the second can be called directly from decode_nal_units().
* | avcodec/h264dec: Fix regression with "make fate-h264-attachment-631 THREADS=8"Michael Niedermayer2017-01-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This treats the case of no slices like no frames which it basically is. The field is added to the context as other nal related fields are also there and passing the has_slices field per *arguments is ugly and not consistent Found-by: ubitux Approved-by: ubitux Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h2645: Fix NAL unit paddingMichael Niedermayer2016-08-181-2/+0
| | | | | | | | | | | | | | | | | | The parser changes have lost the support for the needed padding, this adds it back Fixes out of array reads Fixes: 03ea21d271abc8acf428d42ace51d8b4/asan_heap-oob_3358eef_5692_16f0cc01ab5225e9ce591659e5c20e35.mkv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Revert "Revert "Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'""Timothy Gu2016-08-031-0/+5
| | | | | | | | | | | | | | This reverts commit e4af9be0f45c8f2ca148fb971f1e0c6782530e8c and redoes 796027f22154c799e0063e2457b31e0cfd1dddae. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
* | Revert "Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'"Timothy Gu2016-08-031-5/+0
| | | | | | | | | | | | | | This reverts commit 796027f22154c799e0063e2457b31e0cfd1dddae, reversing changes made to bca30ed2b67f095fd31e07319a622ac30ad22978. Preemptive revert before further testing has been done.
* | Merge commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22'Timothy Gu2016-08-031-0/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit 'd1d7678040cd60148f97b372cb4291bcc45b2e22': h264: fix the check for mixed IDR/non-IDR slices Conflicts: libavcodec/h264_slice.c libavcodec/h264dec.c Merged-by: Timothy Gu <timothygu99@gmail.com>
| * h264: fix the check for mixed IDR/non-IDR slicesAnton Khirnov2016-06-211-0/+5
| |
* | Merge commit 'b13fc1e344011949929975a3451f78f226aa1de3'Timothy Gu2016-08-031-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | * commit 'b13fc1e344011949929975a3451f78f226aa1de3': h264: do not pass H264Context to h264_slice_header_parse() Conflicts: libavcodec/h264dec.h Did not merge the h264_slice_header_parse() part. We use a few other members of H264Context for error checking in that function. Merged-by: Timothy Gu <timothygu99@gmail.com>
| * h264: do not pass H264Context to h264_slice_header_parse()Anton Khirnov2016-06-211-3/+3
| | | | | | | | | | This should make it more clear that this function does not need any decoder-global state other than the parameter sets.
* | avcodec/h264dec: move ff_h264_ps_uninit prototype to h264_ps.hJames Almer2016-08-031-6/+0
| | | | | | | | | | | | It's the proper place since 8c7932884d09bc580036640453fd6b7ad4dd77b4 Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit 'f638b67e5790735f34620bf82025c9b9d6fc7216'James Almer2016-08-011-126/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit 'f638b67e5790735f34620bf82025c9b9d6fc7216': h264: move the parameter set definitions to a new header file Conflicts: libavcodec/h264_parse.h libavcodec/h264_ps.c libavcodec/h264dec.h Merged-by: James Almer <jamrial@gmail.com>
| * h264: move the parameter set definitions to a new header fileAnton Khirnov2016-06-211-121/+1
| | | | | | | | | | The PS parsing code is independent from the decoder, so it makes more sense for it to have its own separate header.
* | Merge commit '251cbb44003caf179fb17afbb8a6c56643c2a646'Clément Bœsch2016-07-291-18/+0
|\ \ | |/ | | | | | | | | | | * commit '251cbb44003caf179fb17afbb8a6c56643c2a646': h264: create a new header for common h264 definitions Merged-by: Clément Bœsch <u@pkh.me>
| * h264: create a new header for common h264 definitionsAnton Khirnov2016-06-211-18/+0
| | | | | | | | | | | | Move the NAL unit types into it. This will allow to stop including the whole decoder-specific h264dec.h in some code that is unrelated to the decoder and only needs some enum values.
* | Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'Clément Bœsch2016-07-291-31/+101
|/ | | | | | | * commit '9df889a5f116c1ee78c2f239e0ba599c492431aa': h264: rename h264.[ch] to h264dec.[ch] Merged-by: Clément Bœsch <u@pkh.me>
* h264: rename h264.[ch] to h264dec.[ch]Anton Khirnov2016-06-211-0/+938
This is more consistent with the naming of other decoders.
OpenPOWER on IntegriCloud