Martin Storsjö
843b330c3c
ivi_common: Make sure color planes have been initialized
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit a92538b7c0defc86c55fb91f55dfa36aad192673)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 38bd229af9c4fa5897fc1a69e73a04c55f78647f)
2014-01-07 09:43:56 +01:00
Luca Barbato
53c76b6803
indeo: Do not reference mismatched tiles
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit f9e5261cab067be7278f73d515bc9b601eb56202)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-29 21:48:57 +02:00
Luca Barbato
7999ff8966
indeo: Sanitize ff_ivi_init_planes fail paths
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 28dda8a691f1c723a4a9365ab85f9625f1330096)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-29 21:48:30 +02:00
Luca Barbato
a0b8f85f29
indeo: Bound-check before applying motion compensation
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 25a6666f6c07c6ac8449a63d7fbce0dfd29c54cd)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-29 21:41:49 +02:00
Luca Barbato
c02b9e6e63
indeo: Bound-check before applying transform
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit dc79685195a45c9b8b17d7b93d118e0aefa45462)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/ivi_common.c
2013-09-29 21:41:12 +02:00
Luca Barbato
efe710f8a0
indeo: reject negative array indexes
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 6a10142faa1cca8ba2bfe51b970754f62d60f320)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-29 21:39:02 +02:00
Luca Barbato
aedde1a48d
indeo: Cosmetic formatting
...
Trim some overly long lines.
(cherry picked from commit 6dfacd7ab126aea1392949d1aa10fdc3d3eeb911)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Conflicts:
libavcodec/ivi_common.c
2013-09-29 21:38:28 +02:00
Luca Barbato
c5da487a38
indeo: Refactor ff_ivi_init_tiles and ivi_decode_blocks
...
Spin large and mostly self contained blocks into stand alone
functions.
(cherry picked from commit 62256010e9bc8879e2bf7f3b94af8ff85e239082)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-29 21:19:17 +02:00
Luca Barbato
f21dce6044
indeo: Refactor ff_ivi_dec_huff_desc
...
Spare an indentation level.
(cherry picked from commit f6f36ca8ca1b2526d3abff7d7c627322d3bce912)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-29 21:03:27 +02:00
Luca Barbato
36921fcdd3
indeo: Reject impossible FRAMETYPE_NULL
...
A frame marked FRAMETYPE_NULL cannot be scalable and requires a
previous frame successfully decoded.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 5b2a29552ca09edd4646b6aa1828b32912b7ab36)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-23 19:11:37 -04:00
Luca Barbato
c9d8424395
indeo: use a typedef for the mc function pointer
...
(cherry picked from commit e6d8acf6a8fba4743eb56eabe72a741d1bbee3cb)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-07-07 21:11:34 +02:00
Luca Barbato
0a1d02ca77
indeo: check for reference when inheriting mvs
...
The same is done already for qdelta.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit b36e1893ef3430f039c1eaddeedcbb378f9c4444)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-07-06 10:10:18 +02:00
Luca Barbato
7eff48029f
indeo: use proper error code
...
(cherry picked from commit dd3754a48854cd570d38db72394491aab0f36570)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavcodec/ivi_common.c
2013-07-06 10:10:17 +02:00
Luca Barbato
7658333c17
indeo: Properly forward the error codes
...
If the tile data size does not match the buffer size it did not
return an AVERROR_INVALIDDATA causing futher corruption later.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 7388c0c58601477db076e2e74e8b11f8a644384a)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Conflicts:
libavcodec/ivi_common.c
2013-07-06 10:10:17 +02:00
Anton Khirnov
6dbe931344
ivi_common: do not call MC for intra frames when dc_transform is unset
...
CC:libav-stable@libav.org
(cherry picked from commit 3ba40ebb6cc58753dc3746c718203bb31760deba)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
(cherry picked from commit 74880e78d83031d612c941a383b810ff0c9d50c6)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-03-16 08:21:01 +01:00
Anton Khirnov
3fca5799c6
ivi_common: check that scan pattern is set before using it.
...
Fixes CVE-2012-2791.
CC: libav-stable@libav.org
(cherry picked from commit deabb52ab4c1fdb3dd319f3980b1489a182011f1)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2013-01-02 20:25:32 +01:00
Michael Niedermayer
2bc1e4fcb9
indeo4: update AVCodecContext width/height on size change
...
Fixes CVE-2012-2787
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit b146d74730ab9ec5abede9066f770ad851e45fbc)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-10-14 16:03:24 -04:00
Michael Niedermayer
dc8371b2b1
indeo5dec: Make sure we have had a valid gop header.
...
This prevents decoding happening on a half initialized context.
Fixes CVE-2012-2779
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 891918431db628db17885ed947ee387b29826a64)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-10-14 16:03:24 -04:00
Anton Khirnov
0815d9174c
indeo4/5: check empty tile size in decode_mb_info().
...
This prevents writing into a too small array if some parameters changed
without the tile being reallocated.
Based on a patch by Michael Niedermayer <michaelni@gmx.at>
Fixes CVE-2012-2800
CC:libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit ae3da0ae5550053583a6f281ea7fd940497ea0d1)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-10-14 16:03:24 -04:00
Anton Khirnov
332555f660
ivi_common: make ff_ivi_process_empty_tile() static.
...
It's not used outside of ivi_common.c
(cherry picked from commit 5d2170c53bf4c2b0499f230c43764e4acf228f88)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-10-14 16:03:24 -04:00
Kostya Shishkov
c5ec190859
indeo: check for invalid motion vectors
...
(cherry picked from commit cf61aaaca16810b9b3a28395ed48fda8db0e87d9)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-10-14 16:03:23 -04:00
Kostya Shishkov
b561618014
indeo: clear allocated band buffers
...
(cherry picked from commit 23ba1503f2b11057c65052b4a07961236d8d69c7)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-10-14 16:03:23 -04:00
Kostya Shishkov
e0daa15a96
indeo: track tile macroblock size
...
(cherry picked from commit a6e4ac40a62930d3c90f869990f96fedb9a5d654)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-10-14 16:03:23 -04:00
Kostya Shishkov
911c250aef
factor out common decoding code for Indeo 4 and Indeo 5
...
(cherry picked from commit aa372cf4705343a9fff422ab9ead99cef7e0b415)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-10-14 16:03:23 -04:00
Kostya Shishkov
965302c9f3
indeo: check custom Huffman tables for errors
...
(cherry picked from commit fe7a37c36febd71576cbefc385d995a8d6e444e7)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2012-10-14 16:03:23 -04:00
Martin Storsjö
8c0bbe5156
vlc/rl: Add ff_ prefix to the nonstatic symbols
...
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit e96b4a53df101403c54e329abfadad2edddc47c4)
Conflicts:
libavcodec/4xm.c
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-29 09:34:19 +02:00
Michael Niedermayer
b18a0cc781
indeo5: Fix null pointer dereference.
...
Bug found by: Oana Stratulat
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2012-01-07 00:18:42 +01:00
Diego Biurrun
aaf47bcde7
Drop ALT_ prefix from BITSTREAM_READER_LE name.
...
The prefix is a historic remnant that probably meant "alternative".
Now that the A32 bitstream reader has been dropped it makes no sense anymore.
2011-12-22 16:51:23 +01:00
Diego Biurrun
f190f676bc
Replace custom DEBUG preprocessor trickery by the standard one.
2011-06-03 00:44:06 +02:00
Diego Biurrun
2366462429
Replace #ifdef + av_log() combinations by av_dlog().
2011-06-03 00:44:03 +02:00
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Daniel Kang
eb40d7ffa7
Check symbol validity to avoid a crash, fixes issue 2523.
...
Patch by Daniel Kang, daniel.d.kang at gmail
Originally committed as revision 26360 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 10:18:38 +00:00
Måns Rullgård
49bd8e4b84
Fix grammar errors in documentation
...
Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-30 15:38:06 +00:00
Maxim Poliakovski
79d46cbea6
Quant changes only once per MB so move the corresponding scale factor assignment
...
out of the block decoding loop. Indeo4 doesn't use any scale table but the quant
level itself as scale. Therefore access scale table only if its pointer != NULL.
Originally committed as revision 23569 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-10 17:31:12 +00:00
Maxim Poliakovski
0933f55829
Prepare Indeo4 (step 1): upscale indeo5 base tables by 2 and convert those into uint16_t.
...
Originally committed as revision 23523 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-08 09:20:12 +00:00
Maxim Poliakovski
274793de6e
Make dequantization equation use less registers on some CPUs.
...
Originally committed as revision 23391 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-30 23:57:51 +00:00
Maxim Poliakovski
9c6b3b97d7
Add the forgotten ff_ prefix to the shareable scan patterns.
...
Originally committed as revision 23341 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-26 20:22:29 +00:00
Maxim Poliakovski
220f2bd9c5
move indeo5 scan patterns into ivi_common.c
...
so those can be shared by indeo4.
Originally committed as revision 23335 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-26 13:25:16 +00:00
Diego Biurrun
ba87f0801d
Remove explicit filename from Doxygen @file commands.
...
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.
Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Maxim Poliakovski
5f1654b25b
Scale tile dimensions in case both local decoding and scalability mode
...
are used in Indeo 5 stream.
Patch by Maxim ($indeo5dec_author)
Originally committed as revision 22318 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 06:49:16 +00:00
Maxim Poliakovski
e7edeb9191
When tracking non-zero coefficients during Indeo 5 decoding, make sure
...
it does not ignore coefficient value = 256.
Patch by Maxim ((!min)_pole \at gmx dot/ de)
Originally committed as revision 22275 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-07 06:03:45 +00:00
Kostya Shishkov
e322aacedd
Encapsulate VLC information needed for decoding blocks and macroblocks in
...
Indeo 5 into single structure IVIHuffTab and factorize code using it.
Based on patch by Maxim (max_pole at German GMX)
Originally committed as revision 22092 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-27 12:32:31 +00:00
Kostya Shishkov
4982a77e56
Make it clear that ff_ivi_init_static_vlc() does not need arguments
...
Originally committed as revision 22091 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-27 12:12:56 +00:00
Kostya Shishkov
60819e694e
10l trocadero: Indeo 5 decoder did not free custom VLCs for macroblock and
...
block decoding at exit, so prevent that memory leak now.
Originally committed as revision 21983 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-23 07:41:29 +00:00
Måns Rullgård
2fc492d842
Declare indeo VLC table storage with correct type
...
Originally committed as revision 21977 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-23 03:45:51 +00:00
Kostya Shishkov
9068f36dcc
Macroblock and block Huffman code sets are to be used by both Indeo 4 and
...
Indeo 5, so make them global and move their initialization to the common place
as well. And fix static VLC initialization, as ff_ivi_create_huff_from_desc()
used old way to do so.
Originally committed as revision 21962 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-22 13:51:32 +00:00
Kostya Shishkov
1cf3168516
Indeo Video Interactive 4 and 5 common code and DSP functions.
...
Reviewed and corrected by myself because there were no other volunteers in the
last weeks.
Originally committed as revision 21531 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 08:10:17 +00:00