Michael Niedermayer
c1cee05656
avcodec/cavsdec: Propagate error codes inside decode_mb_i()
...
Fixes: Timeout
Fixes: 10702/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CAVS_fuzzer-5669940938407936
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
6 years ago
Michael Niedermayer
ae2eb04648
avcodec/cavsdec: Check alpha/beta offset
...
Fixes: Integer overflow
Fixes: 6183/clusterfuzz-testcase-minimized-6269224436629504
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
b9ce43625c
avcodec/cavsdec: Check P/B frame mb decode which return error codes
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
426a322aa2
avcodec/cavsdec: Check I frame mb decode for errors
...
Fixes: timeout
Fixes: 2943/clusterfuzz-testcase-5430257156882432
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
7 years ago
Michael Niedermayer
58f8cd4ac5
avcodec/cavsdec: Fix runtime error: signed integer overflow: 59 + 2147483600 cannot be represented in type 'int'
...
Fixes: 1903/clusterfuzz-testcase-minimized-5359318167715840
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Michael Niedermayer
5ac17f187a
avcodec/cavsdec: Fix runtime error: signed integer overflow: 31 + 2147483640 cannot be represented in type 'int'
...
Fixes: 1506/clusterfuzz-testcase-minimized-5401272918212608
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
279420b5a6
avcodec/cavsdec: Check sym_factor
...
Fixes: runtime error: signed integer overflow: 25984 * 130560 cannot be represented in type 'int'
Fixes: 1404/clusterfuzz-testcase-minimized-5000441286885376
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
a0e5f7f363
avcodec/cavsdec: Fix undefined behavior from integer overflow
...
Fixes: 1335/clusterfuzz-testcase-minimized-5566961566089216
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
Alexandra Hájková
ffc00df0a6
cavs: Convert to the new bitstream reader
8 years ago
Diego Biurrun
d4c2103bd3
golomb: Convert to the new bitstream reader
8 years ago
Michael Niedermayer
493ad519dd
avcodec/cavsdec: Clear MMX state after MB decode loop
...
The MMX state must be cleared between using MMX and using memory allocation
thats basically the only location between the 2
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Andreas Cadhalpun
1966ea012f
cavsdec: unref frame before referencing again
...
This fixes asserts (from commit 13aae8) in av_frame_ref and
av_frame_move_ref.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years ago
Diego Biurrun
f81be06cf6
cavs: Change type of stride parameters to ptrdiff_t
...
ptrdiff_t is the correct type for array strides and similar.
8 years ago
Vittorio Giovara
e60a6e7545
mpegvideo: Drop mpegvideo.h where not needed
...
Add necessary headers in .c files.
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
Michael Niedermayer
f6b8b96607
avcodec/cavsdec: Use ff_set_dimensions()
...
Fixes CID1239111 part2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
c5c06e392b
avcodec/cavsdec: Check frame_rate_code
...
Fixes CID1239111 part1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
139e1c8009
avcodec/cavsdec: Check esc_code
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
35e559ae32
avcodec/cavs: Check for av_malloc* failure in ff_cavs_init_top_lines()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
85dc006b1a
lavc: fix bitshifts amount bigger than the type
...
CC: libav-stable@libav.org
Bug-Id: CID 1194387 / CID 1194389 / CID 1194393 / CID 1206638
10 years ago
Anton Khirnov
7ea1b3472a
lavc: deprecate the use of AVCodecContext.time_base for decoding
...
When decoding, this field holds the inverse of the framerate that can be
written in the headers for some codecs. Using a field called 'time_base'
for this is very misleading, as there are no timestamps associated with
it. Furthermore, this field is used for a very different purpose during
encoding.
Add a new field, called 'framerate', to replace the use of time_base for
decoding.
10 years ago
Michael Niedermayer
f9f8491ddf
avcodec/cavs: make cavs_chroma_qp non static
...
The table is needed by multiple files
Reverts part of ef07ac1e12
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Yao Wang
e18b48c6fd
avcodec/cavs: fix B_SUB_DIRECT col-MB is Intra MB case.
...
in this case current MB size is forced to 16x16 (AVS standard section 9.9.1)
Signed-off-by: Yao Wang <jiayaowang@gmail.com>
Fixes Ticket 1901
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
e74433a8e6
dsputil: Split clear_block*/fill_block* off into a separate context
11 years ago
Michael Niedermayer
c932f12806
avcodec/cavsdec: simplify % 512 operations
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
61df0819d4
avcodec/cavsdec: fix low delay decoding
...
Fixes Ticket1095
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0accf24b15
cavsdec: fix qp fixed slice handling
...
Fixes Ticket3400
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
4736d003fa
cavsdec: check ff_get_buffer() return value
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
11 years ago
Michael Niedermayer
be99054e77
avcodec/cavsdec: print error messages in case of errors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
bc1b828536
avcodec/cavsdec: use more specific error codes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9ca32b2060
avcodec/cavsdec: print warning if no frame has been decoded
...
Fixes ticket3128
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
63f74cedc9
avcodec/cavsdec: reset stc
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
39185ec4fa
cavs: Check for negative cbp
...
Sample-Id: 00000647-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Luca Barbato
1b20d0f581
cavs: Return meaningful error values
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Martin Storsjö
e90a6846c2
cavsdec: Make sure a sequence header has been decoded before decoding pictures
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Martin Storsjö
f1e9398621
lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo
...
Also move the declaration to internal.h, and add restrict qualifiers
to the declaration (as in the implementation).
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Diego Biurrun
63d744e2be
av_log_missing_feature() ---> avpriv_report_missing_feature()
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
cf48b00640
cavsdec: check for value in get_ue_code()
...
Fixes integer overflow and prints an error in case the value is
invalid.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
88bd7fdc82
Drop DCTELEM typedef
...
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years ago
Anton Khirnov
fb0cb11f09
cavsdec: export picture type in the output frame
12 years ago
Anton Khirnov
7d84826400
cavs: deMpegEncContextize
...
It does not use any of the mpegvideo infrastructure, just a few fields
from the context.
Fixes a segfault with the emu edge flag, since emu edge buffer is now
allocated as a part of the frame buffer allocation and cavs calls
ff_get_buffer() directly, it does not use mpegvideo buffer management.
Fixes a memleak of the last frame.
12 years ago
Anton Khirnov
185c2ef849
cavsdec: cosmetics, reformat
12 years ago
Michael Niedermayer
eee8c94f50
cavsdec: check ff_get_buffer() return value
...
Fixes CID747721
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Martin Storsjö
eaa9b2e66c
avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab
...
This table doesn't need to be shared with libavformat any longer.
Add mpeg12 to the name to make it less ambiguous, while renaming it.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Diego Biurrun
f75f4194d1
Restructure av_log_missing_feature message
...
Some invocations include a verb in the log message, others do not. Yet
av_log_missing_feature expects callers to provide a verb. Change the
function to include a verb instead and update the callers accordingly.
The result is a more natural function API and correct English in the
function invocations.
12 years ago
Michael Niedermayer
c20a696306
cavsdec: check for changing w/h.
...
Our decoder does not support changing w/h.
Fixes CVE-2012-2777 and CVE-2012-2784.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago