Diego Biurrun
a25dac976a
Use bitstream_init8() where appropriate
8 years ago
Anton Khirnov
fd9212f2ed
Mark some arrays that never change as const.
8 years ago
Alexandra Hájková
c3defda0d8
indeo: Convert to the new bitstream reader
8 years ago
Diego Biurrun
67351924fa
Drop unreachable break and return statements
8 years ago
Diego Biurrun
746c56b773
indeo: Change type of array pitch parameters to ptrdiff_t
...
ptrdiff_t is the correct type for array pitches and similar.
8 years ago
Vittorio Giovara
41ed7ab45f
cosmetics: Fix spelling mistakes
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
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
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
10 years ago
Michael Niedermayer
368642361f
avcodec/indeo3: ensure offsets are non negative
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
3305acdc92
avcodec/indeo3: use signed variables to avoid underflow
...
Fixes out of array read
Fixes: signal_sigsegv_1b0a4da_1865_cov_2167818389_computer_anger.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Vittorio Giovara
c6d7c201df
indeo3: check ff_set_dimensions return value
...
CC: libav-stable@libav.org
Bug-Id: CID 1135740
10 years ago
Reimar Döffinger
d9e2aceb7f
Add missing "const" all over the place.
...
Only "./configure --enable-gpl" on x86 was tested.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
10 years ago
Michael Niedermayer
81ed7efbe2
avcodec/indeo3: check the return code of ff_set_dimensions()
...
This is currently redundant as the checks before it are tighter than
the checks in ff_set_dimensions() but its more robust not to depend
on that.
Fixes CID1135740
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
317d6a1503
indeo3: stop using deprecated avcodec_set_dimensions
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Paul B Mahol
84343dd9d3
indeo3: check return values of av_malloc()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Janne Grunau
94235f2ba2
indeo3: avoid writes without necessary alignment in copy_cell()
...
Cells starting at a position aligned to 8 pixels but wider than
4 blocks are copied with 3 blocks per loop. This creates problems on the
next loop iterations since the routine copying 2 blocks requires the
same alignment on some architectures like ARM NEON.
12 years ago
Anton Khirnov
a97d8cc16e
indeo3: use unaligned reads on reference blocks.
...
They are not guaranteed to be aligned.
Fixes Bug 503.
CC:libav-stable@libav.org
12 years ago
Anton Khirnov
bda9e6d923
indeo3: use put_pixels instead of put_no_rnd_pixels in copy_cell()
...
They are the same in this case, except put_pixels also has blocksizes
smaller than 8.
12 years ago
Anton Khirnov
95220be1fa
indeo3: fix off by one in MV validity check
...
CC:libav-stable@libav.org
12 years ago
Ronald S. Bultje
8f992dc8c7
indeo3: Use hpeldsp instead of dsputil for half-pel functions
...
This makes the Indeo 3 decoder independent of dsputil.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Anton Khirnov
a0a872d073
indeo3: check motion vectors.
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
12 years ago
Anton Khirnov
34e6af9e20
indeo3: fix data size check
...
The data offsets are relative to the bistream header, which is 16 bytes
after the start of the data.
Fixes invalid reads with corrupted files.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
12 years ago
Anton Khirnov
66531d634e
indeo3: switch parsing the header to bytestream2
...
Also add an additional sanity check to the alt_quant table.
Fixes invalid reads with corrupted files.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
12 years ago
Diego Biurrun
6d97484d72
avcodec: av_log_ask_for_sample() ---> avpriv_request_sample()
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Ronald S. Bultje
4b642ab19b
indeo3: use hpeldsp instead of dsputil for half-pel functions.
...
This makes indeo3 independent of dsputil.
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Mans Rullgard
b9ee5f2cab
indeo3: replace use of copy_block4 with put_pixels
...
The destination is sufficiently aligned for put_pixels here.
Signed-off-by: Mans Rullgard <mans@mansr.com>
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
Paul B Mahol
b0428741c6
indeo3: move get_buffer() above decode_plane() calls
...
This ensure that decode_plane() mmx code like AV_COPY64()
does not interfere with possible float instructions in
release_buffer/get_buffer.
Found-by: Carl Eugen Hoyos
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
20ac916e6d
indeo3: release buffer before calling decode_plane
12 years ago
Paul B Mahol
b02116cc4a
Revert "Partly revert f174fba: indeo3 decoder does not support direct rendering."
...
f174fba
did not introduce DR1 flag it was already available before that.
This reverts commit 8bf44d5c96
.
12 years ago
Carl Eugen Hoyos
8bf44d5c96
Partly revert f174fba: indeo3 decoder does not support direct rendering.
12 years ago
Paul B Mahol
9051025102
lavc: remove duplicated .capabilities
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
bff5e5f8b3
indeo3: remove duplicate capabilities line.
12 years ago
Anton Khirnov
f174fbac3c
lavc: add CODEC_CAP_DR1 to all video decoders missing them
12 years ago
Kostya Shishkov
169514c440
indeo3: do not try to output more lines than we can fit
...
Internally chroma planes have multiple of four height while allocated image
planes might be smaller if CODEC_FLAG_EMU_EDGE is set. Thus we should not
output more lines of chroma than frame can accept.
Also the decoder can be safely switched to direct rendering now.
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Anton Khirnov
e4d4044339
indeo3: fix out of cell write.
...
Fixes CVE-2012-2776.
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Kostya Shishkov
6de226a2b8
indeo3: validate new frame size before resetting decoder
13 years ago
Kostya Shishkov
bc00da2701
indeo3: when freeing buffers, set pointers referencing them to NULL as well
13 years ago
Kostya Shishkov
81064a8045
indeo3: initialise pixel planes on allocation
...
This prevents decoder from reading garbage from it in case of errors later.
13 years ago
Kostya Shishkov
fc417db3f1
indeo3: ensure that decoded cell data is in 7-bit range as presumed by decoder
13 years ago
Hendrik Leppkes
4b7fa553a9
indeo3: fix motion vector validation
...
The index of the motion vector has to be checked before being
multiplied by 2 for the array index.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
13 years ago
Michael Niedermayer
4a80ebe491
indeo3: Fix reallocation code so that it doesnt become inconsistent.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
a84851bef8
indeo3dec: check mv bitstream pointer
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
8a521d57b3
indeo3dec: Fix end pointer.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago