ffmpeg.git
3 years agoavfilter/af_astats: also measure maximal difference between two consecutive samples
Paul B Mahol [Wed, 15 Jul 2015 19:00:25 +0000 (19:00 +0000)]
avfilter/af_astats: also measure maximal difference between two consecutive samples

While here also mention bit depth in documentation.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavcodec/hap: move some per-stream setup into decoder init rather than per-frame
Tom Butterworth [Thu, 16 Jul 2015 12:23:21 +0000 (13:23 +0100)]
avcodec/hap: move some per-stream setup into decoder init rather than per-frame

This change will reject frames with a texture type which doesn't match the stream description.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 MC functions
Shivraj Patil [Thu, 9 Jul 2015 13:15:26 +0000 (18:45 +0530)]
avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for VP9 MC functions

This patch adds MSA (MIPS-SIMD-Arch) optimizations for VP9 MC functions in new file vp9_mc_msa.c

Signed-off-by: Shivraj Patil <shivraj.patil@imgtec.com>
Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoswscale/ppc/yuv2rgb_altivec: POWER LE support in the macros vec_unh() and vec_unl()
Rong Yan [Thu, 16 Jul 2015 08:52:47 +0000 (03:52 -0500)]
swscale/ppc/yuv2rgb_altivec: POWER LE support in the macros vec_unh() and vec_unl()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec: loongson optimized idctdsp with mmi
周晓勇 [Thu, 16 Jul 2015 07:07:14 +0000 (15:07 +0800)]
avcodec: loongson optimized idctdsp with mmi

Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec: loongson add constant definition
周晓勇 [Thu, 16 Jul 2015 07:06:27 +0000 (15:06 +0800)]
avcodec: loongson add constant definition

Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/pthread_frame: clear priv_data, avoid stale pointer in error case
Michael Niedermayer [Thu, 16 Jul 2015 09:52:33 +0000 (11:52 +0200)]
avcodec/pthread_frame: clear priv_data, avoid stale pointer in error case

Fixes: b4b47bc2b3fb7ca710bfffe5aa969e37_signal_sigabrt_7ffff70eccc9_744_nc_sample2.avi with memlimit of 4194304

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavc: Add properties field to AVCodecContext.
Carl Eugen Hoyos [Thu, 16 Jul 2015 07:47:55 +0000 (09:47 +0200)]
lavc: Add properties field to AVCodecContext.

The new field can hold information about losslessness and closed captions for now.

3 years agoavfilter/vf_smartblur: use the name 's' for the pointer to the private context
Paul B Mahol [Wed, 15 Jul 2015 03:54:00 +0000 (03:54 +0000)]
avfilter/vf_smartblur: use the name 's' for the pointer to the private context

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/af_astats: calculate audio bit-depth
Paul B Mahol [Mon, 13 Jul 2015 08:49:26 +0000 (08:49 +0000)]
avfilter/af_astats: calculate audio bit-depth

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter: add erosion, dilation, deflate & inflate filter
Paul B Mahol [Wed, 25 Feb 2015 09:34:32 +0000 (09:34 +0000)]
avfilter: add erosion, dilation, deflate & inflate filter

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agotests/checkasm/checkasm: Give macro a body to avoid potential unexpected syntax issues
Michael Niedermayer [Thu, 16 Jul 2015 02:02:51 +0000 (04:02 +0200)]
tests/checkasm/checkasm: Give macro a body to avoid potential unexpected syntax issues

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/utils: Fix regression with H264 stream probing
Michael Niedermayer [Thu, 16 Jul 2015 01:37:43 +0000 (03:37 +0200)]
avformat/utils: Fix regression with H264 stream probing

Fixes Ticket4725

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/utils: Print stream number in max_analyze_duration exit path
Michael Niedermayer [Thu, 16 Jul 2015 01:30:24 +0000 (03:30 +0200)]
avformat/utils: Print stream number in max_analyze_duration exit path

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agolavf/rtpenc_jpeg: Fix sending multiple quantization tables.
Carl Eugen Hoyos [Wed, 15 Jul 2015 22:36:13 +0000 (00:36 +0200)]
lavf/rtpenc_jpeg: Fix sending multiple quantization tables.

3 years agoapng: Fix wrong default final frame delay in muxer
Donny Yang [Mon, 13 Jul 2015 08:17:42 +0000 (08:17 +0000)]
apng: Fix wrong default final frame delay in muxer

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit '2cb34f82b92c15b811f5c03dc7f61a4baf6e02e3'
Michael Niedermayer [Wed, 15 Jul 2015 20:43:43 +0000 (22:43 +0200)]
Merge commit '2cb34f82b92c15b811f5c03dc7f61a4baf6e02e3'

* commit '2cb34f82b92c15b811f5c03dc7f61a4baf6e02e3':
  checkasm: Add unit tests for h264qpel

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit '4512ee78e19fdb011bdec1b3a8dc0b315c82a81e'
Michael Niedermayer [Wed, 15 Jul 2015 19:29:07 +0000 (21:29 +0200)]
Merge commit '4512ee78e19fdb011bdec1b3a8dc0b315c82a81e'

* commit '4512ee78e19fdb011bdec1b3a8dc0b315c82a81e':
  mpegts: Mark the muxer as supporting variable fps

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit 'c88c5eef53ff1619724ba47b722da64ec0593dab'
Michael Niedermayer [Wed, 15 Jul 2015 19:21:40 +0000 (21:21 +0200)]
Merge commit 'c88c5eef53ff1619724ba47b722da64ec0593dab'

* commit 'c88c5eef53ff1619724ba47b722da64ec0593dab':
  hevc: Split the struct setup from the pps parsing

Conflicts:
libavcodec/hevc_ps.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/mpeg4videodec: Clarify the mpeg4_unpack_bframes reference.
Michael Niedermayer [Wed, 15 Jul 2015 19:05:24 +0000 (21:05 +0200)]
avcodec/mpeg4videodec: Clarify the mpeg4_unpack_bframes reference.

This should avoid misunderstandings like in Ticket4618

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoswscale/utils: Clear pix buffers
Michael Niedermayer [Wed, 15 Jul 2015 17:20:19 +0000 (19:20 +0200)]
swscale/utils: Clear pix buffers

Fixes use of uninitialized memory
Fixes: a96874b9466b6edc660a519c7ad47977_signal_sigsegv_7ffff713351a_744_nc_sample.avi with memlimit 2147483648

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agocheckasm: Add unit tests for h264qpel
Henrik Gramner [Mon, 13 Jul 2015 21:11:25 +0000 (23:11 +0200)]
checkasm: Add unit tests for h264qpel

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
3 years agompegts: Mark the muxer as supporting variable fps
Luca Barbato [Tue, 30 Jun 2015 14:24:12 +0000 (16:24 +0200)]
mpegts: Mark the muxer as supporting variable fps

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
3 years agohevc: Split the struct setup from the pps parsing
Luca Barbato [Tue, 14 Jul 2015 10:31:15 +0000 (12:31 +0200)]
hevc: Split the struct setup from the pps parsing

3 years agoavcodec/mips/mpegvideo_mmi: Use av_assert2()
Michael Niedermayer [Wed, 15 Jul 2015 14:37:58 +0000 (16:37 +0200)]
avcodec/mips/mpegvideo_mmi: Use av_assert2()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec: loongson optimized mpegvideo dct unquantize with mmi
ZhouXiaoyong [Thu, 9 Jul 2015 06:34:21 +0000 (14:34 +0800)]
avcodec: loongson optimized mpegvideo dct unquantize with mmi

Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec: loongson optimized h264pred with mmi
周晓勇 [Thu, 9 Jul 2015 09:10:42 +0000 (17:10 +0800)]
avcodec: loongson optimized h264pred with mmi

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoconfigure: loongson disable expensive optimizations in gcc O3 optimization
周晓勇 [Wed, 15 Jul 2015 09:28:31 +0000 (17:28 +0800)]
configure: loongson disable expensive optimizations in gcc O3 optimization

With gcc-4.9.2 loongson faild in test fate-dca, this is caused by option
-fexpensive-optimizations in -O3 optimization. We disable it temporarily
before the bug been fixed up.

Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/internal: add more words to sentance
Michael Niedermayer [Wed, 15 Jul 2015 11:09:41 +0000 (13:09 +0200)]
avfilter/internal: add more words to sentance

