]> git.sesse.net Git - ffmpeg/log
ffmpeg
9 years agortpenc_aac: Use AV_WB16 instead of manual bitshifts
Martin Storsjö [Wed, 25 Feb 2015 22:25:11 +0000 (00:25 +0200)]
rtpenc_aac: Use AV_WB16 instead of manual bitshifts

This makes the code slightly more readable and understandable.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpenc_aac: Merge a definition with a declaration
Martin Storsjö [Wed, 25 Feb 2015 22:21:03 +0000 (00:21 +0200)]
rtpenc_aac: Merge a definition with a declaration

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpenc: Write conditional statements on separate lines
Martin Storsjö [Wed, 25 Feb 2015 21:33:24 +0000 (23:33 +0200)]
rtpenc: Write conditional statements on separate lines

Intentionally keeping some conditional statements on single lines
in rtpenc_h263.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpenc_aac: Set a default value for max_frames_per_packet at init
Martin Storsjö [Wed, 25 Feb 2015 21:34:36 +0000 (23:34 +0200)]
rtpenc_aac: Set a default value for max_frames_per_packet at init

This avoids having to conditionally set the default within the
packetizer function.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpenc_amr: Use s->num_frames instead of s->buf_ptr - s->buf
Martin Storsjö [Fri, 27 Feb 2015 10:30:54 +0000 (12:30 +0200)]
rtpenc_amr: Use s->num_frames instead of s->buf_ptr - s->buf

This doesn't fix any bug, but makes the code simpler for later
patches, and more straightforward to read as is.

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agortpenc_aac: Fix sending fragmented frames
Martin Storsjö [Wed, 25 Feb 2015 21:55:58 +0000 (23:55 +0200)]
rtpenc_aac: Fix sending fragmented frames

After sending a fragmented frame, len (s->buf_ptr - s->buf) isn't
zero, while s->num_frames is zero as intended. Using s->num_frames
makes it work as intended, and is less convoluted than keeping track
of (resetting) s->buf_ptr.

This avoids sending stray data after sending a fragmented aac packet.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoAdd a QSV decoding example.
Anton Khirnov [Wed, 11 Feb 2015 23:07:29 +0000 (00:07 +0100)]
Add a QSV decoding example.

9 years agoavcodec/utils: use correct printf specifier in ff_set_sar
Andreas Cadhalpun [Sat, 28 Feb 2015 19:11:36 +0000 (20:11 +0100)]
avcodec/utils: use correct printf specifier in ff_set_sar

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agox11grab: Unbreak building
Christian Hujer [Fri, 27 Feb 2015 09:22:08 +0000 (10:22 +0100)]
x11grab: Unbreak building

The correct macro is DEC not D. Broken in
b31328d008985f87f0a7c83c700847cef1a4f08c

Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years agolavc: do not compile fmtconvert unconditionally
Anton Khirnov [Sat, 21 Feb 2015 10:24:44 +0000 (11:24 +0100)]
lavc: do not compile fmtconvert unconditionally

Only ac3dec and dcadec use it.

9 years agofmtconvert: drop unused functions
Anton Khirnov [Sat, 21 Feb 2015 10:37:52 +0000 (11:37 +0100)]
fmtconvert: drop unused functions

9 years agolavc: remove unused traces of fmtconvert usage
Anton Khirnov [Sat, 21 Feb 2015 10:00:59 +0000 (11:00 +0100)]
lavc: remove unused traces of fmtconvert usage

Those decoders have been switched to float output and so do not use
fmtconvert anymore.

9 years agotls: Pass AVOptions dictionaries through to the chained protocol
Martin Storsjö [Sat, 28 Feb 2015 00:15:55 +0000 (02:15 +0200)]
tls: Pass AVOptions dictionaries through to the chained protocol

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agotcp: Clarify the units for the timeout avoptions
Martin Storsjö [Fri, 27 Feb 2015 23:37:18 +0000 (01:37 +0200)]
tcp: Clarify the units for the timeout avoptions

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoavio: Rename avclass symbols relating to avio
Martin Storsjö [Fri, 27 Feb 2015 23:06:28 +0000 (01:06 +0200)]
avio: Rename avclass symbols relating to avio

Don't prefix them ffio_url, which is misleading, sounding too
much like the urlprotocol layer (like ffurl_*).

Signed-off-by: Martin Storsjö <martin@martin.st>
9 years agoavcodec/ppc/fdctdsp: fix const warning
Michael Niedermayer [Fri, 27 Feb 2015 22:07:22 +0000 (23:07 +0100)]
avcodec/ppc/fdctdsp: fix const warning

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1_block: Optimize vc1_decode_i_block_adv()
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1_block: Optimize vc1_decode_i_block_adv()

9127 -> 8936 decicycles (fate-suite/vc1/SA10143.vc1)
13855 -> 10976 decicycles  (fate-suite/vc1/SA20021.vc1)
tests done by the author over this function but with the whole
patchset applied not just this commit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1_block: Optimize vc1_decode_i_block()
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1_block: Optimize vc1_decode_i_block()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1_block: cosmetics
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1_block: cosmetics

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1_block: move early exit code up in ff_vc1_pred_dc()
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1_block: move early exit code up in ff_vc1_pred_dc()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1_block: Use av_clip_uintp2()
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1_block: Use av_clip_uintp2()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1_block: Optimize vc1_decode_ac_coeff()
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1_block: Optimize vc1_decode_ac_coeff()

Avoid branches in sign handling
Move local variables to where they are used

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1_block: Simplify dcdiff initialization
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1_block: Simplify dcdiff initialization

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1_block: Simplify dir_ptr / pred initialization
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1_block: Simplify dir_ptr / pred initialization

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1: Simplify pred/mc loops
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1: Simplify pred/mc loops

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1: Simplify dmv_y initialization
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1: Simplify dmv_y initialization

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1: Simplify code setting and using extend_x/y
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1: Simplify code setting and using extend_x/y

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1: Make init_block_index() inline
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1: Make init_block_index() inline

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1: use uint8_t for size_table
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1: use uint8_t for size_table

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/vc1: simplify offset table and access
zhaoxiu.zeng [Tue, 24 Feb 2015 16:28:45 +0000 (00:28 +0800)]
avcodec/vc1: simplify offset table and access

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffmpeg: Fix -vstats when coded_frame is not set
Michael Niedermayer [Mon, 23 Feb 2015 15:43:38 +0000 (16:43 +0100)]
ffmpeg: Fix -vstats when coded_frame is not set

There are several encoders which do not set coded_frame

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolavc/pngenc: Support writing colorspace tags.
Niklas Haas [Fri, 27 Feb 2015 20:31:38 +0000 (21:31 +0100)]
lavc/pngenc: Support writing colorspace tags.

These are defined in http://www.w3.org/TR/PNG/#11addnlcolinfo.

9 years agoavformat: Add prefix to get_codec_guid()
Michael Niedermayer [Fri, 27 Feb 2015 18:25:27 +0000 (19:25 +0100)]
avformat: Add prefix to get_codec_guid()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoswscale: Add prefix to updateMMXDitherTables()
Michael Niedermayer [Fri, 27 Feb 2015 18:23:46 +0000 (19:23 +0100)]
swscale: Add prefix to updateMMXDitherTables()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoswresample: Add prefix to soxr_resampler
Michael Niedermayer [Fri, 27 Feb 2015 18:20:43 +0000 (19:20 +0100)]
swresample: Add prefix to soxr_resampler

also move declaration to header

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/dvdec: Make dv_iweight_720_c static
Michael Niedermayer [Fri, 27 Feb 2015 18:17:23 +0000 (19:17 +0100)]
avcodec/dvdec: Make dv_iweight_720_c static

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/v210dec: Add ff prefix to v210_x86_init()
Michael Niedermayer [Fri, 27 Feb 2015 18:08:09 +0000 (19:08 +0100)]
avcodec/v210dec: Add ff prefix to v210_x86_init()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/h264: Add ff_ prefix to the shared h264_init_dequant_tables() function
Michael Niedermayer [Fri, 27 Feb 2015 17:37:36 +0000 (18:37 +0100)]
avcodec/h264: Add ff_ prefix to the shared h264_init_dequant_tables() function

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolavf/mov: correct printf specifier
Christophe Gisquet [Fri, 27 Feb 2015 15:10:38 +0000 (16:10 +0100)]
lavf/mov: correct printf specifier

The type is int64_t.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/snow: mark dwt init as av_cold
Michael Niedermayer [Fri, 27 Feb 2015 15:44:11 +0000 (16:44 +0100)]
avcodec/snow: mark dwt init as av_cold

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/diracdsp: Mark ff_diracdsp_init() as av_cold
Michael Niedermayer [Fri, 27 Feb 2015 15:39:30 +0000 (16:39 +0100)]
avcodec/diracdsp: Mark ff_diracdsp_init() as av_cold

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/mjpegenc: Mark ff_mjpeg_encode_close() as av_cold
Michael Niedermayer [Fri, 27 Feb 2015 15:38:08 +0000 (16:38 +0100)]
avcodec/mjpegenc: Mark ff_mjpeg_encode_close() as av_cold

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agopostproc: mark alloc/free context functions as av_cold
Michael Niedermayer [Fri, 27 Feb 2015 15:15:31 +0000 (16:15 +0100)]
postproc: mark alloc/free context functions as av_cold

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agomovenc: Write 'colr' box correctly for MP4
Derek Buitenhuis [Thu, 26 Feb 2015 13:47:01 +0000 (13:47 +0000)]
movenc: Write 'colr' box correctly for MP4

This also restricts it to MOV and MP4, since it is only
defined for those formats.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
9 years agoavfilter/palettegen: fix frame mem leak
Clément Bœsch [Fri, 27 Feb 2015 13:18:53 +0000 (14:18 +0100)]
avfilter/palettegen: fix frame mem leak

9 years agoavformat/ffmenc: Use ffio_free_dyn_buf()
Michael Niedermayer [Fri, 27 Feb 2015 12:19:05 +0000 (13:19 +0100)]
avformat/ffmenc: Use ffio_free_dyn_buf()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/rtpdec_vp9: Use ffio_free_dyn_buf()
Michael Niedermayer [Fri, 27 Feb 2015 12:18:48 +0000 (13:18 +0100)]
avformat/rtpdec_vp9: Use ffio_free_dyn_buf()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hqx: use init_get_bits8()
Paul B Mahol [Fri, 27 Feb 2015 09:30:13 +0000 (09:30 +0000)]
avcodec/hqx: use init_get_bits8()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years agoavcodec/hqx: fix typo
Paul B Mahol [Fri, 27 Feb 2015 08:38:14 +0000 (08:38 +0000)]
avcodec/hqx: fix typo

Signed-off-by: Paul B Mahol <onemda@gmail.com>
9 years agoswscale/utils: clear formatConvBuffer on allocation
Michael Niedermayer [Fri, 27 Feb 2015 02:12:23 +0000 (03:12 +0100)]
swscale/utils: clear formatConvBuffer on allocation

Fixes use of uninitialized memory
Fixes: asan_heap-oob_35ca682_1474_cov_3230122439_aletrek_tga_16bit.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/bit: only accept the g729 codec and 1 channel
Andreas Cadhalpun [Thu, 26 Feb 2015 20:42:02 +0000 (21:42 +0100)]
avformat/bit: only accept the g729 codec and 1 channel

Other codecs/channel numbers are not supported by this muxer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/bit: check that pkt->size is 10 in write_packet
Andreas Cadhalpun [Thu, 26 Feb 2015 20:38:50 +0000 (21:38 +0100)]
avformat/bit: check that pkt->size is 10 in write_packet

Ohter packet sizes are not supported by this muxer.

This avoids a null pointer dereference of pkt->data.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge remote-tracking branch 'cigaes/master'
Michael Niedermayer [Thu, 26 Feb 2015 20:38:49 +0000 (21:38 +0100)]
Merge remote-tracking branch 'cigaes/master'

* cigaes/master:
  ffmpeg: notify when the thread message queue blocks.
  ffmpeg: allow to set the thread message queue size.
  lavd/alsa: set frame_size field.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoFix buffer_size argument to init_put_bits() in multiple encoders.
Dyami Caliri [Thu, 26 Feb 2015 18:17:01 +0000 (10:17 -0800)]
Fix buffer_size argument to init_put_bits() in multiple encoders.

Several encoders were multiplying the buffer size by 8, in order to get
a bit size. However, the buffer_size argument is for the byte size of
the buffer. We had experienced crashes encoding prores (Anatoliy) at
size 4096x4096.

9 years agoavformat/mp3dec: Check for avcodec_alloc_context3() failure
Michael Niedermayer [Thu, 26 Feb 2015 19:11:19 +0000 (20:11 +0100)]
avformat/mp3dec: Check for avcodec_alloc_context3() failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/mp3dec: properly allocate dummy AVCodecContext
Michael Niedermayer [Thu, 26 Feb 2015 18:59:44 +0000 (19:59 +0100)]
avformat/mp3dec: properly allocate dummy AVCodecContext

Fixes (harmless) use of uninitialized variable

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '82b6e451161f19ab90bfb9565b710021caf5dcbd'
Michael Niedermayer [Thu, 26 Feb 2015 18:36:28 +0000 (19:36 +0100)]
Merge commit '82b6e451161f19ab90bfb9565b710021caf5dcbd'

* commit '82b6e451161f19ab90bfb9565b710021caf5dcbd':
  configure: Move the cross_prefix setting after the toolchain one

Conflicts:
configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agocolormatrix: Accept bt601 aliases as input
Vittorio Giovara [Tue, 24 Feb 2015 18:05:41 +0000 (18:05 +0000)]
colormatrix: Accept bt601 aliases as input

As far as matrix coefficients are concerned, BT470BG and SMPTE170M
match BT601. This is similar to the check performed in vf_scale.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years agoffmpeg: notify when the thread message queue blocks.
Nicolas George [Mon, 16 Feb 2015 20:53:27 +0000 (21:53 +0100)]
ffmpeg: notify when the thread message queue blocks.

This can help finding the source of A-V desync with live input.

9 years agoffmpeg: allow to set the thread message queue size.
Nicolas George [Wed, 25 Feb 2015 10:50:44 +0000 (11:50 +0100)]
ffmpeg: allow to set the thread message queue size.

9 years agolavd/alsa: set frame_size field.
Nicolas George [Mon, 16 Feb 2015 20:52:03 +0000 (21:52 +0100)]
lavd/alsa: set frame_size field.

The value tells the typical size of a packet from the demuxer.

9 years agomips/acelp_filters: fix incorrect register constraint
James Cowgill [Thu, 26 Feb 2015 13:42:52 +0000 (13:42 +0000)]
mips/acelp_filters: fix incorrect register constraint

Change register constraint on the v variable from = to +. This was causing GCC
to think that the v variable was never read and therefore not initialize it.

This fixes about 20 fate failures on mips64el.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agomips/aacdec: refactor out duplicated assembly code
James Cowgill [Thu, 26 Feb 2015 13:42:47 +0000 (13:42 +0000)]
mips/aacdec: refactor out duplicated assembly code

The float_copy and fmul_and_reverse functions are refactored out from the
multiple copies in this file.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agomips/sbrdsp: remove sbr_neg_odd_64_mips
James Cowgill [Thu, 26 Feb 2015 13:42:46 +0000 (13:42 +0000)]
mips/sbrdsp: remove sbr_neg_odd_64_mips

The optimized C version of this code actually runs faster than this
version, so remove it.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agomips/fft: remove some useless assembly
James Cowgill [Thu, 26 Feb 2015 13:42:45 +0000 (13:42 +0000)]
mips/fft: remove some useless assembly

Remove some assembly that the compiler can easily handle optimally on its own.
GCC produces almost identical assembly.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agomips/aacpsdsp: fix definition of ps_decorrelate_mips
James Cowgill [Thu, 26 Feb 2015 13:42:44 +0000 (13:42 +0000)]
mips/aacpsdsp: fix definition of ps_decorrelate_mips

Q_fract should have be declared as 'const float*'.
Also fix the constness of some local variables affected by this.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agomips/mathops: remove 64-bit code
James Cowgill [Thu, 26 Feb 2015 13:42:42 +0000 (13:42 +0000)]
mips/mathops: remove 64-bit code

GCC is perfectly happy generating optimized multiplication code on its own for
64-bit arches. GCC refuses to optimize the loongson code when in 32-bit mode,
so I've left that.

Signed-off-by: James Cowgill <james410@cowgill.org.uk>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoconfigure: Move the cross_prefix setting after the toolchain one
Luca Barbato [Sun, 6 Apr 2014 22:47:42 +0000 (00:47 +0200)]
configure: Move the cross_prefix setting after the toolchain one

Makes passing to configure
--toolchain=gcc-asan --cross-prefix=armv7a-hardfloat-linux-gnueabi-
work as intended.

9 years agotests: add paletteuse test
Clément Bœsch [Mon, 23 Feb 2015 12:51:15 +0000 (13:51 +0100)]
tests: add paletteuse test

9 years agotests: add palettegen test
Clément Bœsch [Mon, 23 Feb 2015 12:51:06 +0000 (13:51 +0100)]
tests: add palettegen test

9 years agoavfilter/paletteuse: use AV_QSORT()
Clément Bœsch [Thu, 26 Feb 2015 10:31:09 +0000 (11:31 +0100)]
avfilter/paletteuse: use AV_QSORT()

See previous commit for a rationale.

9 years agoavfilter/palettegen: use AV_QSORT()
Clément Bœsch [Wed, 25 Feb 2015 15:06:34 +0000 (16:06 +0100)]
avfilter/palettegen: use AV_QSORT()

This makes the sorting of the colors along an axis (r, g or b)
predictible, and thus testable under FATE. The performance is not really
an issue here since the function is called only once at the end and will
need to sort very small number of entries, so an alternative would be to
make the sorting functions (see DECLARE_CMP_FUNC()) fallback on another
axis in case of equality. This approach was actually simpler.

I don't know if there is any advantage in using a multidimensional sort,
but it will affect the final palette one way or another.

9 years agoavfilter/palettegen: consistently use the same frame for dimensions
Clément Bœsch [Thu, 26 Feb 2015 09:25:53 +0000 (10:25 +0100)]
avfilter/palettegen: consistently use the same frame for dimensions

9 years agoavfilter/palettegen: use a logging context for the dupped color warning
Clément Bœsch [Thu, 26 Feb 2015 09:19:45 +0000 (10:19 +0100)]
avfilter/palettegen: use a logging context for the dupped color warning

9 years agoavfilter/palettegen: export color quantization ratio
Clément Bœsch [Wed, 25 Feb 2015 14:34:13 +0000 (15:34 +0100)]
avfilter/palettegen: export color quantization ratio

9 years agoavformat/adxdec: check avctx->channels for invalid values
Andreas Cadhalpun [Wed, 25 Feb 2015 21:55:44 +0000 (22:55 +0100)]
avformat/adxdec: check avctx->channels for invalid values

This avoids a null pointer dereference of pkt->data.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/adxdec: set avctx->channels in adx_read_header
Andreas Cadhalpun [Thu, 26 Feb 2015 00:06:57 +0000 (01:06 +0100)]
avformat/adxdec: set avctx->channels in adx_read_header

It is used in adx_read_packet, which currently depends on the decoder/parser setting this value between reading the file header and demuxing the first packet.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/dss: implement seeking
Michael Niedermayer [Tue, 24 Feb 2015 13:58:17 +0000 (14:58 +0100)]
avformat/dss: implement seeking

This assumes CBR (which is true for all samples i have)

Previous version reviewed by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/dss: set bitrate
Michael Niedermayer [Tue, 24 Feb 2015 13:57:39 +0000 (14:57 +0100)]
avformat/dss: set bitrate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/dss: set packet duration
Michael Niedermayer [Tue, 24 Feb 2015 13:51:16 +0000 (14:51 +0100)]
avformat/dss: set packet duration

Value taken from the decoder implementation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/dss: correct sample rate
Michael Niedermayer [Tue, 24 Feb 2015 14:22:37 +0000 (15:22 +0100)]
avformat/dss: correct sample rate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolibavutil: add x86 optimized av_popcount
James Almer [Wed, 25 Feb 2015 22:52:33 +0000 (19:52 -0300)]
libavutil: add x86 optimized av_popcount

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
9 years agoavcodec/hevc_ps: Check that log2_ctb_size is not smaller than the bounds of all profiles
Michael Niedermayer [Wed, 25 Feb 2015 21:10:41 +0000 (22:10 +0100)]
avcodec/hevc_ps: Check that log2_ctb_size is not smaller than the bounds of all profiles

Fixes: unaligned memory access
Fixes: signal_sigsegv_3344165_576_cov_3406448105_DBLK_A_MAIN10_VIXS_2.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Suggested-by: Christophe Gisquet <christophe.gisquet@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/snow: Initialize spatial_decomposition_count to a valid value
Michael Niedermayer [Wed, 25 Feb 2015 20:18:13 +0000 (21:18 +0100)]
avcodec/snow: Initialize spatial_decomposition_count to a valid value

Fixes undefined behavior
Fixes: signal_sigsegv_24169e6_3445_cov_3778346427_snow_chroma_bug.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavutil/common: Fix integer overflow in av_clip_int8/16_c
Michael Niedermayer [Wed, 25 Feb 2015 19:55:02 +0000 (20:55 +0100)]
avutil/common: Fix integer overflow in av_clip_int8/16_c

Fixes: signal_sigsegv_30420a5_2388_cov_1489993561_integra_lavf.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevcdsp: ARM NEON optimized qpel functions
Seppo Tomperi [Wed, 25 Feb 2015 09:44:55 +0000 (09:44 +0000)]
avcodec/hevcdsp: ARM NEON optimized qpel functions

uses comma as macro parameter separator

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge remote-tracking branch 'cehoyos/master'
Michael Niedermayer [Wed, 25 Feb 2015 16:49:33 +0000 (17:49 +0100)]
Merge remote-tracking branch 'cehoyos/master'

* cehoyos/master:
  Allow muxing h264 into ts with startcode "001" instead of "0001".
  lavfi/fade: Do not overread input buffer.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevc_ps: Sanity checks for some log2_* values
Michael Niedermayer [Wed, 25 Feb 2015 14:51:28 +0000 (15:51 +0100)]
avcodec/hevc_ps: Sanity checks for some log2_* values

log2 values which imply numeric overflow are not supported

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavfilter/palettegen: move longest variable to a local scope
Clément Bœsch [Wed, 25 Feb 2015 16:25:10 +0000 (17:25 +0100)]
avfilter/palettegen: move longest variable to a local scope

Also drop initialization since it is initialized later on before any
usage.

9 years agoAllow muxing h264 into ts with startcode "001" instead of "0001".
Carl Eugen Hoyos [Wed, 25 Feb 2015 14:08:33 +0000 (15:08 +0100)]
Allow muxing h264 into ts with startcode "001" instead of "0001".

Fixes ticket #2220.
Fixes ticket #4324.

9 years agolavfi/fade: Do not overread input buffer.
Carl Eugen Hoyos [Wed, 25 Feb 2015 14:07:18 +0000 (15:07 +0100)]
lavfi/fade: Do not overread input buffer.

9 years agoavformat/mov: Check ctts_count before use
Michael Niedermayer [Wed, 25 Feb 2015 12:00:51 +0000 (13:00 +0100)]
avformat/mov: Check ctts_count before use

Fixes out of array read
Fixes: asan_heap-oob_ae74b5_3610_cov_1739568095_test.3g2
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/zmbv: Check len before reading in decode_frame()
Michael Niedermayer [Wed, 25 Feb 2015 11:29:10 +0000 (12:29 +0100)]
avcodec/zmbv: Check len before reading in decode_frame()

Fixes out of array read
Fixes: asan_heap-oob_4d4eb0_3994_cov_3169972261_zmbv_15bit.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/h264: Clear last_pic_for_ec on seeks and reinits
Michael Niedermayer [Wed, 25 Feb 2015 02:22:13 +0000 (03:22 +0100)]
avcodec/h264: Clear last_pic_for_ec on seeks and reinits

Fixes out of array read
Fixes: asan_heap-oob_2ff30d2_3479_cov_3803648058_src13_hrc7_525_420_2.264
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/arm/hevcdsp_idct_neon: drop ".code 32"
Michael Niedermayer [Tue, 24 Feb 2015 18:01:25 +0000 (19:01 +0100)]
avcodec/arm/hevcdsp_idct_neon: drop ".code 32"

gas-preprocessor and armasm fail otherwise

Tested-by: Timotius Margo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '85b3b1c4ba7af9c2658442b0aafd27d613e1854b'
Michael Niedermayer [Wed, 25 Feb 2015 00:33:18 +0000 (01:33 +0100)]
Merge commit '85b3b1c4ba7af9c2658442b0aafd27d613e1854b'

* commit '85b3b1c4ba7af9c2658442b0aafd27d613e1854b':
  xcbgrab: Unbreak parsing filename options

Conflicts:
libavdevice/xcbgrab.c

See: db442c873631065e8719df6da91c016d25501084
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'b31328d008985f87f0a7c83c700847cef1a4f08c'
Michael Niedermayer [Wed, 25 Feb 2015 00:12:50 +0000 (01:12 +0100)]
Merge commit 'b31328d008985f87f0a7c83c700847cef1a4f08c'

* commit 'b31328d008985f87f0a7c83c700847cef1a4f08c':
  xcbgrab: Provide better names for the y and x option

Conflicts:
doc/indevs.texi
libavdevice/x11grab.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'da7e561964ee833678dc24fae0b0265358126d1e'
Michael Niedermayer [Wed, 25 Feb 2015 00:05:10 +0000 (01:05 +0100)]
Merge commit 'da7e561964ee833678dc24fae0b0265358126d1e'

* commit 'da7e561964ee833678dc24fae0b0265358126d1e':
  matroskaenc: Allow writing track "forced" flag

See: d88d0b6db6bd77269e3c2d3b4894c072f3860671
Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd'
Michael Niedermayer [Tue, 24 Feb 2015 23:58:35 +0000 (00:58 +0100)]
Merge commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd'

* commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd':
  rtpdec: Rename the free method to close

Merged-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoMerge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'
Michael Niedermayer [Tue, 24 Feb 2015 23:48:46 +0000 (00:48 +0100)]
Merge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'

* commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a':
  libavformat: Use ffio_free_dyn_buf where applicable

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