summaryrefslogtreecommitdiffstats
path: root/libavcodec/lcldec.c
Commit message (Collapse)AuthorAgeFilesLines
* cosmetics: Align codec declarationsMartin Storsjö2012-04-061-2/+2
| | | | | | | 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>
* lcl: return negative error codes on decode_init() errors.Ronald S. Bultje2012-03-011-7/+7
| | | | | Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* lcl: error out if uncompressed input buffer is smaller than framesize.Ronald S. Bultje2012-02-241-1/+22
| | | | | | | | This prevents crashes when trying to read beyond the end of the buffer while decoding frame data. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* lcl: don't overwrite input memory.Ronald S. Bultje2012-02-231-3/+8
| | | | | | | If the PNG filter is enabled, a PNG-style filter will run over the input buffer, writing into the buffer. Therefore, if no zlib compression was used, ensure that we copy into a temporary buffer, otherwise we overwrite user-provided input data.
* lavc: use designated initialisers for all codecs.Anton Khirnov2011-07-291-18/+16
| | | | It's more readable and less prone to breakage.
* doxygen: Consistently use '@' instead of '\' for Doxygen markup.Diego Biurrun2011-06-241-7/+7
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.Diego Elio Pettenò2011-01-261-2/+2
| | | | | | | None of these symbols should be accessed directly, so declare them as hidden. Signed-off-by: Mans Rullgard <mans@mansr.com>
* Move #ifdef before zlib_decomp() up so it covers the Doxygen comments.Diego Biurrun2010-07-021-1/+1
| | | | | | Otherwise Doxygen gets confused and cannot map comments to functions. Originally committed as revision 23988 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove explicit filename from Doxygen @file commands.Diego Biurrun2010-04-201-1/+1
| | | | | | | | 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
* Define AVMediaType enum, and use it instead of enum CodecType, whichStefano Sabatini2010-03-301-2/+2
| | | | | | is deprecated and will be dropped at the next major bump. Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove unnecessary calls to avcodec_check_dimensions, the check is alreadyReimar Döffinger2009-10-131-4/+0
| | | | | | done at a higher level. Originally committed as revision 20229 to svn://svn.ffmpeg.org/ffmpeg/trunk
* add #if CONFIG_ZLIB_DECODER around zlib_decomp function.Reimar Döffinger2009-05-311-0/+2
| | | | | | Fixes compilation when zlib is not available. Originally committed as revision 19069 to svn://svn.ffmpeg.org/ffmpeg/trunk
* mszh decompression: add a special case for an all-0 mask, i.e. 32 uncompressedReimar Döffinger2009-05-311-0/+7
| | | | | | | | bytes in a row. About 15% faster mszh_decomp on an Atom N270 for http://samples.mplayerhq.hu/V-codecs/mszh-zlib/avimzsh_sample.avi Originally committed as revision 19068 to svn://svn.ffmpeg.org/ffmpeg/trunk
* lcldec: ensure that the offset for av_memcpy_backptr is valid.Reimar Döffinger2009-05-311-0/+1
| | | | Originally committed as revision 19067 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix memleak due to c->decomp_buf never being freed.Reimar Döffinger2009-05-311-0/+2
| | | | Originally committed as revision 19064 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Only call inflateEnd when we were actually using the zlib code.Reimar Döffinger2009-05-311-1/+2
| | | | Originally committed as revision 19063 to svn://svn.ffmpeg.org/ffmpeg/trunk
* avctx->priv_data is initialized to 0, get rid of useless extra initialization.Reimar Döffinger2009-05-311-7/+0
| | | | Originally committed as revision 19062 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Merge variable declaration and initialization.Reimar Döffinger2009-05-311-3/+2
| | | | Originally committed as revision 19061 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use int-size types instead of char where it makes no difference.Reimar Döffinger2009-05-311-2/+2
| | | | Originally committed as revision 19060 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Take advantage of available input padding to optimize mszh_decompReimar Döffinger2009-05-311-8/+7
| | | | Originally committed as revision 19059 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change maskbit variable to contain (1 << maskbit)Reimar Döffinger2009-05-311-2/+3
| | | | Originally committed as revision 19058 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove check that thanks to padding is no longer necessary.Reimar Döffinger2009-05-311-2/+0
| | | | Originally committed as revision 19057 to svn://svn.ffmpeg.org/ffmpeg/trunk
* 100l, the compression field in lcl extradata must be interpreted asReimar Döffinger2009-05-311-1/+1
| | | | | | | int8_t, not uint8_t to allow -1 for "no compression". The original code worked, but only when char was signed. Originally committed as revision 19056 to svn://svn.ffmpeg.org/ffmpeg/trunk
* One more use for FFMIN.Reimar Döffinger2009-05-311-3/+1
| | | | Originally committed as revision 19055 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Pad the decompression buffer and use av_memcpy_backptr for the mszh ↵Reimar Döffinger2009-05-311-5/+5
| | | | | | decompression. Originally committed as revision 19054 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Mark srcptr as const in mszh_decompReimar Döffinger2009-05-311-2/+2
| | | | Originally committed as revision 19053 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove unnecessary put_bits/get_bits includes.Reimar Döffinger2009-05-311-1/+0
| | | | Originally committed as revision 19052 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use bytestream_get_le16 to simplify offset/count calculation for mszh ↵Reimar Döffinger2009-05-311-4/+3
| | | | | | decompression. Originally committed as revision 19051 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove useless & 0x1fReimar Döffinger2009-05-311-1/+1
| | | | Originally committed as revision 19050 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Document padding requirements of mszh_decomp srcptr bufferReimar Döffinger2009-05-311-0/+3
| | | | Originally committed as revision 19049 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use srcptr_end variable to avoid having to update both srcptr and srclen.Reimar Döffinger2009-05-311-4/+2
| | | | Originally committed as revision 19048 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change buffer size checks to avoid the undefined overflow case.Reimar Döffinger2009-05-311-2/+2
| | | | Originally committed as revision 19047 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Simply use memcpy instead of AV_RN32/AV_WN32 combination.Reimar Döffinger2009-05-311-1/+1
| | | | Originally committed as revision 19046 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix decoding of multithread-encoded lcl files on big-endian.Reimar Döffinger2009-05-311-4/+4
| | | | Originally committed as revision 19045 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove another useless ()Reimar Döffinger2009-05-311-1/+1
| | | | Originally committed as revision 19044 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Correct calculation of compressed input length.Reimar Döffinger2009-05-311-2/+2
| | | | Originally committed as revision 19043 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add sanity check for mthread_inlen, avoids crashes due to invalid reads.Reimar Döffinger2009-05-311-0/+2
| | | | Originally committed as revision 19042 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use FFMINReimar Döffinger2009-05-311-4/+2
| | | | Originally committed as revision 19041 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Factor out zlib decompression code to avoid massive code duplication,Reimar Döffinger2009-05-311-55/+40
| | | | | | particularly due to error checks. Originally committed as revision 19040 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use FFALIGNReimar Döffinger2009-05-311-1/+1
| | | | Originally committed as revision 19039 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move variable into block where it is used, avoiding a unused variableReimar Döffinger2009-05-311-1/+1
| | | | | | warning if the zlib decoder is disabled. Originally committed as revision 19038 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make lcldec less annoyingly verbose, move messages from AV_LOG_INFO to ↵Reimar Döffinger2009-05-311-15/+15
| | | | | | AV_LOG_DEBUG. Originally committed as revision 19037 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Get rid of unreachable code: avctx->codec_id == CODEC_ID_ZLIB is not possibleReimar Döffinger2009-05-311-15/+6
| | | | | | here when the zlib decoder is disabled and libavcodec is used correctly. Originally committed as revision 19036 to svn://svn.ffmpeg.org/ffmpeg/trunk
* lcldec.c: change #if CONFIG_ZLIB to #if CONFIG_ZLIB_DECODER.Reimar Döffinger2009-05-311-8/+8
| | | | | | | The zlib related code should not be compiled in when the decoder is disabled and it thus will never be used, even if we have zlib available. Originally committed as revision 19035 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Get rid of extradata casts, it already has the right uint8_t * typeReimar Döffinger2009-05-311-5/+5
| | | | Originally committed as revision 19034 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Make lcldec produce YUV output when the input file is coded like that, insteadReimar Döffinger2009-05-311-103/+59
| | | | | | of having it do its own inefficient fixed-point YUV to RGB conversion. Originally committed as revision 19033 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use memcpy instead of per-pixel copy loop for rgb lcl formatReimar Döffinger2009-05-301-6/+2
| | | | Originally committed as revision 18997 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Remove useless () from lcldec for more consistency with "normal" FFmpeg ↵Reimar Döffinger2009-05-301-30/+30
| | | | | | coding style. Originally committed as revision 18995 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use av_clip_uint8 instead of equivalent but unoptimzed code,Reimar Döffinger2009-05-291-5/+1
| | | | Originally committed as revision 18985 to svn://svn.ffmpeg.org/ffmpeg/trunk
OpenPOWER on IntegriCloud