Hopefully fixes english syntax

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMAINTAINERS: add myself as libkvazaar maintainer
Arttu Ylä-Outinen [Wed, 15 Jul 2015 06:01:23 +0000 (09:01 +0300)]
MAINTAINERS: add myself as libkvazaar maintainer

Signed-off-by: Arttu Ylä-Outinen <arttu.yla-outinen@tut.fi>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: Implement a same origin policy for references instead of only allowing...
Michael Niedermayer [Wed, 15 Jul 2015 10:18:52 +0000 (12:18 +0200)]
avformat/mov: Implement a same origin policy for references instead of only allowing a subset of relative pathes in references

Fixes Ticket4671

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/x86/vf_psnr.asm: split one line of license text into two
Paul B Mahol [Tue, 14 Jul 2015 23:54:26 +0000 (23:54 +0000)]
avfilter/x86/vf_psnr.asm: split one line of license text into two

Signed-off-by: Paul B Mahol <onemda@gmail.com>
3 years agoavfilter/vf_removegrain: add x86 and x86_64 SSE2 functions
James Darnley [Tue, 14 Jul 2015 23:48:47 +0000 (23:48 +0000)]
avfilter/vf_removegrain: add x86 and x86_64 SSE2 functions

Speed of all modes increased by a factor between 7.4 and 19.8 largely depending
on whether bytes are unpacked into words.  Modes 2, 3, and 4 have been sped-up
by a factor of 43 (thanks quick sort!)

All modes are available on x86_64 but only modes 1, 10, 11, 12, 13, 14, 19, 20,
21, and 22 are available on x86 due to the number of SIMD registers used.

With a contribution from James Almer <jamrial@gmail.com>

3 years agoavcodec/mjpegdec: Fix DC overflow in decode_block()
Michael Niedermayer [Wed, 15 Jul 2015 02:59:35 +0000 (04:59 +0200)]
avcodec/mjpegdec: Fix DC overflow in decode_block()

Fixes Ticket4683

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/utils: inform the user if the protocol cannot be determined
Michael Niedermayer [Wed, 15 Jul 2015 01:44:00 +0000 (03:44 +0200)]
avformat/utils: inform the user if the protocol cannot be determined

Assuming the wrong protocol can lead to suboptimal seeking performance

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/utils: adjust short skip threshold in ff_configure_buffers_for_index() to...
Michael Niedermayer [Wed, 15 Jul 2015 01:35:08 +0000 (03:35 +0200)]
avformat/utils: adjust short skip threshold in ff_configure_buffers_for_index() to avoid seeking if a packet is skiped

Fixes Ticket4126

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: Fix opening relative references
Michael Niedermayer [Tue, 14 Jul 2015 23:01:30 +0000 (01:01 +0200)]
avformat/mov: Fix opening relative references

Possibly fixes Ticket4671

the removed check is wrong and insufficient

Based on patch by Maksym Veremeyenko <verem@m1.tv>

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/mpeg12dec: Fix decoding of faulty interlaced mpeg2
Michael Niedermayer [Tue, 14 Jul 2015 21:58:08 +0000 (23:58 +0200)]
avcodec/mpeg12dec: Fix decoding of faulty interlaced mpeg2

Fixes Ticket4721

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/internal: Improve docs about ff_request_frame()
Michael Niedermayer [Tue, 14 Jul 2015 17:44:59 +0000 (19:44 +0200)]
avfilter/internal: Improve docs about ff_request_frame()

Reviewed-by: James Darnley <james.darnley@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/nvenc: Fix build with older gcc versions
Timo Rothenpieler [Tue, 14 Jul 2015 20:58:54 +0000 (22:58 +0200)]
avcodec/nvenc: Fix build with older gcc versions

Aparently anonymous structs weren't always supported, not even sure if
they are standard conformant.

3 years agoavformat: don't crash API users when demuxing mp4
wm4 [Tue, 14 Jul 2015 19:08:24 +0000 (21:08 +0200)]
avformat: don't crash API users when demuxing mp4

This code is one big chunk of WTF.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec: add libkvazaar HECV encoder
Arttu Ylä-Outinen [Tue, 14 Jul 2015 05:53:35 +0000 (08:53 +0300)]
avcodec: add libkvazaar HECV encoder

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agovf_psnr: sse2 optimizations for sum-squared-error.
Ronald S. Bultje [Sun, 12 Jul 2015 10:44:39 +0000 (06:44 -0400)]
vf_psnr: sse2 optimizations for sum-squared-error.

The internal line accumulator for 16bit can overflow, so I changed that
from int to uint64_t in the C code. The matching assembly looks a little
weird but output looks correct.

(avx2 should be trivial to add later.)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavutil/fifo: Fix the case where func() returns less bytes than requested in av_fifo_g...
Zhang Rui [Tue, 14 Jul 2015 06:47:26 +0000 (14:47 +0800)]
avutil/fifo: Fix the case where func() returns less bytes than requested in av_fifo_generic_write()

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffmpeg: Fix cleanup after failed allocation of output_files
Michael Niedermayer [Tue, 14 Jul 2015 13:49:41 +0000 (15:49 +0200)]
ffmpeg: Fix cleanup after failed allocation of output_files

Fixes: 39a25908b84604acdaa490138282d091_signal_sigsegv_7ffff713351a_331_WAWV.avi with memlimit of 262144

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: Fix deallocation when MOVStreamContext failed to allocate
Michael Niedermayer [Tue, 14 Jul 2015 12:14:16 +0000 (14:14 +0200)]
avformat/mov: Fix deallocation when MOVStreamContext failed to allocate

Fixes: 260813283176b57b3c9974fe284eebc3_signal_sigsegv_7ffff713351a_991_xtrem_e2_m64q15_a32sxx.3gp with memlimit of 262144

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavfilter/vf_ssim: Fix "incompatible pointer type" warnings
Michael Niedermayer [Tue, 14 Jul 2015 11:29:55 +0000 (13:29 +0200)]
avfilter/vf_ssim: Fix "incompatible pointer type" warnings

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffmpeg: Fix crash with ost->last_frame allocation failure
Michael Niedermayer [Tue, 14 Jul 2015 11:02:19 +0000 (13:02 +0200)]
ffmpeg: Fix crash with ost->last_frame allocation failure

Fixes: 1013dbde2c360d939cc2dfc33e4f275c_signal_sigsegv_a0500f_45_320vp3.nsv with memlimit of 536870912

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffmpeg: Fix deallocating input threads with partly failed file allocation
Michael Niedermayer [Tue, 14 Jul 2015 10:40:04 +0000 (12:40 +0200)]
ffmpeg: Fix deallocating input threads with partly failed file allocation

Fixes: 18615ff56beedc63a884a8db0678b47c_signal_sigsegv_7ffff713351a_991_xtrem_e2_m64q15_a32sxx.3gp with memlimit of 524288

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agovf_ssim: x86 simd for ssim_4x4xN and ssim_endN.
Ronald S. Bultje [Sun, 12 Jul 2015 23:33:06 +0000 (19:33 -0400)]
vf_ssim: x86 simd for ssim_4x4xN and ssim_endN.

Both are 2-2.5x faster than their C counterpart.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavutil/mem_internal: add missing header includes
James Almer [Mon, 13 Jul 2015 21:05:48 +0000 (18:05 -0300)]
avutil/mem_internal: add missing header includes

Fixes make checkheaders

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agolibavcodec/qsv.c: Issue fixed: QSV engine does not release display handler under...
Ivan Uskov [Mon, 13 Jul 2015 14:17:54 +0000 (10:17 -0400)]
libavcodec/qsv.c: Issue fixed: QSV engine does not release display handler under linux platform.

Reviewed-by: Gwenole Beauchesne <gb.devel@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit 'a5a6a786bfebb85c269abc25559fd71963983581'
Michael Niedermayer [Mon, 13 Jul 2015 23:46:16 +0000 (01:46 +0200)]
Merge commit 'a5a6a786bfebb85c269abc25559fd71963983581'

* commit 'a5a6a786bfebb85c269abc25559fd71963983581':
  mp3: Forward seeking errors

Conflicts:
libavformat/mp3dec.c

No change as the avio_seek() that are part of seeking in mp3 are already
checked in FFmpeg

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit '32c8d89c036b0e75ece74aea638df587099def0b'
Michael Niedermayer [Mon, 13 Jul 2015 23:33:58 +0000 (01:33 +0200)]
Merge commit '32c8d89c036b0e75ece74aea638df587099def0b'

* commit '32c8d89c036b0e75ece74aea638df587099def0b':
  hevc: Print the non-supported chroma_format_idc

Conflicts:
libavcodec/hevc_ps.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit '8e373fe048812a25b238ea60a7052b8c07639a42'
Michael Niedermayer [Mon, 13 Jul 2015 23:23:39 +0000 (01:23 +0200)]
Merge commit '8e373fe048812a25b238ea60a7052b8c07639a42'

* commit '8e373fe048812a25b238ea60a7052b8c07639a42':
  hevc: Factor out the pixel format mapping from the sps parser

Conflicts:
libavcodec/hevc_ps.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit 'c571424c7f6276a6374e1784ce2a33d4b6a4292d'
Michael Niedermayer [Mon, 13 Jul 2015 22:54:51 +0000 (00:54 +0200)]
Merge commit 'c571424c7f6276a6374e1784ce2a33d4b6a4292d'

* commit 'c571424c7f6276a6374e1784ce2a33d4b6a4292d':
  asfdec: prevent memory leaks found with Coverity Scan

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/mpegvideo: Fix null pointer dereference of picture array
Michael Niedermayer [Mon, 13 Jul 2015 22:07:53 +0000 (00:07 +0200)]
avcodec/mpegvideo: Fix null pointer dereference of picture array

Fixes: 0d0a2bace067d09c08f0fa5340496c23_signal_sigsegv_7ffff713351a_342_WobblyWindowsIntro.avi with memlimit of 67108864

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoffmpeg: Fix cleanup with ost = NULL
Michael Niedermayer [Mon, 13 Jul 2015 21:33:18 +0000 (23:33 +0200)]
ffmpeg: Fix cleanup with ost = NULL

Fixes: 09e670595acbdafb226974b08dab66e3_signal_sigabrt_7ffff70eccc9_991_xtrem_e2_m64q15_a32sxx.3gp with memlimit of 1048576

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/hevc_parser: Fix memleaks in parser mix
Michael Niedermayer [Mon, 13 Jul 2015 20:26:53 +0000 (22:26 +0200)]
avcodec/hevc_parser: Fix memleaks in parser mix

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/oggdec: Check buf before copying data in to it
Michael Niedermayer [Mon, 13 Jul 2015 19:44:26 +0000 (21:44 +0200)]
avformat/oggdec: Check buf before copying data in to it

Fixes null pointer dereference
Fixes: aace024653cc62947336b86f8de812ab_signal_sigsegv_a0500f_343_WobblyWindowsIntro.ogg with memlimit 262144

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/pthread_frame: check avctx on deallocation
Michael Niedermayer [Mon, 13 Jul 2015 19:19:04 +0000 (21:19 +0200)]
avcodec/pthread_frame: check avctx on deallocation

Fixes null pointer dereferences
Fixes: af1a5a33e67e479f439239097bd0d4fd_signal_sigsegv_7ffff713351a_152_Dolby_Rain_Logo.pmp with memlimit of 8388608

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agomp3: Forward seeking errors
Luca Barbato [Sun, 12 Jul 2015 13:48:00 +0000 (15:48 +0200)]
mp3: Forward seeking errors

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
3 years agohevc: Print the non-supported chroma_format_idc
Luca Barbato [Sun, 12 Jul 2015 22:48:49 +0000 (00:48 +0200)]
hevc: Print the non-supported chroma_format_idc

And drop the spurious newline.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
3 years agohevc: Factor out the pixel format mapping from the sps parser
Luca Barbato [Sun, 12 Jul 2015 22:48:48 +0000 (00:48 +0200)]
hevc: Factor out the pixel format mapping from the sps parser

