ffmpeg.git
5 years agoavcodec/h264: Be more strict on rejecting pps/sps changes
Michael Niedermayer [Fri, 6 Feb 2015 14:09:54 +0000 (15:09 +0100)]
avcodec/h264: Be more strict on rejecting pps/sps changes

Fixes race condition
Fixes: signal_sigsegv_1472ac3_468_cov_2915641226_CABACI3_Sony_B.jsv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/h264: Be more strict on rejecting pps_id changes
Michael Niedermayer [Fri, 6 Feb 2015 14:01:17 +0000 (15:01 +0100)]
avcodec/h264: Be more strict on rejecting pps_id changes

Fixes race condition
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/thp: check av_get_packet() for failure
Paul B Mahol [Thu, 5 Feb 2015 14:44:04 +0000 (14:44 +0000)]
avformat/thp: check av_get_packet() for failure

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/h264_ps: More completely check the bit depths
Michael Niedermayer [Fri, 6 Feb 2015 03:11:56 +0000 (04:11 +0100)]
avcodec/h264_ps: More completely check the bit depths

Fixes out of array read
Fixes: asan_static-oob_30328b6_719_cov_3325483287_H264_artifacts_motion.h264

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/tta: only check for header and seek table crc if requested
James Almer [Fri, 6 Feb 2015 02:18:58 +0000 (23:18 -0300)]
avformat/tta: only check for header and seek table crc if requested

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoRevert "avcodec/x86/lossless_audiodsp: Make scalarproduct_and_madd_int16 prototypes...
Michael Niedermayer [Fri, 6 Feb 2015 01:31:45 +0000 (02:31 +0100)]
Revert "avcodec/x86/lossless_audiodsp: Make scalarproduct_and_madd_int16 prototypes more similar"

This reverts commit 3b4ffba3af968ae702e3a44f6b5f53445efc7363.

Unbreaks the SSSE3 code on mingw32

Conflicts:

libavcodec/x86/lossless_audiodsp.asm

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/x86/lossless_audiodsp: Move order&8 fallback into C code
Michael Niedermayer [Fri, 6 Feb 2015 00:57:23 +0000 (01:57 +0100)]
avcodec/x86/lossless_audiodsp: Move order&8 fallback into C code

This is simpler and more robust, and fixes mismatching XMM save restore
mismatches

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/vp3: pass correct context to av_log()
Michael Niedermayer [Thu, 5 Feb 2015 23:33:00 +0000 (00:33 +0100)]
avcodec/vp3: pass correct context to av_log()

Fixes null pointer dereference
Fixes: signal_sigsegv_000_3694_cov_1050071691_theora.mkv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/x86/lossless_audiodsp: Make scalarproduct_and_madd_int16 prototypes more...
Michael Niedermayer [Thu, 5 Feb 2015 22:52:01 +0000 (23:52 +0100)]
avcodec/x86/lossless_audiodsp: Make scalarproduct_and_madd_int16 prototypes more similar

This is needed as the mmx code is used as fallback from the ssse3 code

Suggested-by: jamrial
Tested-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/hevc: drop redundant ifs()
Michael Niedermayer [Thu, 5 Feb 2015 21:29:55 +0000 (22:29 +0100)]
avcodec/hevc: drop redundant ifs()

Found-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agohevcdsp: ARM NEON optimized deblocking filter
Seppo Tomperi [Thu, 5 Feb 2015 06:22:19 +0000 (06:22 +0000)]
hevcdsp: ARM NEON optimized deblocking filter

cherry picked from commit 1b9ee47d2f43b0a029a9468233626102eb1473b8

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agohevc: free sao buffers when receiving a new SPS
Christophe Gisquet [Thu, 5 Feb 2015 18:51:22 +0000 (19:51 +0100)]
hevc: free sao buffers when receiving a new SPS

The buffer pointers would be otherwise overwritten, causing a
leak on e.g. PERSIST_RPARAM_A_RExt_Sony_1.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agovp9: assign PTS to visible instead of invisible frames
wm4 [Thu, 5 Feb 2015 15:43:27 +0000 (16:43 +0100)]
vp9: assign PTS to visible instead of invisible frames

All the webm/vp9 files I have seen so far can have packets that contain
1 invisible and 1 visible frame. The vp9 parser separates them. Since
the invisible frame is always (?) the first sub-packet, the new packet
is assigned the PTS of the original packet, while the packet containing
the visible frame has no PTS.

