Commit Graph

65337 Commits

Author SHA1 Message Date
Timothy Gu
9f02a2b224 transcode_aac: fix const return value
Fixes Trac #3613.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-06 04:01:19 +02:00
Michael Niedermayer
a32e306be3 doc/muxers: document which applications are known to need disable_chpl.
Thanks to: John Stebbins <stebbins@jetheaddev.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-06 03:59:37 +02:00
Michael Niedermayer
9101ef6757 avutil/cpu: output cpu data to stdout
Errors go to stderr, but the cpu stats are non error output for cputest

This fixes echoing the cpu test results

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-06 02:01:08 +02:00
Michael Niedermayer
a8689ba872 tests/fate/libavutil: switch cpu-test back to runecho so its results are vissible
(needs next commt too)

Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-06 01:57:35 +02:00
Michael Niedermayer
6552b0558a avutil/pixelutils: check for malloc failure
Found-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-06 01:45:29 +02:00
Michael Niedermayer
84ac2f93ca avutil/pixelutils: avoid on stack arrays
The arrays are fairly large and could cause problems on some embedded systems
also they are not endian safe as they mix 32 and 8bit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-06 01:27:38 +02:00
Michael Niedermayer
1b168e3bcf avutil/cpu: fix cpu-test to work with ffmpegs cpuflags syntax
Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-06 00:36:19 +02:00
Michael Niedermayer
296b01d7f9 Merge commit 'a7153444df9040bf6ae103e0bbf6104b66f974cb'
* commit 'a7153444df9040bf6ae103e0bbf6104b66f974cb':
  huffyuvdec: check width size for yuv422p

Conflicts:
	libavcodec/huffyuvdec.c

See: 6abb9a901f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-06 00:08:03 +02:00
Michael Niedermayer
3ce55d2e32 Merge commit '70cd3b8e659c3522eea5c16a65d14b8658894a94'
* commit '70cd3b8e659c3522eea5c16a65d14b8658894a94':
  mmvideo: check horizontal coordinate too

See: 8d3c99e825
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 23:43:12 +02:00
Michael Niedermayer
a7153444df huffyuvdec: check width size for yuv422p
Avoid out of array accesses.

CC: libav-stable@libav.org
Bug-Id: CVE-2013-0848
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-05 20:01:59 +00:00
Michael Niedermayer
70cd3b8e65 mmvideo: check horizontal coordinate too
Fixes out of array accesses.

Bug-Id: CVE-2013-3672
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-05 19:16:12 +00:00
Clément Bœsch
97478ef5fe avfilter/select: fix "t" eval variable comment 2014-08-05 21:15:13 +02:00
Clément Bœsch
eaeb61c3a6 avfilter/select: remove optional avcodec dependency 2014-08-05 21:05:53 +02:00
Clément Bœsch
164b7ccf21 avfilter/mp_decimate: remove avcodec dependency 2014-08-05 21:05:52 +02:00
Clément Bœsch
def03d3439 avfilter/deshake: remove avcodec dependency 2014-08-05 21:05:52 +02:00
Clément Bœsch
f50ec59751 build: remove wrong avcodec dep in decimate
This was probably a mistake with mpdecimate. The decimate filter doesn't
depend on avcodec.
2014-08-05 21:05:52 +02:00
Clément Bœsch
28a2107a8d avutil: add pixelutils API 2014-08-05 21:05:52 +02:00
Michael Niedermayer
6931d12745 Merge commit '849b9d34c7ef70b370c53e7af3940f51cbc07d0f'
* commit '849b9d34c7ef70b370c53e7af3940f51cbc07d0f':
  wmalosslessdec: fix mclms_coeffs* array size

See: ec9578d54d
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 19:41:19 +02:00
Michael Niedermayer
00d2346885 Merge commit '15201e256035a3e8f9d3d7b96fc327467e1a8ead'
* commit '15201e256035a3e8f9d3d7b96fc327467e1a8ead':
  configure: check $as first before using $gas as GNU as

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 19:31:08 +02:00
Michael Niedermayer
0160fe454c Merge commit 'd395895cdb2ac8c95bd488549e7f893bd4dcc248'
* commit 'd395895cdb2ac8c95bd488549e7f893bd4dcc248':
  fate: generate tests/pixfmts.mak for all targets requiring it

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 19:10:51 +02:00
Michael Niedermayer
592a854f8c avformat/iff: Fix "source comment"
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 18:16:46 +02:00
Michael Niedermayer
2569227689 avfilter/vf_noise: make constant things const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 17:04:13 +02:00
Michael Niedermayer
849b9d34c7 wmalosslessdec: fix mclms_coeffs* array size
Fixes corruption of context

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
Bug-Id: CVE-2014-2098
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-08-05 14:58:03 +00:00
mrskman
6f3e15af84 avfilter/avf_showwaves: New p2p mode for showwaves filter
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 14:12:35 +02:00
Michael Niedermayer
a53a107a2f Merge commit '0897d2fdc7755849c3ae58d8b543ef734c200d3c'
* commit '0897d2fdc7755849c3ae58d8b543ef734c200d3c':
  movenc: Add option to disable nero chapters

Conflicts:
	doc/muxers.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 13:58:10 +02:00
Michael Niedermayer
2e2e6b1be5 Merge commit '2601a9447efb778930b01ac58d2cc1d02498db4e'
* commit '2601a9447efb778930b01ac58d2cc1d02498db4e':
  mpegts: Add HEVC definitions

Conflicts:
	libavformat/mpegts.h

See: b2880a3de9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 13:52:32 +02:00
Michael Niedermayer
94d4f9d405 Merge commit '89616408e38ac7257e36976723df0e23d6ee1157'
* commit '89616408e38ac7257e36976723df0e23d6ee1157':
  mpegts: Define the section length with a constant

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 13:45:26 +02:00
Michael Niedermayer
9988899993 Merge commit '701e8b42e12ad625c64ceae2252acb1de390278c'
* commit '701e8b42e12ad625c64ceae2252acb1de390278c':
  vc-1: Optimise parser (with special attention to ARM)

Conflicts:
	libavcodec/vc1_parser.c

See: a0d7f9ec9a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 13:37:07 +02:00
Janne Grunau
15201e2560 configure: check $as first before using $gas as GNU as
llvm's integrated assembler supports the AArch64 asm on darwin since
August 2014. So check $as first before using gas-preprocessor.pl via
$gas. Makes the checks specific for that the architecture specific asm
needs. PPC Altivec and AArch64 needs on ':vararg' for macro arguments.
Arm needs in addition the '.altmacro' directive.
2014-08-05 13:11:50 +02:00
Michael Niedermayer
bf7ed956ff Merge commit 'adf8227cf4e7b4fccb2ad88e1e09b6dc00dd00ed'
* commit 'adf8227cf4e7b4fccb2ad88e1e09b6dc00dd00ed':
  vc-1: Add platform-specific start code search routine to VC1DSPContext.

Conflicts:
	configure
	libavcodec/arm/vc1dsp_init_arm.c
	libavcodec/vc1dsp.c
	libavcodec/vc1dsp.h

See: 9d8ecdd8ca
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 13:00:41 +02:00
Michael Niedermayer
77aafadc56 Merge commit 'db7f1c7c5a1d37e7f4da64a79a97bea1c4b6e9f8'
* commit 'db7f1c7c5a1d37e7f4da64a79a97bea1c4b6e9f8':
  h264: Move start code search functions into separate source files.

Conflicts:
	libavcodec/arm/Makefile
	libavcodec/arm/h264dsp_init_arm.c
	libavcodec/h264_parser.c
	libavcodec/h264dsp.c
	libavcodec/startcode.c
	libavcodec/startcode.h

See: 270cede3f3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 12:46:10 +02:00
Janne Grunau
d395895cdb fate: generate tests/pixfmts.mak for all targets requiring it
All subtargets which should run the fate-filter-pixdesc% need to
generate and include tests/pixfmts.mak. Most noteable missing target was
fate itself.
2014-08-05 12:18:59 +02:00
John Stebbins
0897d2fdc7 movenc: Add option to disable nero chapters
And add flag to muxer documentation.
Nero chapters break some taggers (mp3tag and iTunes).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-08-05 11:36:08 +02:00
Femi Adeyemi-Ejeye
2601a9447e mpegts: Add HEVC definitions
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-08-05 11:30:50 +02:00
James Almer
de417982e8 x86/vp9lpf: use fewer instructions in SPLATB_MIX
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 02:47:54 +02:00
Bernd Kuhls
bf6c84d7eb Fix compile error on bfin.
After the removal of all Blackfin architecture optimizations in
http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b55d3bbeed375f7b74442c4dd274d116a3e3d2e1
some includes were left behind leading to a compile error:

CC      libavformat/adtsenc.o
In file included from ./libavcodec/get_bits.h:35,
                 from ./libavcodec/ac3_parser.h:27,
                 from libavformat/ac3dec.c:23:
./libavcodec/mathops.h:43:29: error: bfin/mathops.h: No such file or directory

This compile error was found by buildroot autobuild system:
http://autobuild.buildroot.net/results/ae0/ae056f267e907091d09d2a1546d6f1ae02fa23b9/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 01:54:47 +02:00
Michael Niedermayer
aee99a5d44 swscale/swscale_internal: fix ya16 -> rgba
Fixes Ticket644

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 01:51:11 +02:00
Thilo Borgmann
86b7821e29 lavd/avfoundation: Add device category.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 01:36:26 +02:00
Michael Niedermayer
76bf39ab4b Merge commit 'eee813eec7d3c0b0689f80665d3f796401742935'
* commit 'eee813eec7d3c0b0689f80665d3f796401742935':
  fate: Only generate tests/pixfmts.mak if some pixfmts fate test is run

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 01:20:20 +02:00
Michael Niedermayer
debb88776c Merge commit '990e2f3555bb0adae122d3599938ddcfee46e2d1'
* commit '990e2f3555bb0adae122d3599938ddcfee46e2d1':
  avcodec: Suppress deprecation warnings from DTG code scheduled for removal

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 01:15:11 +02:00
Michael Niedermayer
6b646fb9e2 Merge commit '086a541857812b2e0435db38fbabfddc7d19e53c'
* commit '086a541857812b2e0435db38fbabfddc7d19e53c':
  fate: png-suite

Conflicts:
	tests/fate/image.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 00:53:50 +02:00
Michael Niedermayer
700bf1fa4e swscale/swscale_unscaled: fix ya16 input
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-05 00:33:27 +02:00
Michael Niedermayer
8f83fb9991 Merge commit '60cbd6ad84de0931314030b81df87b69d6196587'
* commit '60cbd6ad84de0931314030b81df87b69d6196587':
  tiff: support reading gray+alpha at 8 bits

Conflicts:
	libavcodec/tiff.c

See: f746f37901
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 22:52:01 +02:00
Michael Niedermayer
47080b6d17 Merge commit 'bcc5f69b33e27b5e11aaea8304ee02f8d895cdab'
* commit 'bcc5f69b33e27b5e11aaea8304ee02f8d895cdab':
  tiff: support reading gray+alpha at 16 bits

Conflicts:
	libavcodec/tiff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 22:45:33 +02:00
Michael Niedermayer
59412e3a07 Merge commit 'e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe'
* commit 'e64f0bf2d2b1347ec9461f0e82852a62e8c6ffbe':
  png: support reading gray+alpha at 16 bits

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 22:38:12 +02:00
Michael Niedermayer
e1795bc380 Merge commit '2257165bff243534982f4ddabae4e65e2a35f2ab'
* commit '2257165bff243534982f4ddabae4e65e2a35f2ab':
  png: disable broken MMX/SIMD code for bpp <= 2

See: d1c48025a7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 22:34:52 +02:00
Michael Niedermayer
2f5bf2f7f2 Merge commit 'f84a1b597c29dc035b8d5529ef88c2d7ff057820'
* commit 'f84a1b597c29dc035b8d5529ef88c2d7ff057820':
  swscale: support AV_PIX_FMT_YA16 as input

Conflicts:
	libswscale/swscale_unscaled.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-08-04 22:32:13 +02:00
Luca Barbato
89616408e3 mpegts: Define the section length with a constant
The specification says the value is expressed in 10 bits including
the 4-byte CRC.
2014-08-04 22:22:54 +02:00
Ben Avison
701e8b42e1 vc-1: Optimise parser (with special attention to ARM)
The previous implementation of the parser made four passes over each input
buffer (reduced to two if the container format already guaranteed the input
buffer corresponded to frames, such as with MKV). But these buffers are
often 200K in size, certainly enough to flush the data out of L1 cache, and
for many CPUs, all the way out to main memory. The passes were:

1) locate frame boundaries (not needed for MKV etc)
2) copy the data into a contiguous block (not needed for MKV etc)
3) locate the start codes within each frame
4) unescape the data between start codes

After this, the unescaped data was parsed to extract certain header fields,
but because the unescape operation was so large, this was usually also
effectively operating on uncached memory. Most of the unescaped data was
simply thrown away and never processed further. Only step 2 - because it
used memcpy - was using prefetch, making things even worse.

This patch reorganises these steps so that, aside from the copying, the
operations are performed in parallel, maximising cache utilisation. No more
than the worst-case number of bytes needed for header parsing is unescaped.
Most of the data is, in practice, only read in order to search for a start
code, for which optimised implementations already existed in the H264 codec
(notably the ARM version uses prefetch, so we end up doing both remaining
passes at maximum speed). For MKV files, we know when we've found the last
start code of interest in a given frame, so we are able to avoid doing even
that one remaining pass for most of the buffer.

In some use-cases (such as the Raspberry Pi) video decode is handled by the
GPU, but the entire elementary stream is still fed through the parser to
pick out certain elements of the header which are necessary to manage the
decode process. As you might expect, in these cases, the performance of the
parser is significant.

To measure parser performance, I used the same VC-1 elementary stream in
either an MPEG-2 transport stream or a MKV file, and fed it through avconv
with -c:v copy -c:a copy -f null. These are the gperftools counts for
those streams, both filtered to only include vc1_parse() and its callees,
and unfiltered (to include the whole binary). Lower numbers are better:

                Before          After
File  Filtered  Mean   StdDev   Mean   StdDev  Confidence  Change
M2TS  No        861.7  8.2      650.5  8.1     100.0%      +32.5%
MKV   No        868.9  7.4      731.7  9.0     100.0%      +18.8%
M2TS  Yes       250.0  11.2     27.2   3.4     100.0%      +817.9%
MKV   Yes       149.0  12.8     1.7    0.8     100.0%      +8526.3%

Yes, that last case shows vc1_parse() running 86 times faster! The M2TS
case does show a larger absolute improvement though, since it was worse
to begin with.

This patch has been tested with the FATE suite (albeit on x86 for speed).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-08-04 22:22:54 +02:00
Ben Avison
adf8227cf4 vc-1: Add platform-specific start code search routine to VC1DSPContext.
Initialise VC1DSPContext for parser as well as for decoder.
Note, the VC-1 code doesn't actually use the function pointer yet.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-08-04 22:22:54 +02:00