The function will grow larger as more formats are supported.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
3 years agoasfdec: prevent memory leaks found with Coverity Scan
Alexandra Hájková [Mon, 13 Jul 2015 10:02:03 +0000 (12:02 +0200)]
asfdec: prevent memory leaks found with Coverity Scan

Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 years agoavcodec/hevc_parser: use the old parser only when hevc decoder is available
James Almer [Mon, 13 Jul 2015 17:10:31 +0000 (14:10 -0300)]
avcodec/hevc_parser: use the old parser only when hevc decoder is available

If it's not, then the new dependence-free parser will be used instead

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavutil/frame: fix crash with av_frame_unref(NULL)
Michael Niedermayer [Mon, 13 Jul 2015 17:25:03 +0000 (19:25 +0200)]
avutil/frame: fix crash with av_frame_unref(NULL)

Fixes: af94b3a3d26586c08f557cafe8246251_signal_sigsegv_7ffff713351a_343_XFMode.ASF with 2097152 alloc limit

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/mpegvideo: Check for NULL in ff_mpv_common_end()
Michael Niedermayer [Mon, 13 Jul 2015 17:18:08 +0000 (19:18 +0200)]
avcodec/mpegvideo: Check for NULL in ff_mpv_common_end()

Fixes: af94b3a3d26586c08f557cafe8246251_signal_sigsegv_7ffff713351a_343_XFMode.ASF with 1048576 alloc limit

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/vp3: check current_frame before accessing it
Michael Niedermayer [Mon, 13 Jul 2015 17:10:59 +0000 (19:10 +0200)]
avcodec/vp3: check current_frame before accessing it

Fixes null pointer dereference
Fixes: b15eb06e0111e94bc59123c86db7aff9_signal_sigsegv_a0500f_45_320vp3.nsv with allocation limit  536870912

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoconfigure: Fix build with --disable-decoders --enable-parser=hevc
Michael Niedermayer [Mon, 13 Jul 2015 15:42:44 +0000 (17:42 +0200)]
configure: Fix build with --disable-decoders --enable-parser=hevc

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit '1b9a8e5f1d007ea19f04032490d681becd0d4e6a'
Michael Niedermayer [Mon, 13 Jul 2015 15:11:17 +0000 (17:11 +0200)]
Merge commit '1b9a8e5f1d007ea19f04032490d681becd0d4e6a'

* commit '1b9a8e5f1d007ea19f04032490d681becd0d4e6a':
  dxva2_hevc: unbreak compilation after recent sps/pps changes

See: 1aab5d8ab1e27449a2d58d6f001bb34784f402bf
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit 'a062a55d37720abc8c704aa0e8682efd3cdc9c9b'
Michael Niedermayer [Mon, 13 Jul 2015 15:04:13 +0000 (17:04 +0200)]
Merge commit 'a062a55d37720abc8c704aa0e8682efd3cdc9c9b'

* commit 'a062a55d37720abc8c704aa0e8682efd3cdc9c9b':
  hevc_parser: fix standalone build with the hevc decoder disabled

Conflicts:
libavcodec/Makefile
libavcodec/hevc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit 'b9f76d19d81fbc7f088536f966c2d3dc23c34ddc'
Michael Niedermayer [Mon, 13 Jul 2015 14:50:06 +0000 (16:50 +0200)]
Merge commit 'b9f76d19d81fbc7f088536f966c2d3dc23c34ddc'

* commit 'b9f76d19d81fbc7f088536f966c2d3dc23c34ddc':
  hevc_ps: make sure failing to decode an SPS always returns an error

Conflicts:
libavcodec/hevc_ps.c

See: 15893adbdb6a7000f59207bcb88def6e7b4812b9
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit '077b55943330150db0eafd36bbee614697cabd98'
Michael Niedermayer [Mon, 13 Jul 2015 14:38:20 +0000 (16:38 +0200)]
Merge commit '077b55943330150db0eafd36bbee614697cabd98'

* commit '077b55943330150db0eafd36bbee614697cabd98':
  hevc: handle a NULL sps in set_sps() properly

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit '18156b53f9b642b71c182c5c9818175a61572d2b'
Michael Niedermayer [Mon, 13 Jul 2015 14:30:41 +0000 (16:30 +0200)]
Merge commit '18156b53f9b642b71c182c5c9818175a61572d2b'

