Anton Khirnov
5b9c3b4505
Replace all instances of avcodec_alloc_frame() with av_frame_alloc().
11 years ago
Anton Khirnov
7fbb75cc70
svq1dec: stop using deprecated avcodec_set_dimensions
11 years ago
Michael Niedermayer
c882b62d14
avcodec/svq1dec: Use skip_1stop_8data_bits()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Diego Biurrun
c591d4575a
avcodec: Replace local extern declarations for tables with header #includes
11 years ago
Michael Niedermayer
8c707a129a
avcodec/svq1dec: use init_get_bits8()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Carl Eugen Hoyos
052838f765
Insert a newline before showing embedded svq1 messages.
...
Messages may start with a carriage return.
12 years ago
Ronald S. Bultje
6caa44aa7d
svq1: Use hpeldsp instead of dsputil for half-pel functions
...
This makes svq1 independent of dsputil.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
ecff5acb5a
svq1dec: clip motion vectors to the frame size.
...
Fixes invalid reads for corrupted files.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
12 years ago
Anton Khirnov
b1bb8fb860
svq1dec: check that the reference frame has the same dimensions as the current one
...
They can be different if the last keyframe failed to decode correctly.
Fixes possible invalid reads in such a case.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
12 years ago
Ronald S. Bultje
4652389777
svq1: use hpeldsp instead of dsputil for half-pel functions.
...
This makes svq1 independent of dsputil.
12 years ago
Janne Grunau
e3232f3431
svq1: use av_frame_free to free refcounted frame
...
Fixes a memleak due to avcodec_free_frame not freeing the frame data.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Anton Khirnov
6ed9fc44ba
svq1: replace struct svq1_frame_size with an array.
...
It is used as an array in svq1enc, so this is more correct.
12 years ago
Michael Niedermayer
3b57bb478f
svq1dec: check that the reference frame matches in size before using it.
...
Fixes out of array reads
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Martin Storsjö
48238fd00b
svq1: Fix building with -DDEBUG
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
c4182d72c9
svq1: return meaningful error codes.
12 years ago
Anton Khirnov
998fdcff41
lavc: replace some forgotten instances of PixelFormat with AVPixelFormat
12 years ago
Anton Khirnov
84a0806680
svq1: unmacroify macros used only once.
12 years ago
Anton Khirnov
95baf701db
svq1: deMpegEncContextize
...
This decoder is quite simple and none of the MpegEncContext complexity
is actually needed.
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
Michael Niedermayer
7389bb12e6
svq1dec: update w/h only if the header is successfully parsed.
...
Prevents inconsistency and out of array accesses.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
0a373c31cb
svq1dec: dont export the qscale table.
...
SVQ1 has no qscales so the table is of no use, and it triggers a bug as
SVQ1 does not maintain the size of the table properly causing a crash.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
dd5aff001e
svq1dec: use log level that have more common sense
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
7b9fc769e4
svq1dec: use more common way to check if result is not zero
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
8f4020d8a4
svq1dec: check return value of get_bits1() in more common way
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
e2bf1082cc
svq1dec: return more meaningful error codes
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Diego Biurrun
63a46c6101
svq1: Drop a bunch of useless parentheses
12 years ago
Diego Biurrun
ada12f8366
svq1: K&R formatting cosmetics
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Diego Biurrun
1218777ffd
avcodec: Convert some commented-out printf/av_log instances to av_dlog
12 years ago
Diego Biurrun
f1e06d37c9
svq1/svq3: Move common code out of SVQ1 decoder-specific file
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Michael Niedermayer
f7c67536fe
svq1dec: Fix overread on very small input
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Piotr Bandurski
520cf05338
svq1dec: use AV_LOG_ERROR for error message
...
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Diego Biurrun
324deaa268
Replace AVFrame pointer type punning by proper struct member assignments.
13 years ago
Martin Storsjö
efd29844eb
mpegvideo: Add ff_ prefix to nonstatic functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Martin Storsjö
ddce8953a5
h263: Add ff_ prefix to nonstatic symbols
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
6e24b9488e
svq1dec: call avcodec_set_dimensions() after dimensions changed.
...
Fixes NGS00148, CVE-2011-4579
Found-by: Phillip Langlois
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mans Rullgard
51a16077da
svq1dec: avoid undefined get_bits(0) call
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Mans Rullgard
e4faa31a0a
svq1dec: use sign_extend()
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Michael Niedermayer
4931c8f0f1
svq1dec: call avcodec_set_dimensions() after dimensions changed.
...
Fixes NGS00148
Found-by: Phillip Langlois
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
13 years ago
Diego Biurrun
657ccb5ac7
Eliminate FF_COMMON_FRAME macro.
...
FF_COMMON_FRAME holds the contents of the AVFrame structure and is also copied
to struct Picture. Replace by an embedded AVFrame structure in struct Picture.
14 years ago
Diego Biurrun
f8ea0eb6ff
svq1dec: Fix debug statements that referenced non-existing context.
14 years ago
Diego Biurrun
f190f676bc
Replace custom DEBUG preprocessor trickery by the standard one.
14 years ago
Diego Biurrun
2366462429
Replace #ifdef + av_log() combinations by av_dlog().
14 years ago
Mans Rullgard
e65ab9d94f
Remove unused variables
14 years ago
Michael Niedermayer
732ff29bff
svq1dec: simpify mean calculation.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago