ffmpeg.git
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>
5 years agoMerge commit '28df0151b6618226b05ee52e031af0b11ca531b0'
Michael Niedermayer [Mon, 2 Feb 2015 19:17:35 +0000 (20:17 +0100)]
Merge commit '28df0151b6618226b05ee52e031af0b11ca531b0'

* commit '28df0151b6618226b05ee52e031af0b11ca531b0':
  configure: Add a dependency on vc1_decoder from vc1_parser

See: 6ac3c8c6a0c6c69b84e408a9b494fcb26294b9ee
Merged-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoIgnore generated file tools/sidxindex.
Diego Biurrun [Mon, 19 Jan 2015 10:12:23 +0000 (11:12 +0100)]
Ignore generated file tools/sidxindex.

5 years agoavcodec/hevc_filter: Fix indention
Michael Niedermayer [Mon, 2 Feb 2015 18:56:44 +0000 (19:56 +0100)]
avcodec/hevc_filter: Fix indention

Found-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/hevc: adding support for monochrome sequences in hevc
Mickaël Raulet [Mon, 22 Dec 2014 13:55:54 +0000 (14:55 +0100)]
avcodec/hevc: adding support for monochrome sequences in hevc

cherry picked from commit 8e50557707d2ec11ccad657470b2e140f314348e

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavc/libopenjpegenc: move opj_create_compress, opj_cio_open and opj_set_event_mgr...
Jean First [Mon, 2 Feb 2015 11:57:03 +0000 (12:57 +0100)]
lavc/libopenjpegenc: move opj_create_compress, opj_cio_open and opj_set_event_mgr to libopenjpeg_encode_frame

 libopenjpegenc crashes with "pointer being freed was not allocated" when threading
 is enabled with:
 ffmpeg -i tests/vsynth1/01.pgm -vcodec libopenjpeg file.j2k
 this appears to be a bug in libopenjpeg

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agolavc/libopenjpegenc: factorize cinema parameters to it's own function
Jean First [Wed, 28 Jan 2015 15:41:24 +0000 (16:41 +0100)]
lavc/libopenjpegenc: factorize cinema parameters to it's own function

Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoopus: Factor out imdct15 into a standalone component
Diego Biurrun [Sun, 1 Feb 2015 10:08:17 +0000 (11:08 +0100)]
opus: Factor out imdct15 into a standalone component

It will be reused by the AAC decoder.

5 years agoconfigure: Add a dependency on vc1_decoder from vc1_parser
Martin Storsjö [Sun, 1 Feb 2015 15:24:35 +0000 (17:24 +0200)]
configure: Add a dependency on vc1_decoder from vc1_parser

This fixes builds with vc1_parser enabled without vc1_decoder. All
the vc1_decoder object files were included in the vc1_parser line
in libavcodec/Makefile before, but architecture specific object files
for vc1_decoder were not.

Signed-off-by: Martin Storsjö <martin@martin.st>
5 years agoavcodec/wavpackenc: remove unneeded L suffixes
Michael Niedermayer [Sun, 1 Feb 2015 18:33:23 +0000 (19:33 +0100)]
avcodec/wavpackenc: remove unneeded L suffixes

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agodoc/ffprobe.xsd: drop build_date and build_time from programVersionType
Stefano Sabatini [Mon, 2 Feb 2015 09:08:22 +0000 (10:08 +0100)]
doc/ffprobe.xsd: drop build_date and build_time from programVersionType

Update schema after commit:
103e4c58633f210d7c3203cae121ba5b5123afa6

5 years agodoc/doxy-wrapper.sh: autodetect version
Andreas Cadhalpun [Sun, 1 Feb 2015 23:21:01 +0000 (00:21 +0100)]
doc/doxy-wrapper.sh: autodetect version

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agostop embedding the build date
Andreas Cadhalpun [Sun, 1 Feb 2015 23:20:18 +0000 (00:20 +0100)]
stop embedding the build date

Theis makes the build binary reproducible.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agox86/hevcdsp: add missing vzeroupper in ff_hevc_sao_band_filter_48_*_avx2
James Almer [Mon, 2 Feb 2015 03:00:53 +0000 (00:00 -0300)]
x86/hevcdsp: add missing vzeroupper in ff_hevc_sao_band_filter_48_*_avx2

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agovorbis: parse out setup headers as well
Ben Boeckel [Mon, 2 Feb 2015 01:00:02 +0000 (20:00 -0500)]
vorbis: parse out setup headers as well