* commit '18156b53f9b642b71c182c5c9818175a61572d2b':
  hevc: do not pass an entire HEVCContext into export_stream_params()

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/sanm: Reset sizes in destroy_buffers()
Michael Niedermayer [Mon, 13 Jul 2015 14:05:21 +0000 (16:05 +0200)]
avcodec/sanm: Reset sizes in destroy_buffers()

Fixes crash in 1288a2fe8e9ae6b00ca40e089d08ca65_signal_sigsegv_7ffff71426a7_354_accident.san with allocation limit 65536

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/alac: Clear pointers in allocate_buffers()
Michael Niedermayer [Mon, 13 Jul 2015 13:46:10 +0000 (15:46 +0200)]
avcodec/alac: Clear pointers in allocate_buffers()

Fixes: 06a4edb39ad8a9883175f9bd428334a2_signal_sigsegv_7ffff713351a_706_mov__alac__ALAC_6ch.mov

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/utils: Skip ff_configure_buffers_for_index() for local files
Michael Niedermayer [Mon, 13 Jul 2015 12:25:38 +0000 (14:25 +0200)]
avformat/utils: Skip ff_configure_buffers_for_index() for local files

Theres no known case where its use on local files improves performance
if you know of such a case, please contact us

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoconfigure: clean whitespace with [:space:]
Zhang Rui [Mon, 13 Jul 2015 08:22:40 +0000 (16:22 +0800)]
configure: clean whitespace with [:space:]

https://en.wikibooks.org/wiki/Regular_Expressions/POSIX_Basic_Regular_Expressions

Fixes NDKr10e on Cygwin,
CC_IDENT for it is defined as

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavformat/mov: Use ff_configure_buffers_for_index()
Michael Niedermayer [Tue, 2 Jun 2015 16:31:05 +0000 (18:31 +0200)]
avformat/mov: Use ff_configure_buffers_for_index()

Fixes Ticket2513
Fixes Ticket4432

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
3 years agoavformat: Add ff_configure_buffers_for_index()
Michael Niedermayer [Tue, 2 Jun 2015 16:30:07 +0000 (18:30 +0200)]
avformat: Add ff_configure_buffers_for_index()

This allows configuring the io buffer in such way that few seeks are needed for playback

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
3 years agodxva2_hevc: unbreak compilation after recent sps/pps changes
James Almer [Mon, 13 Jul 2015 03:05:11 +0000 (00:05 -0300)]
dxva2_hevc: unbreak compilation after recent sps/pps changes

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
3 years agohevc_parser: fix standalone build with the hevc decoder disabled
Anton Khirnov [Mon, 13 Jul 2015 06:56:53 +0000 (08:56 +0200)]
hevc_parser: fix standalone build with the hevc decoder disabled

The parser depends on hevc_ps, which in turn needs some data tables.

Found-by: James Almer <jamrial@gmail.com>
3 years agohevc_ps: make sure failing to decode an SPS always returns an error
Anton Khirnov [Mon, 13 Jul 2015 05:49:03 +0000 (07:49 +0200)]
hevc_ps: make sure failing to decode an SPS always returns an error

Some of the goto err clauses do not set the error code. It seems better
to fall back on INVALIDDATA instead of adding it everywhere explicitly.

3 years agoavcodec/dxva2_hevc: unbreak compilation after recent sps/pps changes
James Almer [Mon, 13 Jul 2015 03:05:11 +0000 (00:05 -0300)]
avcodec/dxva2_hevc: unbreak compilation after recent sps/pps changes

Signed-off-by: James Almer <jamrial@gmail.com>
3 years agoavcodec/vdpau_hevc: unbreak compilation after sps/pps changes
Philip Langdale [Mon, 13 Jul 2015 02:55:56 +0000 (19:55 -0700)]
avcodec/vdpau_hevc: unbreak compilation after sps/pps changes

There was some reorganisation in the HEVC headers so the sps and pps
now live in a different place.

