Michael Niedermayer
a6eb006ad4
avcodec/svq3: Fix runtime error: left shift of negative value -6
...
Fixes: 1604/clusterfuzz-testcase-minimized-5312060206350336
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
86b1b0d33d
avcodec/svq3: Fix runtime error: signed integer overflow: 169 * 12717677 cannot be represented in type 'int'
...
Fixes: 1556/clusterfuzz-testcase-minimized-5027865978470400
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
ae6fd1790f
avcodec/svq3: Fix multiple runtime error: signed integer overflow: -237341 * 24552 cannot be represented in type 'int'
...
Fixes: 1429/clusterfuzz-testcase-minimized-5959951610544128
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
669419939c
avcodec/svq3: Fix multiple runtime error: signed integer overflow: 44161 * 61694 cannot be represented in type 'int'
...
Fixes: 1382/clusterfuzz-testcase-minimized-6013445293998080
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
48b3117844
avcodec/svq3: Reject dx/dy beyond 16bit
...
The code does use 16bit sized arrays later so larger deltas would not work
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
382b4fc9b5
avcodec/svq3: Increase offsets to prevent integer overflows
...
Fixes: 1280/clusterfuzz-testcase-minimized-6102353767825408
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Carl Eugen Hoyos
1e298e7724
lavc/svq3: Remove an unused function.
8 years ago
Carl Eugen Hoyos
6d6faa2a2d
lavc/svq3: Fail for media key encryption.
...
Tested-by: ami_stuff
Fixes a part of ticket #6094 .
8 years ago
Carl Eugen Hoyos
a8cb567e55
lavc: Remove CR/LF from avpriv_request_sample() calls.
8 years ago
Diego Biurrun
13fcdfb976
svq3: Drop unused function dctcoef_get()
...
libavcodec/svq3.c:627:29: warning: unused function 'dctcoef_get' [-Wunused-function]
8 years ago
Michael Niedermayer
2d3099ad8e
avcodec/svq3: Reintroduce slice_type
...
Fixes out of array read
Fixes: 1642cd3962249d6aaf0eec2836023fb6/signal_sigsegv_2557a72_2995_04efaf2ff57a052f609a3b4a2ea4e622.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
2624695484
avcodec/svq3: fix slice size check
...
Fixes out of array read
Fixes: 09f46aa2175cade93e3e3932646a56a9/asan_heap-oob_4a5385_2995_498f6abfdc0248288cefe5f4b7ad316c.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
James Almer
be63ef3c4e
avcodec/vdpau: clean up vdpau_internal.h
...
Also don't include it on files that don't need it.
This reduces differences with libav
Tested-by: Timothy Gu <timothygu99@gmail.com>
Reveiwed-by: Carl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
8 years ago
Anton Khirnov
4e2f621248
svq3: stop using H264Picture
...
The SVQ3 decoder has been decoupled from the H.264 decoder, so it can
now use its own data type.
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
Diego Biurrun
4024b566d6
golomb: Give svq3_get_se_golomb()/svq3_get_ue_golomb() better names
9 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
9 years ago
Michael Niedermayer
4efd3ec50a
avcodec/svq3: fix assert type (was av_assert2 in h264 from where this was copied)
...
Type was lost in f8d1bb2f2c
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
9 years ago
Anton Khirnov
add1467e5e
svq3: drop the build dependency on the h264 decoder
9 years ago
Anton Khirnov
a4d126dc59
svq3: eliminate remaining H264Context usage.
9 years ago
Anton Khirnov
7bbdae81e8
svq3: move block_offset to SVQ3Context
9 years ago
Anton Khirnov
1848a154a4
svq3: stop using H264Context.gb
9 years ago
Anton Khirnov
ea6ab02a17
svq3: move the frame num variables to the SVQ3Context
9 years ago
Anton Khirnov
21b7469322
svq3: eliminate H264Context.cur_pic usage
...
Use the SVQ3Context variable instead
9 years ago
Anton Khirnov
939b388383
svq3: eliminate remaining H264SliceContext usage
9 years ago
Anton Khirnov
5a5db90edf
svq3: move pict_type to the SVQ3Context
9 years ago
Anton Khirnov
12f13ecb2d
svq3: move mb strides/sizes to the SVQ3Context
9 years ago
Anton Khirnov
ad9d3384de
svq3: move the dequant buffer to SVQ3Context
...
Remove now unnecesary call to ff_h264_alloc_tables()
9 years ago
Anton Khirnov
549fc77273
svq3: move mb2br_xy to the SVQ3Context
9 years ago
Anton Khirnov
99dde60391
svq3: move {ref,mv}_cache to the SVQ3Context
9 years ago
Anton Khirnov
89a13998a1
svq3: rip out the svq3-relevant parts of pred_motion() out of h264
9 years ago
Anton Khirnov
8eecae77ff
svq3: move edge_emu_buffer to the SVQ3Context
9 years ago
Anton Khirnov
527bf5f7c6
svq3: move the pred mode variables to SVQ3Context
...
This will allow removing the H264Context dependency in the future.
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
1877712c58
svq3: move mb_{x,y,xy} to SVQ3Context
...
This will allow removing the H264Context dependency in the future.
9 years ago
Anton Khirnov
c2a4ca944d
svq3: eliminate write_back_intra_pred_mode() usage
...
This function depends on the h264 internals and is so tiny that just
copying the code out is the simplest replacement.
9 years ago
Anton Khirnov
c73fb9efb2
svq3: add all the required dsp contexts into SVQ3Context
...
Stop using the H264Context ones, to allow removing the H264Context
dependency.
9 years ago
Anton Khirnov
15b0517da9
svq3: make the dsp functions static
...
There is no need for them to be extern anymore.
9 years ago
Anton Khirnov
e42ca48a8b
svq3: rip out the mb decoding code shared with h264
...
The ~100 lines of shared code is not worth the pain of svq3 messing with
h264 internals.
9 years ago
Diego Biurrun
a7da517f6a
h264data: Move all data tables from a header to a .c file
9 years ago
Diego Biurrun
f4d581cda3
lavc: Deduplicate zigzag_scan table
9 years ago
Luca Barbato
1098f5c049
svq3: Use a separate buffer for decoding the slices
...
The AVPacket.data should be considered read-only.
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Vittorio Giovara
7c6eb0a1b7
lavc: AV-prefix all codec flags
...
Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Michael Niedermayer
4e8ee7acb8
libavcodec/svq3: clarify unknown_flag by renaming to has_watermark
...
The name is based on how the field is used in the code
Reviewed-by: compn <tempn@mi.rr.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
6197672720
avcodec/svq3: Print unknown fields at debug level
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
3cd666cfbc
avcodec/svq3: Fix memleak of last_pic_for_ec
...
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
a0f2946068
h264: use properly allocated AVFrames
10 years ago
Michael Niedermayer
aa000ddab2
avcodec/svq3: add scaling matrix init that was removed from h264 init
...
This is needed for svq3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
e6c710600e
avcodec/svq3: add initialization which was removed from h264 init
...
This is needed for the svq3 code to work
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago