Michael Niedermayer
08117a4015
avcodec/h264: Check weight values to be within the specs limits.
...
Fixes: integer overflows
Fixes: 911/clusterfuzz-testcase-5415105606975488
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
cc13bc8c4f
avcodec/h2645: Fix NAL unit padding
...
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>
8 years ago
Anton Khirnov
5c2fb561d9
h264: add H264_ prefix to the NAL unit types
...
This will prevent conflicts e.g. in code that deals with both h264 and
hevc.
9 years ago
Anton Khirnov
f638b67e57
h264: move the parameter set definitions to a new header file
...
The PS parsing code is independent from the decoder, so it makes more
sense for it to have its own separate header.
9 years ago
Anton Khirnov
251cbb4400
h264: create a new header for common h264 definitions
...
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.
9 years ago
Anton Khirnov
9df889a5f1
h264: rename h264.[ch] to h264dec.[ch]
...
This is more consistent with the naming of other decoders.
9 years ago
Clément Bœsch
4fdea02d68
lavc/h264: add a logging ctx to ff_h264_pred_weight_table()
9 years ago
Clément Bœsch
b51d5c99b8
lavc/h264_parse: remove tabs introduced in a2922b5d
9 years ago
Anton Khirnov
b16e9b9ac9
h264: move initialising the explicit pred weight table for MBAFF
...
Currently it's done in the code that initialises the ref list for
MBAFF, which is not a logical place for it. Move it to the function that
parses the pred table from the bitstream, which is analogous to what is
done for the implicit weight table as well.
9 years ago
Anton Khirnov
72da8d9bb2
h264_parser: remove the remaining dependencies on the h264 decoder
9 years ago
Anton Khirnov
98c97994c5
h264: decouple extradata parsing from the decoder
...
This will allow decoupling the parser from the decoder.
9 years ago
Anton Khirnov
c8dcff0cdb
h264: factor out calculating the POC count into a separate file
...
This will allow decoupling the parser from the decoder.
9 years ago
Anton Khirnov
71d3305c27
h264_parse: make sure the ref count is zeroed on all failure paths
9 years ago
Anton Khirnov
a6e27f7add
h264: factor out parsing the reference count into a separate file
...
This will allow decoupling the parser from the decoder.
9 years ago
Anton Khirnov
ecc31f6b08
h264: move ff_h264_check_intra[4x4]_pred_mode() to h264_parse
...
It is shared with svq3.
9 years ago
Anton Khirnov
e481458bc3
h264: factor out pred weight table parsing into a separate file
...
This will allow decoupling the parser from the decoder.
9 years ago