Commit Graph

27234 Commits

Author SHA1 Message Date
Michael Niedermayer
d9bb7fc3cb Merge commit '816e5b997028c8215c804b1e58b2388592ed612b'
* commit '816e5b997028c8215c804b1e58b2388592ed612b':
  hevc: Reject impossible slice segment

Conflicts:
	libavcodec/hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 05:40:30 +01:00
Michael Niedermayer
493f750e7a Merge commit '09e2203b8ba6943d5c0fe6d73b65b145c3fdf98e'
* commit '09e2203b8ba6943d5c0fe6d73b65b145c3fdf98e':
  hevc: Consider first quantization group any reference to 0, 0

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 05:32:12 +01:00
Michael Niedermayer
96c4ba2392 avcodec/hevc: propagate error code from hls_coding_quadtree()
Fixes use of uninitialized memory
Fixes out of array read
Fixes: asan_static-oob_123cee5_2630_cov_1869071233_PICSIZE_A_Bossen_1.bin
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 02:35:11 +01:00
Michael Niedermayer
a744064c41 avcodec/tiff: reset geotag_count in free_geotags()
Fixes null pointer dereference
Fixes: signal_sigsegv_19d922e_3688_cov_1577641655_aletrek_tiff.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-02 01:48:34 +01:00
addr-see-the-website@aetey.se
392b0345d6 RoQ-encoder: introducing Quake 3 compatibility option
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 22:32:28 +01:00
addr-see-the-website@aetey.se
80a79f2641 RoQ decoder: Remove misleading diagnostics.
It is not necessarily an error when a chunk does not cover a whole block.
Messages did not reflect the actual situation either.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 22:30:22 +01:00
Michael Niedermayer
b51e935477 avcodec/vc1: reset fcm/field_mode in non advanced header parsing
Fixes NULL pointer dereference
Fixes: signal_sigsegv_1ab8bf4_2847_cov_4254117347_SA10091.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 19:07:01 +01:00
Michael Niedermayer
dcf5bfbdb6 avcodec/vc1: Check bfraction_lut_index
Fixes: out of array read
Fixes: asan_static-oob_1b40507_2849_SA10143.vc1
Fixes: asan_static-oob_1b40a15_2849_cov_1182297305_SA10143.vc1
Fixes: asan_static-oob_1b40f15_2849_cov_2159513432_SA10143.vc1
Fixes: asan_static-oob_1b40f15_2849_cov_3230311510_SA10143.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 17:10:48 +01:00
Michael Niedermayer
388b4cf86e avcodec/vc1: factor read_bfraction() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 17:06:24 +01:00
Luca Barbato
816e5b9970 hevc: Reject impossible slice segment
A dependent slice cannot have address 0.
Prevent an out of array bound load in ff_hevc_cabac_init().

Sample-Id: 00001406-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-02-01 17:04:49 +01:00
Luca Barbato
09e2203b8b hevc: Consider first quantization group any reference to 0, 0
According to my understanding of T-REC-H.265-2013044 chapter 8.6.1.

Sample-Id: 00001438-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-02-01 17:02:35 +01:00
Michael Niedermayer
f4b288a639 avcodec/vc1dec: Print warning for frame pictures with direct mode MBs, followed by field pictures
This case is not implemented
No non fuzzed samples are known to use this

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 06:59:35 +01:00
Michael Niedermayer
85d51d8e32 avcodec/vc1dec: field pictures with direct mode MBs, followed by frame pictures are not supported
This case could occur when cuting and concatenating bitstreams

Fixes out of array read
Fixes: asan_heap-oob_1b33fdd_2849_cov_478905890_SA10143.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-02-01 06:48:44 +01:00
Michael Niedermayer
19b41f8645 avcodec/mjpegdec: use the correct linesize in the flipping code
Fixes out of array access
No releases should be affected
Depends on 7c3700cd1d, do not backport without this one