3 years agoavcodec/utils: Check that the sample rate is not negative when opening an encoder
Michael Niedermayer [Mon, 13 Jul 2015 01:40:25 +0000 (03:40 +0200)]
avcodec/utils: Check that the sample rate is not negative when opening an encoder

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agotests/checkasm/x86/Makefile: Use ASMSTRIPFLAGS for asm
Michael Niedermayer [Mon, 13 Jul 2015 01:15:44 +0000 (03:15 +0200)]
tests/checkasm/x86/Makefile: Use ASMSTRIPFLAGS for asm

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoFactor duplicated ff_fast_malloc() out into mem_internal.h
Michael Niedermayer [Sat, 11 Jul 2015 21:58:39 +0000 (23:58 +0200)]
Factor duplicated ff_fast_malloc() out into mem_internal.h

internal.h is difficult to use due to circular dependancies
mem.h is a public header ff_* is not public
Alternative solutions probably are possible too

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agovf_ssim: remove another obscure double loop.
Ronald S. Bultje [Sat, 11 Jul 2015 23:56:00 +0000 (19:56 -0400)]
vf_ssim: remove another obscure double loop.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agossim: refactor a weird double loop.
Ronald S. Bultje [Sat, 11 Jul 2015 23:55:58 +0000 (19:55 -0400)]
ssim: refactor a weird double loop.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/hevc_parser: Reenable the old parser under ADVANCED_PARSER define
Michael Niedermayer [Mon, 13 Jul 2015 00:07:15 +0000 (02:07 +0200)]
avcodec/hevc_parser: Reenable the old parser under ADVANCED_PARSER define

Feel free to use either, they both work but the old one provides
more information but needs the hevc decoder

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit '650060dfb665552442ec11b456660e3e9a9d9016'
Michael Niedermayer [Sun, 12 Jul 2015 23:28:36 +0000 (01:28 +0200)]
Merge commit '650060dfb665552442ec11b456660e3e9a9d9016'

* commit '650060dfb665552442ec11b456660e3e9a9d9016':
  hevc_parser: parse and export some stream parameters

Conflicts:
configure
libavcodec/hevc_parser.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/hevc: Simplify skipped_bytes_pos code further
Michael Niedermayer [Sun, 12 Jul 2015 22:52:18 +0000 (00:52 +0200)]
avcodec/hevc: Simplify skipped_bytes_pos code further

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/hevc: Move skipped_bytes_pos_nal to HEVCNAL, simplify code
Michael Niedermayer [Sun, 12 Jul 2015 22:43:25 +0000 (00:43 +0200)]
avcodec/hevc: Move skipped_bytes_pos_nal to HEVCNAL, simplify code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/hevc: Move skipped_bytes_pos_size_nal into HAVCNAL
Michael Niedermayer [Sun, 12 Jul 2015 22:35:11 +0000 (00:35 +0200)]
avcodec/hevc: Move skipped_bytes_pos_size_nal into HAVCNAL

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoavcodec/hevc: Remove skipped_bytes_nal, simplify code
Michael Niedermayer [Sun, 12 Jul 2015 22:03:45 +0000 (00:03 +0200)]
avcodec/hevc: Remove skipped_bytes_nal, simplify code

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4'
Michael Niedermayer [Sun, 12 Jul 2015 21:45:44 +0000 (23:45 +0200)]
Merge commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4'

* commit '7f78155dc6b65be55efb5309b6dd2bb33925a8c4':
  hevc: improve a comment

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0'
Michael Niedermayer [Sun, 12 Jul 2015 21:31:12 +0000 (23:31 +0200)]
Merge commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0'

* commit 'd82e1adc2019135a2fc45372e0ed0b5ef107cdd0':
  hevc: move splitting the packet into NALUs into a separate function

Conflicts:
libavcodec/hevc.c
libavcodec/hevc.h
libavcodec/hevc_parse.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
3 years agoMerge commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751'
Michael Niedermayer [Sun, 12 Jul 2015 20:55:47 +0000 (22:55 +0200)]
Merge commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751'

* commit 'ae05b4865514fd71b5e9431e93aa0d03d7ba7751':
  hevc: eliminate the second call to hls_nal_unit()

Conflicts:
libavcodec/hevc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>