This patch essentially reassigns the PTS from the invisible to the
visible frame.

Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agox86/hevcdsp: add ff_hevc_sao_edge_filter_{10,12}_{sse2,avx2}
James Almer [Wed, 4 Feb 2015 23:23:19 +0000 (20:23 -0300)]
x86/hevcdsp: add ff_hevc_sao_edge_filter_{10,12}_{sse2,avx2}

Original x86 intrinsics code by Pierre-Edouard Lepere.
Yasm port, refactoring and optimizations by James Almer.

Benchmarks of BQTerrace_1920x1080_60_qp22.bin with an Intel Core i5-4200U

Width 32
342694 decicycles in sao_edge_filter_10, 16384 runs, 0 skips
29476 decicycles in ff_hevc_sao_edge_filter_32_10_ssse3, 16384 runs, 0 skips
13996 decicycles in ff_hevc_sao_edge_filter_32_10_avx2, 16381 runs, 3 skips

Width 64
581163 decicycles in sao_edge_filter_10, 8192 runs, 0 skips
59774 decicycles in ff_hevc_sao_edge_filter_64_10_ssse3, 8192 runs, 0 skips
28383 decicycles in ff_hevc_sao_edge_filter_64_10_avx2, 8191 runs, 1 skips

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agox86/hevcdsp: add ff_hevc_sao_edge_filter_8_{ssse3,avx2}
James Almer [Wed, 4 Feb 2015 23:21:56 +0000 (20:21 -0300)]
x86/hevcdsp: add ff_hevc_sao_edge_filter_8_{ssse3,avx2}

Original x86 intrinsics code and initial yasm port by Pierre-Edouard Lepere.
Refactoring and optimizations by James Almer.

Benchmarks of BQTerrace_1920x1080_60_qp22.bin with an Intel Core i5-4200U

Width 32
158583 decicycles in edge, sao_edge_filter_8 runs, 0 skips
5205 decicycles in ff_hevc_sao_edge_filter_32_8_ssse3, 32767 runs, 1 skips
2942 decicycles in ff_hevc_sao_edge_filter_32_8_avx2, 32767 runs, 1 skips

Width 64
705639 decicycles in sao_edge_filter_8, 262144 runs, 0 skips
19224 decicycles in ff_hevc_sao_edge_filter_64_8_ssse3, 262111 runs, 33 skips
10433 decicycles in ff_hevc_sao_edge_filter_64_8_avx2, 262115 runs, 29 skips

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agohevcdsp: remove compilation-time-fixed parameter from sao_edge_filter
James Almer [Wed, 4 Feb 2015 23:19:36 +0000 (20:19 -0300)]
hevcdsp: remove compilation-time-fixed parameter from sao_edge_filter

The stride_src parameter is always 2 * MAX_PB_SIZE + FF_INPUT_BUFFER_PADDING_SIZE.

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agoavcodec/h264_refs: set last_pic_for_ec only if it has not been set previously
Michael Niedermayer [Thu, 5 Feb 2015 13:55:41 +0000 (14:55 +0100)]
avcodec/h264_refs: set last_pic_for_ec only if it has not been set previously

This ensures we do not loose the frame in case or multiple clears
Fixes out of array read
Fixes: asan_heap-oob_2fa47ea_2100_cov_1278768963_ff_add_pixels_clamped_mmx.m2ts

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge remote-tracking branch 'cehoyos/master'
Michael Niedermayer [Thu, 5 Feb 2015 12:26:01 +0000 (13:26 +0100)]
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Fix compilation with --disable-protocol=udp

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/alsdec: use init_get_bits8()
Paul B Mahol [Wed, 4 Feb 2015 13:44:22 +0000 (13:44 +0000)]
avcodec/alsdec: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/cllc: use init_get_bits8()
Paul B Mahol [Tue, 3 Feb 2015 15:58:27 +0000 (15:58 +0000)]
avcodec/cllc: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoFix compilation with --disable-protocol=udp
Carl Eugen Hoyos [Thu, 5 Feb 2015 09:07:03 +0000 (10:07 +0100)]
Fix compilation with --disable-protocol=udp

5 years agoavfilter/vf_fps: update frame drop comment
Michael Niedermayer [Thu, 5 Feb 2015 04:55:08 +0000 (05:55 +0100)]
avfilter/vf_fps: update frame drop comment

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/thp: Check av_get_packet() for failure not only for partial output
Michael Niedermayer [Thu, 5 Feb 2015 02:45:21 +0000 (03:45 +0100)]
avformat/thp: Check av_get_packet() for failure not only for partial output

Fixes null pointer dereference
Fixes: signal_sigsegv_db2c1f_3108_cov_163322880_pikmin2_opening1_partial.thp

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavf/avc: add buffer padding to extradata allocation
Lukasz Marek [Thu, 5 Feb 2015 00:04:45 +0000 (01:04 +0100)]
lavf/avc: add buffer padding to extradata allocation

