2d221d9e06
avcodec/ffv1dec: Fix off by 1 error in quant_table_count check
...
Fixes: invalid_read.nut
Found-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-09-26 13:42:04 +02:00
10bbf6cf62
avcodec/ffv1dec: Explicitly check read_quant_table() return value
...
Forwards the error code, avoids potential integer overflow
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-09-26 13:42:04 +02:00
25df7b1c35
avcodec/ffv1dec: Fix >8bps error concealment
...
Fixes: 03_cave_girls_h264_slc24_slicecrc1_fuzzed.avi
Found-by: Dinah Handel <dinahrhandel@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-09-25 16:45:43 +02:00
b2955b6c5a
avcodec/rangecoder: Check e
...
Fixes hang.nut
Found-by: Paul B Mahol <onemda@gmail.com >
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-09-25 14:36:41 +02:00
aa6c43f3fd
avcodec/ffv1: seperate slice_count from max_slice_count
...
Fix segfault with too large slice_count
Fixes Ticket4879
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-09-24 23:53:02 +02:00
5d8e836d0e
Replace all remaining occurances of step/depth_minus1 and offset_plus1
2015-09-08 17:10:48 +02:00
b7baebb754
avcodec/ffv1dec: Print CRCs at picture debug level
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-09-02 02:11:43 +02:00
eac161451d
avcodec/ffv1dec: Check that there is enough space for the CRC in the global header
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc >
2015-09-02 02:10:31 +02:00
f0af25ae11
ffv1: Add missing ff_ prefixes
2015-08-22 08:36:20 -07:00
444e9874a7
Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
...
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
lavc: AV-prefix all codec capabilities
Conflicts:
cmdutils.c
ffmpeg.c
ffplay.c
libavcodec/8svx.c
libavcodec/aacenc.c
libavcodec/ac3dec.c
libavcodec/adpcm.c
libavcodec/alac.c
libavcodec/atrac3plusdec.c
libavcodec/bink.c
libavcodec/dnxhddec.c
libavcodec/dvdec.c
libavcodec/dvenc.c
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c
libavcodec/fic.c
libavcodec/flacdec.c
libavcodec/flacenc.c
libavcodec/flvdec.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/gifdec.c
libavcodec/h261dec.c
libavcodec/hevc.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/libopenjpegdec.c
libavcodec/libvo-aacenc.c
libavcodec/libvorbisenc.c
libavcodec/libvpxdec.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mpegaudiodec_float.c
libavcodec/msmpeg4dec.c
libavcodec/mxpegdec.c
libavcodec/nvenc_h264.c
libavcodec/nvenc_hevc.c
libavcodec/pngdec.c
libavcodec/qpeg.c
libavcodec/ra288.c
libavcodec/rv10.c
libavcodec/s302m.c
libavcodec/sp5xdec.c
libavcodec/takdec.c
libavcodec/tiff.c
libavcodec/tta.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/vp6.c
libavcodec/vp9.c
libavcodec/wavpack.c
libavcodec/yop.c
Merged-by: Michael Niedermayer <michael@niedermayer.cc >
2015-07-27 22:50:18 +02:00
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com >
2015-07-27 15:24:58 +01:00
cf52e6d012
avcodec/ffv1dec: Fix skip_alpha
...
Fixes Ticket4322
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-28 01:01:16 +02:00
d43cd6b08e
avcodec/ffv1dec: Check chroma shift parameters
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-04 14:31:45 +02:00
03baa861ea
avcodec/ffv1dec: More completely check micro_version
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-04 14:31:45 +02:00
3dfbdb328e
avcodec/ffv1dec: Check quant table symbols more completely
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-04 14:31:45 +02:00
14605a0b99
ffv1dec: plane_index is 1 in case of version 4 gray+alpha.
...
Since version 4, plane_index for the alpha plane is 1 in the case chroma_planes is 0.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2015-05-03 01:55:12 +02:00
ba625dd8a1
avcodec: use av_mod_uintp2() where useful
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at >
Signed-off-by: James Almer <jamrial@gmail.com >
2015-04-21 22:41:20 -03:00
8f7b022c8c
Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'
...
* commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25':
lavc: Replace av_dlog and tprintf with internal macros
Conflicts:
libavcodec/aacdec.c
libavcodec/audio_frame_queue.c
libavcodec/bitstream.c
libavcodec/dcadec.c
libavcodec/dnxhddec.c
libavcodec/dvbsubdec.c
libavcodec/dvdec.c
libavcodec/dvdsubdec.c
libavcodec/get_bits.h
libavcodec/gifdec.c
libavcodec/h264.h
libavcodec/h264_cabac.c
libavcodec/h264_cavlc.c
libavcodec/h264_loopfilter.c
libavcodec/h264_refs.c
libavcodec/imc.c
libavcodec/interplayvideo.c
libavcodec/jpeglsdec.c
libavcodec/libopencore-amr.c
libavcodec/mjpegdec.c
libavcodec/mpeg12dec.c
libavcodec/mpegvideo_enc.c
libavcodec/mpegvideo_parser.c
libavcodec/pngdec.c
libavcodec/ratecontrol.c
libavcodec/rv10.c
libavcodec/svq1dec.c
libavcodec/vqavideo.c
libavcodec/wmadec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-04-20 04:10:10 +02:00
6a85dfc830
lavc: Replace av_dlog and tprintf with internal macros
2015-04-19 12:41:59 +01:00
f4cc19cdd0
Merge commit 'ca09effb01e126b0ac74ff3de70a475423ddee82'
...
* commit 'ca09effb01e126b0ac74ff3de70a475423ddee82':
ffv1: Drop unnecessary casts and const qualifiers to match function signatures
Conflicts:
libavcodec/ffv1dec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2015-01-06 21:54:26 +01:00
ca09effb01
ffv1: Drop unnecessary casts and const qualifiers to match function signatures
...
libavcodec/ffv1dec.c:898:36: warning: cast discards ‘const’ qualifier from pointer target type
2015-01-05 15:35:39 +01:00
8437cc7206
ffv1dec: Avoid unnecessarily large stack usage and copies.
...
Ideally the compiler could figure this out on its own,
but it seems it can't.
An alternative that would avoid the messy explicit memcpy
would be to use a sub-struct for the parts that should
be preserved, which can then simply be assigned.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de >
2014-11-22 19:06:12 +01:00
113229922a
Merge commit 'da7d839a0d3ec40423a665dc85e0cfaed3f92eb8'
...
* commit 'da7d839a0d3ec40423a665dc85e0cfaed3f92eb8':
ffv1dec: check that global parameters do not change in version 0/1
Conflicts:
libavcodec/ffv1dec.c
See: b05cd1ea7e
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-08-12 17:09:39 +02:00
da7d839a0d
ffv1dec: check that global parameters do not change in version 0/1
...
Such changes are neither allowed nor supported
Found-by: ami_stuff
Bug-Id: CVE-2013-7020
CC: libav-stable@libav.org
Signed-off-by: Anton Khirnov <anton@khirnov.net >
2014-08-12 10:21:21 +00:00
0dceefc5fa
Merge commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2'
...
* commit '9e500efdbe0deeff1602500ebc229a0a6b6bb1a2':
Add av_image_check_sar() and use it to validate SAR
Conflicts:
libavcodec/dpx.c
libavcodec/dvdec.c
libavcodec/ffv1dec.c
libavcodec/utils.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2014-06-20 22:20:28 +02:00
9e500efdbe
Add av_image_check_sar() and use it to validate SAR
2014-06-20 10:39:33 -04:00
cc86158173
avcodec/ffv1dec: use av_malloc_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2014-05-03 20:08:18 +02:00
fb0c9d41d6
avutil: remove timer.h include from internal.h
...
Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
2014-01-25 21:50:20 +01:00
0e575c24d6
ffv1.4: use 2 coefficients for calculating the Y plane in the RCT
...
0-0.7% improved compression
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-12-10 03:16:58 +01:00
7854d2d251
avcodec/ffv1: support adjusting the g vs r + b coefficient in the RCT
...
about 1% better compression
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-12-09 00:37:38 +01:00
be1e6e7503
Merge remote-tracking branch 'qatar/master'
...
* qatar/master:
mpegvideo_enc: use the AVFrame API properly.
ffv1: use the AVFrame API properly.
jpegls: use the AVFrame API properly.
huffyuv: use the AVFrame API properly.
Conflicts:
libavcodec/ffv1.c
libavcodec/ffv1.h
libavcodec/ffv1dec.c
libavcodec/ffv1enc.c
Changes to ffv1 are more redone than merged due to them being based on
an ancient codebase and a good part of that having being done already
as well.
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-11-17 13:55:50 +01:00
a6064b12b4
ffv1: use the AVFrame API properly.
2013-11-16 17:50:51 +01:00
a90905db2e
ffv1: Assume bitdepth 0 means 8bit
...
CC: libav-stable@libav.org
Reported-by: debian/726189
2013-10-15 23:58:20 +02:00
ee77140afa
Merge commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2'
...
* commit 'b2bed9325dbd6be0da1d91ffed3f513c40274fd2':
cosmetics: Group .name and .long_name together in codec/format declarations
Conflicts:
libavcodec/8svx.c
libavcodec/alac.c
libavcodec/cljr.c
libavcodec/dnxhddec.c
libavcodec/dnxhdenc.c
libavcodec/dpxenc.c
libavcodec/dvdec.c
libavcodec/dvdsubdec.c
libavcodec/dvdsubenc.c
libavcodec/ffv1dec.c
libavcodec/flacdec.c
libavcodec/flvdec.c
libavcodec/fraps.c
libavcodec/frwu.c
libavcodec/g726.c
libavcodec/gif.c
libavcodec/gifdec.c
libavcodec/h261dec.c
libavcodec/h263dec.c
libavcodec/iff.c
libavcodec/imc.c
libavcodec/libopencore-amr.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/libspeexenc.c
libavcodec/libvo-amrwbenc.c
libavcodec/libvorbisenc.c
libavcodec/libvpxenc.c
libavcodec/libx264.c
libavcodec/libxavs.c
libavcodec/libxvid.c
libavcodec/ljpegenc.c
libavcodec/mjpegbdec.c
libavcodec/mjpegdec.c
libavcodec/mpeg12dec.c
libavcodec/mpeg4videodec.c
libavcodec/msmpeg4dec.c
libavcodec/pgssubdec.c
libavcodec/pngdec.c
libavcodec/pngenc.c
libavcodec/proresdec_lgpl.c
libavcodec/proresenc_kostya.c
libavcodec/ra144enc.c
libavcodec/rawdec.c
libavcodec/rv10.c
libavcodec/sp5xdec.c
libavcodec/takdec.c
libavcodec/tta.c
libavcodec/v210dec.c
libavcodec/vp6.c
libavcodec/wavpack.c
libavcodec/xbmenc.c
libavcodec/yop.c
Merged-by: Michael Niedermayer <michaelni@gmx.at >
2013-10-04 12:34:23 +02:00
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
2013-10-03 23:32:01 +02:00
547c2f002a
Make decoding alpha optional for some codecs.
...
For codecs where decoding of a whole plane can simply
be skipped, we should offer applications to not decode
alpha for better performance (ca. 30% less CPU usage
and 40% reduced memory bandwidth).
It also means applications do not need to implement support
(even if it is rather simple) for YUVA formats in order to be
able to play these files.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de >
2013-09-22 16:20:54 +02:00
d1a16564a2
avcodec/ffv1: YUVA(444,422,420) 9, 10 and 16 bit support
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2013-09-09 19:49:37 +00:00
a27227d401
avcodec/ffv1dec: fix format detection
...
Fixes crash with carefuly designed files.
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2013-09-09 19:49:01 +00:00
8393b80b7d
avcodec/ffv1dec: Support decoding planes as raw PCM in 1.4
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-09-09 20:19:28 +02:00
21dc3a3cc2
avcodec/ffv1dec: reorganize thread init/update
...
This moves some allocations to init, reducing possible failure modes in update.
Always copies from the previous context instead of just during init
Fixes Ticket2923
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-09-01 23:22:06 +02:00
c72cca5a44
avcodec/ffv1dec: move initial_states init to init_thread_copy()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-09-01 23:22:06 +02:00
b05cd1ea7e
ffv1dec: Check bits_per_raw_sample and colorspace for equality in ver 0/1 headers
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-30 13:53:58 +02:00
547d690d67
ffv1dec: check that global parameters dont change in version 0/1
...
Such changes are not allowed nor supported
Fixes Ticket2906
Found-by: ami_stuff
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-30 05:27:51 +02:00
20b965a1a4
avcodec/ffv1dec: check global header version
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-30 03:43:49 +02:00
d9b0b54a5f
ffv1: rename minor to micro version
...
the version is 1.3.4 which makes 4 micro and not minor
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-20 03:30:36 +02:00
2c1a215ddb
ffv1: update years in header
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-17 01:43:30 +02:00
c387c45e83
ffv1: fix plane_count at version 1.4
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-15 13:03:53 +02:00
8ec6188263
ffv1dec: support printing information about the global header
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at >
2013-08-15 12:58:48 +02:00
ae4c912bce
Forward interlaced field information from mov to ffv1 decoder.
...
Only read the information for old ffv1, level/version 3 saves
the information in the bitstream.
Fixes a part of ticket #2190 .
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at >
2013-08-02 23:31:40 +02:00
61d900fd0d
lavc: add ONLY_IF_THREADS_ENABLED where it is missing
...
Signed-off-by: Paul B Mahol <onemda@gmail.com >
2013-06-06 20:17:36 +00:00