Fixes: asan_heap-oob_14a37fe_9111_cov_1692584941_test4.amv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 21:47:44 +01:00
Michael Niedermayer
f58eab1512 avcodec/takdec: always check bits_per_raw_sample
Fixes out of array access
Fixes: asan_heap-oob_19c7a94_6470_cov_1453611734_luckynight-partial.tak
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 19:54:27 +01:00
Michael Niedermayer
0de9d72b7c mxpeg_decode_end: zero bitmask size
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 18:34:14 +01:00
Michael Niedermayer
2884688bd5 avcodec/mjpegdec: pass into ff_mjpeg_decode_sos() and check bitmask size
Fixes: heap array overread
Fixes: asan_heap-oob_149b2bc_6577_m1.mxg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 18:34:08 +01:00
Michael Niedermayer
dd4237f87d Merge commit '5312818524484a995433b986a2a7a6602572d4db'
* commit '5312818524484a995433b986a2a7a6602572d4db':
  atrac3plus: Make initialization dependant on channel count rather than channel map

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 14:53:06 +01:00
Michael Niedermayer
de17ccc774 Merge commit '51daafb02eaf96e0743a37ce95a7f5d02c1fa3c2'
* commit '51daafb02eaf96e0743a37ce95a7f5d02c1fa3c2':
  x86: videodsp: Properly mark sse2 instructions in emulated_edge_mc as such.

Conflicts:
	libavcodec/x86/videodsp_init.c

See: 1b3a7e1f42
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-31 14:30:30 +01:00
Janne Grunau
7716dd9fbb xvid: switch to xvid mmx idct as soon as possible
The idct implementation cannot be changed after the quantization matrices
are read since it use a different permutaion.

Bug-Id: videolan/7411
2014-01-31 11:09:11 +01:00
Jan Ekström
5312818524 atrac3plus: Make initialization dependant on channel count rather than channel map
Makes it easier to recreate an AVCodecContext for ATRAC3+ decoding,
which is needed in multimedia frameworks, as well as in general cases
where demuxing and decoding are separate entities.
2014-01-31 11:09:10 +01:00
Clément Bœsch
c5dd73b890 x86/vp9lpf: add ff_vp9_loop_filter_h_{48,84}_16_{sse2,ssse3,avx}().
5.40s → 5.30s overall decode time with -threads 1 on ped1080p.webm
(i7 920, ssse3)
2014-01-30 19:34:13 +01:00
Ronald S. Bultje
9ee9c679a7 x86: videodsp: Fix a bug in a %if statement where we used '%%' instead of '&&'.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-01-30 15:33:23 +01:00
Ronald S. Bultje
51daafb02e x86: videodsp: Properly mark sse2 instructions in emulated_edge_mc as such.
Should fix crashes or corrupt output on pre-SSE2 CPUs when they were
using SSE2-code (e.g. AMD Athlon XP 2400+ or Intel Pentium III) in
hfix or hvar single-edge (left/right) extension functions.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-01-30 15:30:01 +01:00
Michael Niedermayer
3c7195a969 Merge commit '23d461fe8714a20ee5e6929f22c61512fdda568e'
* commit '23d461fe8714a20ee5e6929f22c61512fdda568e':
  ac3dec: Allow asymmetric application of DRC when drc_scale > 1

Conflicts:
	libavcodec/ac3dec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 14:55:03 +01:00
Carl Eugen Hoyos
e1cb6dc59e Warn the user if mjpeg cbr encoding with frame threading was requested. 2014-01-30 01:37:27 +01:00
Michael Niedermayer
1a5e8511d4 Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
  Force automatic thread_count to 1 for cbr mjpeg frame threading.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:55:29 +01:00
Michael Niedermayer
b80073c05f avcodec/mjpegdec: use av_freep() instead of av_free()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:50:43 +01:00
Michael Niedermayer
ed56c021e7 avcodec/mjpegdec Fix potential memleak of stereo3D at the end in case of decoding failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:25:04 +01:00
Carl Eugen Hoyos
cfc36666f6 Force automatic thread_count to 1 for cbr mjpeg frame threading.
Constant bit rate mjpeg encoding fails for threads > 1 and frame threading.
2014-01-30 00:22:25 +01:00
Kirill Gavrilov
e9e7e68516 mjpegdec: parse JPS extension and save relevant stereo3d information
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-30 00:17:02 +01:00
John Stebbins
23d461fe87 ac3dec: Allow asymmetric application of DRC when drc_scale > 1
Amplification of quiet sounds is enhanced.
Inspired by gbooker's A52Decoder.
2014-01-29 23:26:25 +01:00
Michael Niedermayer
fbafd64acc Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpeg: Drop unused parameters from ff_draw_horiz_band()

Conflicts:
	libavcodec/mpegvideo.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-29 17:05:51 +01:00