Prevents an 'Invalid packet' message. Currently mid-stream setup packets
are ignored. Theoretically, they could, based on the specification, be used to
reinitialize the stream if parameters change, but I don't expect that to be
common (and no one seems to have asked for it).

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoffplay: Fallback to dts if pts is unavailable in pkt_in_play_range calculation
Michael Niedermayer [Sun, 1 Feb 2015 00:52:07 +0000 (01:52 +0100)]
ffplay: Fallback to dts if pts is unavailable in pkt_in_play_range calculation

Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agox86/hevcdsp: add missing guards to ff_hevc_sao_band_filter_avx2
James Almer [Mon, 2 Feb 2015 00:44:13 +0000 (21:44 -0300)]
x86/hevcdsp: add missing guards to ff_hevc_sao_band_filter_avx2

Signed-off-by: James Almer <jamrial@gmail.com>
5 years agolavu/x86/x86inc: deprecate INIT_AVX
James Darnley [Thu, 4 Sep 2014 22:13:36 +0000 (00:13 +0200)]
lavu/x86/x86inc: deprecate INIT_AVX

The same can be done with INIT_XMM avx

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agohevc/sao: use aligned copies
Christophe Gisquet [Sun, 1 Feb 2015 18:34:41 +0000 (15:34 -0300)]
hevc/sao: use aligned copies

For band filter, source and destination are aligned (except for 16x16 ctbs),
and otherwise, they are most often aligned. Overall, the total width is also
too small for amortizing memcpy.

Timings (using an intrinsic version of edge filters):
          B/32     B/64     E/32     E/64
Before:  32045    93952    38925    126896
After:   26772    83803    33942    117182

5 years agox86: hevc/sao: aligned source buffers
Christophe Gisquet [Sun, 1 Feb 2015 18:13:45 +0000 (15:13 -0300)]
x86: hevc/sao: aligned source buffers

Usefull for at least band filter, for which:
- Band filter call only:
           32      64
Before:  16556    54015
After:   16497    52355
- Whole case:
           32      64
Before:  37031   103008
After:   32045    93952

5 years agox86/hevc: add ff_hevc_sao_band_filter_{8,10,12}_{sse2,avx,avx2}
James Almer [Sun, 1 Feb 2015 18:01:36 +0000 (15:01 -0300)]
x86/hevc: add ff_hevc_sao_band_filter_{8,10,12}_{sse2,avx,avx2}

Original x86 intrinsics code and initial 8bit yasm port by Pierre-Edouard Lepere.
10/12bit yasm ports, refactoring and optimizations by James Almer

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

width 32
40338 decicycles in sao_band_filter_0_8, 2048 runs, 0 skips
8056 decicycles in ff_hevc_sao_band_filter_8_32_sse2, 2048 runs, 0 skips
7458 decicycles in ff_hevc_sao_band_filter_8_32_avx, 2048 runs, 0 skips
4504 decicycles in ff_hevc_sao_band_filter_8_32_avx2, 2048 runs, 0 skips

width 64
136046 decicycles in sao_band_filter_0_8, 16384 runs, 0 skips
28576 decicycles in ff_hevc_sao_band_filter_8_32_sse2, 16384 runs, 0 skips
26707 decicycles in ff_hevc_sao_band_filter_8_32_avx, 16384 runs, 0 skips
14387 decicycles in ff_hevc_sao_band_filter_8_32_avx2, 16384 runs, 0 skips

Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
5 years agox264asm: warn when inappropriate instruction used in function with specified cpuflags
Anton Mitrofanov [Thu, 28 Aug 2014 14:38:53 +0000 (18:38 +0400)]
x264asm: warn when inappropriate instruction used in function with specified cpuflags

Requested-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Requested-by: "Ronald S. Bultje" <rsbultje@gmail.com>
5 years agotests/utils: Remove unneeded L suffix
Michael Niedermayer [Sun, 1 Feb 2015 19:45:00 +0000 (20:45 +0100)]
tests/utils: Remove unneeded L suffix

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/mpegvideo_enc: Fix number suffixes in rc_buffer_size calculation
Michael Niedermayer [Sun, 1 Feb 2015 18:40:13 +0000 (19:40 +0100)]
avcodec/mpegvideo_enc: Fix number suffixes in rc_buffer_size calculation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavcodec/h264_cabac: use int instead of long for mbb_xy
Michael Niedermayer [Sun, 1 Feb 2015 18:39:22 +0000 (19:39 +0100)]
avcodec/h264_cabac: use int instead of long for mbb_xy

The mb address fits in int

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
5 years agoavformat/omadec: fix number suffix
Michael Niedermayer [Sun, 1 Feb 2015 18:36:36 +0000 (19:36 +0100)]
avformat/omadec: fix number suffix

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