ff_avc_write_annexb_extradata() allocates extradata, but don't add
FF_INPUT_BUFFER_PADDING_SIZE value

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
5 years agoavcodec/nvenc: De-compensate aspect ratio compensation of DVD-like content.
Philip Langdale [Wed, 28 Jan 2015 17:05:53 +0000 (09:05 -0800)]
avcodec/nvenc: De-compensate aspect ratio compensation of DVD-like content.

For reasons we are not privy to, nvidia decided that the nvenc encoder
should apply aspect ratio compensation to 'DVD like' content, assuming that
the content is not bt.601 compliant, but needs to be bt.601 compliant. In
this context, that means that they make the following, questionable,
assumptions:

1) If the input dimensions are 720x480 or 720x576, assume the content has
an active area of 704x480 or 704x576.

2) Assume that whatever the input sample aspect ratio is, it does not account
for the difference between 'physical' and 'active' dimensions.

From, these assumptions, they then conclude that they can 'help', by adjusting
the sample aspect ratio by a factor of 45/44. And indeed, if you wanted to
display only the 704 wide active area with the same aspect ratio as the full
720 wide image - this would be the correct adjustment factor, but what if you
don't? And more importantly, what if you're used to ffmpeg not making this kind
of adjustment at encode time - because none of the other encoders do this!

And, what if you had already accounted for bt.601 and your input had the
correct attributes? Well, it's going to apply the compensation anyway!
So, if you take some content, and feed it through nvenc repeatedly, it
will keep scaling the aspect ratio every time, stretching your video out
more and more and more.

So, clearly, regardless of whether you want to apply bt.601 aspect ratio
adjustments or not, this is not the way to do it. With any other ffmpeg
encoder, you would do it as part of defining your input paramters or
do the adjustment at playback time, and there's no reason by nvenc
should be any different.

This change adds some logic to undo the compensation that nvenc would
otherwise do.

nvidia engineers have told us that they will work to make this
compensation mechanism optional in a future release of the nvenc
SDK. At that point, we can adapt accordingly.

Signed-off-by: Philip Langdale <philipl@overt.org>
Reviewed-by: Timo Rothenpieler <timo@rothenpieler.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoswscale/utils: Limit filter shifting so as not to read from prior the array
Michael Niedermayer [Wed, 4 Feb 2015 23:12:08 +0000 (00:12 +0100)]
swscale/utils: Limit filter shifting so as not to read from prior the array

Fixes out of array read
Fixes: asan_heap-oob_1fb2f9b_3780_cov_3984375136_usf.mkv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/mpegvideo_motion: Fix gmc chroma dimensions
Michael Niedermayer [Wed, 4 Feb 2015 21:30:08 +0000 (22:30 +0100)]
avcodec/mpegvideo_motion: Fix gmc chroma dimensions

Fixes integer overflow and out of array read
Fixes: asan_heap-oob_1fb2f9b_3780_cov_3984375136_usf.mkv

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agohevcdsp: replace the SAOParams struct parameter from sao_edge_filter
James Almer [Wed, 4 Feb 2015 01:39:03 +0000 (22:39 -0300)]
hevcdsp: replace the SAOParams struct parameter from sao_edge_filter

As with sao_band_filter, pass instead the two variables from the struct needed in the function.
This simplifies writing asm optimized versions.

Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agohevcdsp: further simplify sao_edge_filter
James Almer [Wed, 4 Feb 2015 01:39:55 +0000 (22:39 -0300)]
hevcdsp: further simplify sao_edge_filter

Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agohevcdsp: simplified sao_edge_filter
Seppo Tomperi [Wed, 4 Feb 2015 01:36:42 +0000 (22:36 -0300)]
hevcdsp: simplified sao_edge_filter

Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr>
5 years agohevcdsp: separated sao edge filter and pixel restore funcs
Seppo Tomperi [Wed, 4 Feb 2015 01:34:52 +0000 (22:34 -0300)]
hevcdsp: separated sao edge filter and pixel restore funcs

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Reviewed-by: Mickaël Raulet <mraulet@insa-rennes.fr>
5 years agoavcodec/mjpegdec: Check number of components for JPEG-LS
Michael Niedermayer [Wed, 4 Feb 2015 19:48:30 +0000 (20:48 +0100)]
avcodec/mjpegdec: Check number of components for JPEG-LS

Fixes out of array accesses
Fixes: asan_heap-oob_1c1a4ea_1242_cov_2274415971_TESTcmyk.jpg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/mjpegdec: Check escape sequence validity
Michael Niedermayer [Wed, 4 Feb 2015 19:13:18 +0000 (20:13 +0100)]
avcodec/mjpegdec: Check escape sequence validity

Fixes assertion failure
Fixes: asan_heap-oob_1c1a4ea_1242_cov_2274415971_TESTcmyk.jpg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavfilter/vf_fps: Do not drop a random subset of frames
Michael Niedermayer [Wed, 4 Feb 2015 16:46:39 +0000 (17:46 +0100)]
avfilter/vf_fps: Do not drop a random subset of frames

This also avoids droping the frame which is closest to the target timestamp

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agodxva2_hevc: properly fill the scaling list structure
Hendrik Leppkes [Tue, 3 Feb 2015 21:41:19 +0000 (22:41 +0100)]
dxva2_hevc: properly fill the scaling list structure

The scaling list can be specified in either the SPS or PPS.
Additionally, compensate for the diagonal scan permutation applied in the decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/mpc8: Use uint64_t in *_get_v() to avoid undefined behavior
Michael Niedermayer [Wed, 4 Feb 2015 13:47:41 +0000 (14:47 +0100)]
avformat/mpc8: Use uint64_t in *_get_v() to avoid undefined behavior

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/cdxl: use init_get_bits8()
Paul B Mahol [Wed, 4 Feb 2015 13:26:50 +0000 (13:26 +0000)]
avcodec/cdxl: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoMerge commit '8c1ce7787ad7af8fc321b4a145e9dc965f6d0e86'
Michael Niedermayer [Wed, 4 Feb 2015 13:20:28 +0000 (14:20 +0100)]
Merge commit '8c1ce7787ad7af8fc321b4a145e9dc965f6d0e86'

* commit '8c1ce7787ad7af8fc321b4a145e9dc965f6d0e86':
  aacsbr: silence message for SBR extension "padding".

See: 1ac606bae60e46522189b678b58a7fb8376046ac
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/siff: fix if_( style
Paul B Mahol [Wed, 4 Feb 2015 13:10:53 +0000 (13:10 +0000)]
avformat/siff: fix if_( style

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoMerge commit 'd615187f74ddf3413778a8b5b7ae17255b0df88e'
Michael Niedermayer [Wed, 4 Feb 2015 12:49:17 +0000 (13:49 +0100)]
Merge commit 'd615187f74ddf3413778a8b5b7ae17255b0df88e'

* commit 'd615187f74ddf3413778a8b5b7ae17255b0df88e':
  aacdec: Support for ER AAC ELD 480.

Conflicts:
libavcodec/aacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '7640c4a371a97899dfb443d980fd0bf8ac587754'
Michael Niedermayer [Wed, 4 Feb 2015 12:40:20 +0000 (13:40 +0100)]
Merge commit '7640c4a371a97899dfb443d980fd0bf8ac587754'

* commit '7640c4a371a97899dfb443d980fd0bf8ac587754':
  aacdec: Tables for length 480 AAC ELD.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '0ee2573347ecdb9cb5656001f7201d819eec16d8'
Michael Niedermayer [Wed, 4 Feb 2015 12:31:24 +0000 (13:31 +0100)]
Merge commit '0ee2573347ecdb9cb5656001f7201d819eec16d8'

* commit '0ee2573347ecdb9cb5656001f7201d819eec16d8':
  aacdec: Support for ER AAC in LATM

Conflicts:
libavcodec/aacdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'edd9ea3ffba1d5873dead1c57c74b1e3cc912167'
Michael Niedermayer [Wed, 4 Feb 2015 12:18:45 +0000 (13:18 +0100)]
Merge commit 'edd9ea3ffba1d5873dead1c57c74b1e3cc912167'

* commit 'edd9ea3ffba1d5873dead1c57c74b1e3cc912167':
  aacdec: Refactor aac_er_decode_frame.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavf/utils: fix if_( style
Stefano Sabatini [Wed, 4 Feb 2015 12:01:25 +0000 (13:01 +0100)]
lavf/utils: fix if_( style

5 years agodoc/muxers/image2: remove the non-negative number requirement for start_number
Liviu Oniciuc [Tue, 3 Feb 2015 19:26:13 +0000 (11:26 -0800)]
doc/muxers/image2: remove the non-negative number requirement for start_number

Update after b37858eae186ff84afd38cf3e845ba6e037e6397.

5 years agoMerge commit '82bd8a57692d8f3643ad0903c97e4a0f84393f53'
Michael Niedermayer [Wed, 4 Feb 2015 11:56:56 +0000 (12:56 +0100)]
Merge commit '82bd8a57692d8f3643ad0903c97e4a0f84393f53'

* commit '82bd8a57692d8f3643ad0903c97e4a0f84393f53':
  aacdec: Refactor decode_ics_info.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoFix standalone compilation of the tblend filter.
Carl Eugen Hoyos [Wed, 4 Feb 2015 10:09:14 +0000 (11:09 +0100)]
Fix standalone compilation of the tblend filter.

5 years agoavcodec/evrcdec: use init_get_bits8()
Paul B Mahol [Tue, 3 Feb 2015 15:54:59 +0000 (15:54 +0000)]
avcodec/evrcdec: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/wnv1: use init_get_bits8()
Paul B Mahol [Tue, 3 Feb 2015 15:49:34 +0000 (15:49 +0000)]
avcodec/wnv1: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/on2avc: use init_get_bits8()
Paul B Mahol [Tue, 3 Feb 2015 15:31:53 +0000 (15:31 +0000)]
avcodec/on2avc: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/tak_parser: use init_get_bits8()
Paul B Mahol [Tue, 3 Feb 2015 15:27:28 +0000 (15:27 +0000)]
avcodec/tak_parser: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/ac3dec: use init_get_bits8()
Paul B Mahol [Tue, 3 Feb 2015 15:15:11 +0000 (15:15 +0000)]
avcodec/ac3dec: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/qcelpdec: use init_get_bits8()
Paul B Mahol [Tue, 3 Feb 2015 15:10:00 +0000 (15:10 +0000)]
avcodec/qcelpdec: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoavcodec/webp: use init_get_bits8()
Paul B Mahol [Tue, 3 Feb 2015 14:58:22 +0000 (14:58 +0000)]
avcodec/webp: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
5 years agoaacsbr: silence message for SBR extension "padding".
Reimar Döffinger [Mon, 9 Apr 2012 19:19:30 +0000 (21:19 +0200)]
aacsbr: silence message for SBR extension "padding".

Some files contain a few additional, all-0 bits.
Check for that case and don't print incorrect "not supported"
message.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Alex Converse <alex.converse@gmail.com>
5 years agoaacdec: Support for ER AAC ELD 480.
Alex Converse [Thu, 22 Jan 2015 05:51:54 +0000 (21:51 -0800)]
aacdec: Support for ER AAC ELD 480.

Based in part on work from Niel van der Westhuizen <espes@pequalsnp.com>.

5 years agoaacdec: Tables for length 480 AAC ELD.
Niel van der Westhuizen [Thu, 22 Jan 2015 05:25:27 +0000 (21:25 -0800)]
aacdec: Tables for length 480 AAC ELD.

5 years agoaacdec: Support for ER AAC in LATM
Niel van der Westhuizen [Thu, 22 Jan 2015 05:24:23 +0000 (21:24 -0800)]
aacdec: Support for ER AAC in LATM

5 years agoaacdec: Refactor aac_er_decode_frame.
Alex Converse [Thu, 22 Jan 2015 05:49:29 +0000 (21:49 -0800)]
aacdec: Refactor aac_er_decode_frame.

5 years agoaacdec: Refactor decode_ics_info.
Alex Converse [Thu, 22 Jan 2015 05:35:53 +0000 (21:35 -0800)]
aacdec: Refactor decode_ics_info.

5 years agoffmpeg: Make CFR frame drop threshold user adjustable
Michael Niedermayer [Sat, 17 Jan 2015 03:38:32 +0000 (04:38 +0100)]
ffmpeg: Make CFR frame drop threshold user adjustable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/hevc: Update the USE_SAO_SMALL_BUFFER case for the alignment requirements...
Christophe Gisquet [Mon, 2 Feb 2015 14:51:45 +0000 (15:51 +0100)]
avcodec/hevc: Update the USE_SAO_SMALL_BUFFER case for the alignment requirements in FFmpeg

Use edge emu buffers
And enable the code unconditionally

Speed difference without USE_SAO_SMALL_BUFFER and with the new code:
Decicycles: 26772->26220 (BO32),  83803->80942 (BO64)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/hevc: Do not zero is_pcm on allocation
Christophe Gisquet [Mon, 2 Feb 2015 14:51:45 +0000 (15:51 +0100)]
avcodec/hevc: Do not zero is_pcm on allocation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/hevc: reduce memory for SAO
Fabrice Bellard [Mon, 12 Jan 2015 22:09:23 +0000 (23:09 +0100)]
avcodec/hevc: reduce memory for SAO

cherry picked from commit 5d9f79edef2c11b915bdac3a025b59a32082f409

SAO edge filter uses pre-SAO pixel data on the left and top of the ctb, so
this data must be kept available. This was done previously by having 2
copies of the frame, one before and one after SAO.

This commit reduces the storage to just that, instead of the previous whole
frame.

Commit message taken from patch by Christophe Gisquet <christophe.gisquet@gmail.com>

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/mpc8: fix broken pointer math
wm4 [Tue, 3 Feb 2015 18:04:11 +0000 (19:04 +0100)]
avformat/mpc8: fix broken pointer math

This could overflow and crash at least on 32 bit systems.

Reviewed-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/mpc8: fix hang with fuzzed file
wm4 [Tue, 3 Feb 2015 18:04:12 +0000 (19:04 +0100)]
avformat/mpc8: fix hang with fuzzed file

This can lead to an endless loop by seeking back a few bytes after each
attempted chunk read. Assuming negative sizes are always invalid, this
is easy to fix. Other code in this demuxer treats negative sizes as
invalid as well.

Fixes ticket #4262.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agox86: lavu/x264asm: fix ymm register instantiation
Christophe Gisquet [Tue, 3 Feb 2015 12:03:48 +0000 (13:03 +0100)]
x86: lavu/x264asm: fix ymm register instantiation

This mimicks what is done for the other instruction sets.

Tested-by: James Almer <jamrial@gmail.com>
Tested-by: Mickaël Raulet <mraulet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '898276c16b1683ac77723e97574a3bfdb29507fd'
Michael Niedermayer [Tue, 3 Feb 2015 22:57:03 +0000 (23:57 +0100)]
Merge commit '898276c16b1683ac77723e97574a3bfdb29507fd'

* commit '898276c16b1683ac77723e97574a3bfdb29507fd':
  r3d: Fix pos type

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'ec524ed12aa1aeb37125203f1adf5aa10dfcb0de'
Michael Niedermayer [Tue, 3 Feb 2015 22:49:14 +0000 (23:49 +0100)]
Merge commit 'ec524ed12aa1aeb37125203f1adf5aa10dfcb0de'

* commit 'ec524ed12aa1aeb37125203f1adf5aa10dfcb0de':
  tta: Fix framepos and start_offset types

Conflicts:
libavformat/tta.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'a6653787a4b1e89170ff7962312dd110769c83a3'
Michael Niedermayer [Tue, 3 Feb 2015 22:34:10 +0000 (23:34 +0100)]
Merge commit 'a6653787a4b1e89170ff7962312dd110769c83a3'

* commit 'a6653787a4b1e89170ff7962312dd110769c83a3':
  libopencv: Check kernel_str life cycle

Conflicts:
libavfilter/vf_libopencv.c

See: f16a6f667c993a158643b52815ec42961508b0a9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/svq1dec: Add assert to ensure "stages >= 0"
Michael Niedermayer [Tue, 3 Feb 2015 22:03:38 +0000 (23:03 +0100)]
avcodec/svq1dec: Add assert to ensure "stages >= 0"

This is currently always true, the assert protects against
future changes to the code breaking this assumtation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '9b8c8a9395c849639aea0f6b5300e991e93c3a73'
Michael Niedermayer [Tue, 3 Feb 2015 21:50:39 +0000 (22:50 +0100)]
Merge commit '9b8c8a9395c849639aea0f6b5300e991e93c3a73'

* commit '9b8c8a9395c849639aea0f6b5300e991e93c3a73':
  svq1dec: Validate the stages value strictly

Not merged, this is wrong, the condition is not possible

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '6f7a32839d1b913be8170e91c3ac9816b314da21'
Michael Niedermayer [Tue, 3 Feb 2015 21:39:41 +0000 (22:39 +0100)]
Merge commit '6f7a32839d1b913be8170e91c3ac9816b314da21'

* commit '6f7a32839d1b913be8170e91c3ac9816b314da21':
  svq1enc: correctly handle memory error and allocations

Conflicts:
libavcodec/svq1enc.c

See: 79888388e7c4ca596354f1c093e1c655df7824b8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '67e9f3907d6d438a413df72d72c1339a0c11a290'
Michael Niedermayer [Tue, 3 Feb 2015 21:28:25 +0000 (22:28 +0100)]
Merge commit '67e9f3907d6d438a413df72d72c1339a0c11a290'

* commit '67e9f3907d6d438a413df72d72c1339a0c11a290':
  isom: Decode Prores 4444 XQ with the existing Prores decoder

See: fe47cba7e8daa987ac8c802362d8dad892858cd5
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat: fix mode of img2dec.c and utils.c
Michael Niedermayer [Tue, 3 Feb 2015 21:26:02 +0000 (22:26 +0100)]
avformat: fix mode of img2dec.c and utils.c

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit 'e3528d2a7bf29ba148d7ac1678552ce0089cd14f'
Michael Niedermayer [Tue, 3 Feb 2015 21:15:54 +0000 (22:15 +0100)]
Merge commit 'e3528d2a7bf29ba148d7ac1678552ce0089cd14f'

* commit 'e3528d2a7bf29ba148d7ac1678552ce0089cd14f':
  mov: Implement parsing of the "HandlerName" from the MP4 HDLR atom

Conflicts:
libavformat/mov.c

See: b76bc010343b0cff8717cc7ee81e47273272336c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '27b99d929fe3440b4bba8e5d970c2802f274f328'
Michael Niedermayer [Tue, 3 Feb 2015 21:03:42 +0000 (22:03 +0100)]
Merge commit '27b99d929fe3440b4bba8e5d970c2802f274f328'

* commit '27b99d929fe3440b4bba8e5d970c2802f274f328':
  siff: Return more meaningful error values

Conflicts:
libavformat/siff.c

See: 29c3ebf56e2b54c68c52668937f74a874ecb49ac
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '75439bb31b3ab76f9a4d30c5de4ff9f407ec8128'
Michael Niedermayer [Tue, 3 Feb 2015 20:53:29 +0000 (21:53 +0100)]
Merge commit '75439bb31b3ab76f9a4d30c5de4ff9f407ec8128'

* commit '75439bb31b3ab76f9a4d30c5de4ff9f407ec8128':
  siff: K&R formatting cosmetics

Conflicts:
libavformat/siff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/img2dec: remove the non-negative number requirement for start_number option
Liviu Oniciuc [Tue, 3 Feb 2015 17:01:29 +0000 (09:01 -0800)]
avformat/img2dec: remove the non-negative number requirement for start_number option

industrial cameras usually mark the trigger frame as frame number 0
all frames saved before trigger frame receive a negative sequence number

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agor3d: Fix pos type
Luca Barbato [Mon, 2 Feb 2015 01:39:00 +0000 (02:39 +0100)]
r3d: Fix pos type

avio_tell can return a negative number.

Bug-Id: CID 1265715
CC: libav-stable@libav.org
5 years agotta: Fix framepos and start_offset types
Vittorio Giovara [Mon, 2 Feb 2015 06:21:30 +0000 (07:21 +0100)]
tta: Fix framepos and start_offset types

Also propagate errors.

CC: libav-stable@libav.org
Bug-Id: CID 1238812

5 years agolibopencv: Check kernel_str life cycle
Luca Barbato [Sun, 1 Feb 2015 01:02:05 +0000 (02:02 +0100)]
libopencv: Check kernel_str life cycle

The string might or might not be set depending if there
are args and in case of error it must be freed nonetheless.

CC: libav-stable@libav.org
Bug-Id: CID 739878 / CID 739882

5 years agosvq1dec: Validate the stages value strictly
Luca Barbato [Mon, 2 Feb 2015 01:22:34 +0000 (02:22 +0100)]
svq1dec: Validate the stages value strictly

It can be less than -1.

Bug-Id: CID 1194397 / CID 1194398
CC: libav-stable@libav.org
5 years agosvq1enc: correctly handle memory error and allocations
Michael Niedermayer [Tue, 27 Jan 2015 15:32:54 +0000 (15:32 +0000)]
svq1enc: correctly handle memory error and allocations

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
5 years agoisom: Decode Prores 4444 XQ with the existing Prores decoder
Carl Eugen Hoyos [Tue, 27 Jan 2015 15:32:56 +0000 (15:32 +0000)]
isom: Decode Prores 4444 XQ with the existing Prores decoder

The frames seem to contain a higher bitrate which our decoder is
able to handle.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
5 years agomov: Implement parsing of the "HandlerName" from the MP4 HDLR atom
Hendrik Leppkes [Tue, 3 Feb 2015 14:58:50 +0000 (14:58 +0000)]
mov: Implement parsing of the "HandlerName" from the MP4 HDLR atom

This atom typically is used for a track title. The handler name is stored
as a Pascal string in the QT specs (first byte is the length of the string),
so do not export it.

A second length check based on the first character is added to avoid
overwriting an already specified handler_name (it happens with YouTube
videos for instance, the handler_name get masked), or specifying an
empty string metadata.

The Pascal string fix and the second length check are written
by Clément Bœsch <clement.boesch@smartjog.com>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
5 years agoavformat/tta: fix crash with corrupted files
wm4 [Tue, 3 Feb 2015 13:41:10 +0000 (14:41 +0100)]
avformat/tta: fix crash with corrupted files

av_add_index_entry() can fail, for example because the parameters are
invalid, or because memory allocation fails. Check this; it can actually
happen with corrupted files.

The second hunk is just for robustness. Just in case functions like
ff_reduce_index() remove entries. (Not sure if this can actually
happen.)

Fixes ticket #4294.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agosiff: Return more meaningful error values
Diego Biurrun [Tue, 3 Feb 2015 08:53:00 +0000 (09:53 +0100)]
siff: Return more meaningful error values

5 years agosiff: K&R formatting cosmetics
Diego Biurrun [Tue, 3 Feb 2015 08:52:59 +0000 (09:52 +0100)]
siff: K&R formatting cosmetics

5 years agoavformat/mpegtsenc: Fix build with msvc
Matt Oliver [Tue, 3 Feb 2015 13:46:39 +0000 (00:46 +1100)]
avformat/mpegtsenc: Fix build with msvc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavutil/mem: replace remaining void **/*** casts by memcpy()
Michael Niedermayer [Sun, 1 Feb 2015 14:16:15 +0000 (15:16 +0100)]
avutil/mem: replace remaining void **/*** casts by memcpy()

This is similar to 60392480181f24ebf3ab48d8ac3614705de90152

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/mov: simplify pasp value before setting SAR
Michael Niedermayer [Wed, 21 Jan 2015 01:54:39 +0000 (02:54 +0100)]
avformat/mov: simplify pasp value before setting SAR

This avoids a 65536:65536 SAR

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/ppc/idctdsp.c: POWER LE support in idct_add_altivec()
Rong Yan [Tue, 3 Feb 2015 03:04:33 +0000 (03:04 +0000)]
avcodec/ppc/idctdsp.c: POWER LE support in idct_add_altivec()

also add GET_TMP2() macro

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/network: Check for av_malloc* failures in ff_tls_init()
Michael Niedermayer [Thu, 22 Jan 2015 14:50:48 +0000 (15:50 +0100)]
avformat/network: Check for av_malloc* failures in ff_tls_init()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoswresample: Use int instead of enum for fields which are accessed through AVOptions...
Michael Niedermayer [Mon, 2 Feb 2015 22:27:26 +0000 (23:27 +0100)]
swresample: Use int instead of enum for fields which are accessed through AVOptions as int

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoRevert "avformat/mpegtsenc: Change the service_type field to enum"
Michael Niedermayer [Mon, 2 Feb 2015 21:30:56 +0000 (22:30 +0100)]
Revert "avformat/mpegtsenc: Change the service_type field to enum"

This isnt safe due to AVOption accessing this field as int
i just realized a moment after pushing

This reverts commit 0935453e84a17035f0c3544913e7ab7775839176.

5 years agoavformat/mpegtsenc: Change the service_type field to enum
Michael Niedermayer [Mon, 2 Feb 2015 21:14:51 +0000 (22:14 +0100)]
avformat/mpegtsenc: Change the service_type field to enum

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolibavformat/mpegtsenc: allow to set service_type in sdt
dhead666 [Mon, 2 Feb 2015 09:56:52 +0000 (11:56 +0200)]
libavformat/mpegtsenc: allow to set service_type in sdt

This adds an option to set the service type in mpegts as defined in ETSI 300 468.

I added what I believe are the most useful service types as pre defined values,
the others can be sent by using their hexdecimal form directly (e.g. -mpegts_service_type digital_radio, -mpegts_service_type 0x07).

I've been using this patch in order to pipe internet radio stream (originally as HLS/m3u8) from ffmpeg to tvheadend,
when the service type set right tvheadend recognize the mpegts stream as a radio channel.

The patch in its original form was written by linuxstb from freenode's hts channel which allowed me pushing it upstream.

This close issue 4118.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '11e05533170485b593974cf90916425a0188e7bd'
Michael Niedermayer [Mon, 2 Feb 2015 20:16:08 +0000 (21:16 +0100)]
Merge commit '11e05533170485b593974cf90916425a0188e7bd'

* commit '11e05533170485b593974cf90916425a0188e7bd':
  Ignore generated file tools/sidxindex.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoMerge commit '3d5d46233cd81f78138a6d7418d480af04d3f6c8'
Michael Niedermayer [Mon, 2 Feb 2015 19:43:13 +0000 (20:43 +0100)]
Merge commit '3d5d46233cd81f78138a6d7418d480af04d3f6c8'

* commit '3d5d46233cd81f78138a6d7418d480af04d3f6c8':
  opus: Factor out imdct15 into a standalone component

Conflicts:
configure
libavcodec/opus_celt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>