Diego Biurrun
54b2ce7418 mpeg: Drop unused parameters from ff_draw_horiz_band() 2014-01-29 16:37:23 +01:00
Carl Eugen Hoyos
4151b9953e Add elbg Makefile dependency to the cinepak encoder. 2014-01-28 22:39:45 +01:00
Michael Niedermayer
bb7a711156 avcodec/huffyuvenc: frame multi-threading support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-28 14:51:42 +01:00
James Almer
644c32ea4b x86/vp9lpf: add ff_vp9_loop_filter_[vh]_88_16_sse2()
Similar gains as the ssse3 version once again

Signed-off-by: James Almer <jamrial@gmail.com>
2014-01-28 09:30:55 +01:00
Clément Bœsch
222c46c531 x86/vp9lpf: add ff_vp9_loop_filter_[vh]_88_16_{ssse3,avx}.
9680 decicycles in loop_filter_v_88_16_c, 4193765 runs, 539 skips
9233 decicycles in loop_filter_h_88_16_c, 4193751 runs, 553 skips

1929 decicycles in ff_vp9_loop_filter_v_88_16_ssse3, 4194118 runs, 186 skips
2738 decicycles in ff_vp9_loop_filter_h_88_16_ssse3, 4193861 runs, 443 skips

5.978 → 5.417 overall decode time on ped1080p.webm (-threads 1)

Adding SSE2 support should be relatively trivial (just a matter of
changing the pshufb [mask_mix] with something else), patch welcome.
2014-01-28 07:36:38 +01:00
Michael Niedermayer
2a9c50798b avcodec/huffyuv: dont depend on bitstream_bpp having a specific value for version>2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-28 00:27:57 +01:00
Michael Niedermayer
673ce8e46a avcodec/libfdk-aacenc: change MODE_7_1_FRONT_CENTER to map to AV_CH_LAYOUT_7POINT1_WIDE_BACK
This was suggested by Rodeo on IRC
<Rodeo> for consistency with the rest, MODE_7_1_FRONT_CENTER would be AV_CH_LAYOUT_7POINT1_WIDE_BACK (since LS+RS is mapped to back channels in other modes)

Reviewed-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 23:33:10 +01:00
Michael Niedermayer
a38842120a avcodec/libfdk-aacenc: change MODE_7_1_REAR_SURROUND to map to AV_CH_LAYOUT_7POINT1
This was suggested by Rodeo on IRC
<Rodeo> sorry, I meant MODE_7_1_REAR_SURROUND would probably be AV_CH_LAYOUT_7POINT1

Reviewed-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 23:33:10 +01:00
Clément Bœsch
822385d775 x86/vp9lpf: add a preload system in FILTER_UPDATE.
Allow some macro refactoring in filter14().
2014-01-27 22:39:26 +01:00
Clément Bœsch
315b4775ad x86/vp9lpf: refactor v/h using common macros for P7 to Q7. 2014-01-27 22:39:26 +01:00
Clément Bœsch
5d144086cc x86/vp9lpf: faster P7..Q7 accesses.
Introduce 2 additional registers for stride3 and mstride3 to allow
direct accesses (lea drops).

3931 → 3827 decicycles in ff_vp9_loop_filter_v_16_16_ssse3

Also uses defines to clarify the code.
2014-01-27 22:37:42 +01:00
Carl Eugen Hoyos
05e5bb6107 Fix decoding of some 8 < bpc < 16 signed j2k samples with libopenjpeg.
No testcase known.

Reviewed-by: Michael Bradshaw
2014-01-27 14:38:59 +01:00
Rainer Hochecker
bceeccc648 dxva2: bump maximum number of slieces for mpeg2
Suggested by heleppkes on https://trac.ffmpeg.org/ticket/3133

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 14:24:29 +01:00
Michael Niedermayer
6369766f01 avcodec/huffyuv: support gbrp9/10/12/14
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 02:11:29 +01:00
Michael Niedermayer
7cf8918b0d avcodec/huffyuv: update years in copyright
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-27 01:45:57 +01:00
Ronald S. Bultje
c2871568cf vp9: fix invalid ref frame w/h on size change.
Fixes invalid reads and crashes in vp90-2-05-resize.webm and fuzzed6.ivf.
The output is still not identical to what libvpx does (because we don't
actually scale in MC).

Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 20:16:01 +01:00
Ronald S. Bultje
d9343c3484 vp9: disable use_last_frame_mvs on resolution change (scalable).
Prevents some invalid memory accesses after resolution change in
vp90-2-05-resize.webm, and libvpx does this too.

Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-01-26 20:15:45 +01:00