Michael Niedermayer
ac4e3e188a
avcodec/evc_parse: Check num_remaining_tiles_in_slice_minus1
...
Fixes: out of array access
Fixes: 62467/clusterfuzz-testcase-minimized-ffmpeg_BSF_EVC_FRAME_MERGE_fuzzer-6092990982258688
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: "Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics" <d.kozinski@samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
1 year ago
Michael Niedermayer
68cc1744db
avcodec/evc_parse: Check tid
...
The check is based on not infinite looping. It is likely
a more strict check can be done
Fixes: Infinite loop
Fixes: 62473/clusterfuzz-testcase-minimized-ffmpeg_BSF_EVC_FRAME_MERGE_fuzzer-5719883750703104
Fixes: 62765/clusterfuzz-testcase-minimized-ffmpeg_dem_EVC_fuzzer-6448531252314112
Fixes: 63378/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGPS_fuzzer-6504993844494336
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: "Dawid Kozinski/Multimedia (PLT) /SRPOL/Staff Engineer/Samsung Electronics" <d.kozinski@samsung.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
1 year ago
Michael Niedermayer
d35eecd24f
avcodec/evc_parse: remove pow() and log2()
...
The use of float based functions is both unneeded and wrong due to unpredictable rounding
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
1 year ago
Andreas Rheinhardt
6e5e74c55b
avcodec/evc*: Improve included headers
...
In particular, don't include avcodec.h in evc_frame_merge_bsf.c.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
1 year ago
James Almer
5b966be5b8
avcodec/evc_parse: use unsigned types in structs where corresponds
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
1bcb8a7338
avcodec/evc_parser: use a GetBitContext to parse entire NALUs
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
e5da2ec456
avcodec/evc_parse: pass a GetBitContext to the slice header parsing function
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
7ff3dce29a
avcodec/evc_parse: use get_bits1() where useful
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
5cb9ef9300
avcodec/evc_parse: remove ff_evc_parse_nal_unit()
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
a5663f2d9a
avcodec/evc_parser: make ff_evc_parse_nal_unit() local to the parser
...
This is in preparation for the following commits.
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
ff7a4cdf04
avcodec/evc_parse: split off deriving PoC
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
f7e0af5edc
avcodec/evc_parser: stop exporting delay and gop_size
...
The former is a property a decoder may export, and the latter is only
used in encoding scenarios.
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
1e189fed7a
avcodec/evc_parse: split off Parameter Set parsing into its own file
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
9fc1d9adc8
avcodec/evc_parse: make freeing EVCParserContext buffers a shared function
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
46a9be01b8
avcodec/evc_parse: free pps struct on parsing failure
...
Prevents future checks for their presence from succeeding.
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
811460f5c2
avcodec/evc_parse: use the correct sps when parsing slice headers
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
44f26315c8
avcodec/evc_parse: use a local EVCParserSliceHeader when parsing slices
...
There's no need to store EVC_MAX_PPS_COUNT amount of slice headers in EVCParserContext.
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
57879b23bc
avcodec/evc_parse: zero sps, pps and sh structs
...
Otherwise stale values may remain in place.
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
da2af70ffa
avcodec/evc_parser: export framerate to the AVCodecContext
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
James Almer
f42df8384a
avcodec/evc_parse: use the correct struct size when allocating pps
...
Signed-off-by: James Almer <jamrial@gmail.com>
1 year ago
Dawid Kozinski
34e4f18360
avcodec/evc_parser: Added parser implementation for EVC format
...
- Added constants definitions for EVC parser
- Provided NAL units parsing following ISO_IEC_23094-1
- EVC parser registration
Signed-off-by: Dawid Kozinski <d.kozinski@samsung.com>
1 year ago