]> git.sesse.net Git - ffmpeg/log
ffmpeg
10 years agox86: use the inline int8x8_fmul_int32 only if inline SSE2 is availbale
Janne Grunau [Sat, 8 Feb 2014 10:48:19 +0000 (11:48 +0100)]
x86: use the inline int8x8_fmul_int32 only if inline SSE2 is availbale

Fixes compilation with MSVC. Also does not rely on on earlier config.h
include but include it directly.

10 years agodcadsp: split lfe_dir cases
Christophe Gisquet [Wed, 5 Feb 2014 23:40:52 +0000 (23:40 +0000)]
dcadsp: split lfe_dir cases

The x86 runs short on registers because numerous elements are not static.
In addition, splitting them allows more optimized code, at least for x86.

Arm asm changes by Janne Grunau.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
10 years agox86: dcadsp: implement int8x8_fmul_int32
Christophe Gisquet [Fri, 11 May 2012 09:25:30 +0000 (11:25 +0200)]
x86: dcadsp: implement int8x8_fmul_int32

For the callable function (as opposed to the inline one):
         C  SSE  SSE2  SSE4
Win32:  47   42   29    26
Win64:  30   33   25    23
The SSE version is neither compiled nor set for ARCH_X86_64, as the
inlinable function takes over.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
10 years agodcadsp: add int8x8_fmul_int32 to dsp context
Christophe Gisquet [Fri, 11 May 2012 09:17:36 +0000 (11:17 +0200)]
dcadsp: add int8x8_fmul_int32 to dsp context

It is currently declared as a macro who is set to inlinable functions,
among which a Neon and a default C implementations.

Add a DSP parameter to each inline function, unused except by the
default C implementation which calls a function from the DSP context.

On an Arrandale CPU, gain for an inlined SSE2 function vs. a call:
- Win32: 29 to 26 cycles
- Win64: 25 to 23 cycles

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
10 years agoarm: Add EXTERN_ASM to the .func and .type declarations for exported symbols
Martin Storsjö [Tue, 4 Feb 2014 14:28:24 +0000 (16:28 +0200)]
arm: Add EXTERN_ASM to the .func and .type declarations for exported symbols

This makes the generated assembly more internally consistent,
avoiding declaring two labels for the same function (for cases
where EXTERN_ASM is empty) and not declaring a separate unprefixed
label in other cases.

This also makes sure the .func and .type delcarations have the same
prefix. They have previously not been used on the platforms
that have prefixed symbols on arm (iOS), but gas-preprocessor
has recently started using the .func declarations for adding
.thumb_func declarations for such functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoarm: Add X() around all references to extern symbols
Martin Storsjö [Fri, 7 Feb 2014 10:00:31 +0000 (12:00 +0200)]
arm: Add X() around all references to extern symbols

Don't rely on the fact that an unprefixed label currently exists.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agovp8: fix bilinear C code to work if src_stride != dst_stride.
Ronald S. Bultje [Wed, 5 Feb 2014 07:59:45 +0000 (07:59 +0000)]
vp8: fix bilinear C code to work if src_stride != dst_stride.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
10 years agovp8: Use 2 registers for dst_stride and src_stride in neon bilin filter
Martin Storsjö [Wed, 5 Feb 2014 12:47:32 +0000 (14:47 +0200)]
vp8: Use 2 registers for dst_stride and src_stride in neon bilin filter

Based on a patch by Ronald S. Bultje.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agofate: force the simple idct for xvid custom matrix test
Janne Grunau [Fri, 31 Jan 2014 11:52:07 +0000 (12:52 +0100)]
fate: force the simple idct for xvid custom matrix test

The original test without a forced idct is still useful since it tests
the switching of the idct algorithm/permutation on x86 with MMX. MMXext
or SSE2. Make sure the test runs only if MMX inline asm is available and
force -cpuflags to all.
Add the required bitexact flag for both tests.

10 years agolavu: add missing log.h include in timer.h
Janne Grunau [Wed, 5 Feb 2014 16:52:35 +0000 (17:52 +0100)]
lavu: add missing log.h include in timer.h

10 years agompeg: K&R formatting cosmetics
Vittorio Giovara [Tue, 4 Feb 2014 13:57:54 +0000 (13:57 +0000)]
mpeg: K&R formatting cosmetics

Also adjust header #include order and some comments.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
10 years agodoxy: Format @code blocks so they render properly
Luca Barbato [Mon, 16 Dec 2013 00:39:30 +0000 (01:39 +0100)]
doxy: Format @code blocks so they render properly

@code command reports verbatim everything between it and @endcode.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agolavf: improve handling of sparse streams when muxing
Luca Barbato [Mon, 20 Jan 2014 12:28:37 +0000 (13:28 +0100)]
lavf: improve handling of sparse streams when muxing

Currently ff_interleave_packet_per_dts() waits until it gets a frame for
each stream before outputting packets in interleaved order.

Sparse streams (i.e. streams with much fewer packets than the other
streams, like subtitles or audio with DTX) tend to add up latency and in
specific cases end up allocating a large amount of memory.

Emit the top packet from the packet_buffer if it has a time delta
larger than a specified threshold.

Original report of the issue and initial proposed solution by
mus.svz@gmail.com.

Bug-id: 31
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agolagarith: reallocate rgb_planes when needed
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
lagarith: reallocate rgb_planes when needed

Fixes invalid writes on pixel format changes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agotruemotion1: check the header size
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
truemotion1: check the header size

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agoshorten: pad the internal bitstream buffer
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
shorten: pad the internal bitstream buffer

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agoeacmv: clear references on frame dimensions change
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
eacmv: clear references on frame dimensions change

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agosamplefmt: avoid integer overflow in av_samples_get_buffer_size()
Justin Ruggles [Thu, 30 Jan 2014 19:08:38 +0000 (14:08 -0500)]
samplefmt: avoid integer overflow in av_samples_get_buffer_size()

CC:libav-stable@libav.org

10 years agoavcodec: Suppress deprecation warnings from avcodec_alloc_frame()
Diego Biurrun [Tue, 4 Feb 2014 11:23:15 +0000 (03:23 -0800)]
avcodec: Suppress deprecation warnings from avcodec_alloc_frame()

The function is itself obsolete and slated for removal.

10 years agojvdec: K&R formatting cosmetics
Vittorio Giovara [Fri, 13 Dec 2013 13:30:22 +0000 (14:30 +0100)]
jvdec: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agoh264: reset data partitioning at the beginning of each decode call
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: reset data partitioning at the beginning of each decode call

Prevents using GetBitContexts with data from previous calls.

Fixes access to freed memory.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agovp8: use a fixed-size edge emu buffer
Anton Khirnov [Mon, 20 Jan 2014 12:12:54 +0000 (13:12 +0100)]
vp8: use a fixed-size edge emu buffer

The reason is the same as for e588615d938f8581f0d6f3771662d08cadfc00de

Based on a patch by Ronald S. Bultje <rsbultje@gmail.com>

10 years agolavf: ignore attachment streams for interleaving purposes
Anton Khirnov [Mon, 20 Jan 2014 12:59:06 +0000 (13:59 +0100)]
lavf: ignore attachment streams for interleaving purposes

Those streams should never get any packets by definition.

10 years agolavf: do basic sanity checking on muxed packets
Anton Khirnov [Mon, 20 Jan 2014 13:10:01 +0000 (14:10 +0100)]
lavf: do basic sanity checking on muxed packets

Reject packets for non-existing or attachment streams.

10 years agoutvideoenc: Add support for the new BT.709 FourCCs for YCbCr
Jan Ekström [Sun, 2 Feb 2014 13:04:58 +0000 (15:04 +0200)]
utvideoenc: Add support for the new BT.709 FourCCs for YCbCr

With cli usage the decoder might have not set the colorspace during
encoder init, manual colorspace override might be needed in such
cases.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agovf_overlay: add eof_action switch
Keith Lawson [Mon, 3 Feb 2014 00:39:18 +0000 (19:39 -0500)]
vf_overlay: add eof_action switch

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agohevc: check that the VCL NAL types are the same for all slice segments of a frame
Anton Khirnov [Sun, 2 Feb 2014 12:35:48 +0000 (13:35 +0100)]
hevc: check that the VCL NAL types are the same for all slice segments of a frame

Fixes possible invalid memory access for mismatching skipped/non-skipped
slice segments.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Sample-Id: 00001533-google

10 years agohevc: Reject impossible slice segment
Luca Barbato [Sat, 11 Jan 2014 10:32:07 +0000 (11:32 +0100)]
hevc: Reject impossible slice segment

A dependent slice cannot have address 0.
Prevent an out of array bound load in ff_hevc_cabac_init().

Sample-Id: 00001406-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agohevc: Consider first quantization group any reference to 0, 0
Luca Barbato [Sat, 11 Jan 2014 03:22:50 +0000 (04:22 +0100)]
hevc: Consider first quantization group any reference to 0, 0

According to my understanding of T-REC-H.265-2013044 chapter 8.6.1.

Sample-Id: 00001438-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agomxf: Read field dominance flag
Matthieu Bouron [Sat, 16 Feb 2013 12:52:29 +0000 (13:52 +0100)]
mxf: Read field dominance flag

And export the information in field_order.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agomxf: Handle negative edit_rate
Luca Barbato [Wed, 8 Jan 2014 00:20:00 +0000 (01:20 +0100)]
mxf: Handle negative edit_rate

Default to 1/25.

10 years agofate: add xvid test for custom matrices
Janne Grunau [Wed, 29 Jan 2014 17:36:24 +0000 (18:36 +0100)]
fate: add xvid test for custom matrices

Test sample is made from the sample in Bug-Id: videolan/7411

10 years agoxvid: switch to xvid mmx idct as soon as possible
Janne Grunau [Wed, 29 Jan 2014 16:36:40 +0000 (17:36 +0100)]
xvid: switch to xvid mmx idct as soon as possible

The idct implementation cannot be changed after the quantization matrices
are read since it use a different permutaion.

Bug-Id: videolan/7411

10 years agolavf: include 60 fps in guessed standard frame rates
Janne Grunau [Wed, 29 Jan 2014 14:12:48 +0000 (15:12 +0100)]
lavf: include 60 fps in guessed standard frame rates

Due to what looks like an off-by-one error 60 * 12 * 1001 / 12 * 1001
is not tested as standard frame rate in avformat_find_stream_info().

10 years agoatrac3plus: Make initialization dependant on channel count rather than channel map
Jan Ekström [Thu, 30 Jan 2014 08:37:53 +0000 (08:37 +0000)]
atrac3plus: Make initialization dependant on channel count rather than channel map

Makes it easier to recreate an AVCodecContext for ATRAC3+ decoding,
which is needed in multimedia frameworks, as well as in general cases
where demuxing and decoding are separate entities.

10 years agox86: videodsp: Fix a bug in a %if statement where we used '%%' instead of '&&'.
Ronald S. Bultje [Sat, 26 Oct 2013 12:24:09 +0000 (08:24 -0400)]
x86: videodsp: Fix a bug in a %if statement where we used '%%' instead of '&&'.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
10 years agox86: videodsp: Properly mark sse2 instructions in emulated_edge_mc as such.
Ronald S. Bultje [Thu, 24 Oct 2013 10:54:32 +0000 (06:54 -0400)]
x86: videodsp: Properly mark sse2 instructions in emulated_edge_mc as such.

Should fix crashes or corrupt output on pre-SSE2 CPUs when they were
using SSE2-code (e.g. AMD Athlon XP 2400+ or Intel Pentium III) in
hfix or hvar single-edge (left/right) extension functions.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
10 years agodoc: document correct option to list encoders
John Stebbins [Sun, 26 Jan 2014 14:55:26 +0000 (14:55 +0000)]
doc: document correct option to list encoders

10 years agodoc: add decoders.texi
John Stebbins [Sun, 26 Jan 2014 14:49:10 +0000 (14:49 +0000)]
doc: add decoders.texi

Only documents ac3 decoder options at this point.

10 years agoac3dec: Allow asymmetric application of DRC when drc_scale > 1
John Stebbins [Mon, 13 Jan 2014 17:04:30 +0000 (17:04 +0000)]
ac3dec: Allow asymmetric application of DRC when drc_scale > 1

Amplification of quiet sounds is enhanced.
Inspired by gbooker's A52Decoder.

10 years agoavformat: utils: Refactor duplicated PRINT macro
Diego Biurrun [Thu, 16 Jan 2014 00:55:38 +0000 (01:55 +0100)]
avformat: utils: Refactor duplicated PRINT macro

10 years agompeg: Drop unused parameters from ff_draw_horiz_band()
Diego Biurrun [Wed, 29 Jan 2014 13:14:46 +0000 (14:14 +0100)]
mpeg: Drop unused parameters from ff_draw_horiz_band()

10 years agox86inc: Speed up assembling with Yasm
Loren Merritt [Sun, 19 Jan 2014 18:22:55 +0000 (19:22 +0100)]
x86inc: Speed up assembling with Yasm

Work around Yasm's inefficiency with handling large numbers of variables
in the global scope.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agoavformat: utils: K&R formatting cosmetics
Diego Biurrun [Thu, 16 Jan 2014 00:53:03 +0000 (01:53 +0100)]
avformat: utils: K&R formatting cosmetics

Also adjust some comment wording / spelling and reorder header #includes.

10 years agoconfigure: clang: explicitly state dep file and rule name in DEPFLAGS
Janne Grunau [Sat, 25 Jan 2014 16:34:19 +0000 (17:34 +0100)]
configure: clang: explicitly state dep file and rule name in DEPFLAGS

Fixes dependency file generation with gas-preprocessor.pl and clang.
Flags copied from GCC and tested with Apple's clang from Xcode 5 and
5.1 and clang 3.2, 3.3, 3.4 on Linux.

10 years agoconfigure: add missing x86 dependency for i686
Janne Grunau [Sat, 25 Jan 2014 15:55:58 +0000 (16:55 +0100)]
configure: add missing x86 dependency for i686

10 years agompeg12: check scantable indices in all decode_block functions
Janne Grunau [Fri, 24 Jan 2014 15:22:44 +0000 (16:22 +0100)]
mpeg12: check scantable indices in all decode_block functions

Add checks to the fast functions used with CODEC_FLAGS2_FAST and move
the check for all other functions to before the invalid memory is
accessed. Fixes https://trac.videolan.org/vlc/ticket/9713 with
CODEC_FLAGS2_FAST.

CC: libav-stable@libav.org
10 years agoavutil: remove timer.h include from internal.h
Janne Grunau [Thu, 23 Jan 2014 15:20:23 +0000 (16:20 +0100)]
avutil: remove timer.h include from internal.h

Added libavutil/timer.h include to all files with {START,STOP}_TIMER.

10 years agodxtory: compressed RGB555/RGB565 decoding support
Kostya Shishkov [Tue, 21 Jan 2014 19:11:35 +0000 (20:11 +0100)]
dxtory: compressed RGB555/RGB565 decoding support

10 years agodxtory: add more compressed and uncompressed modes
Kostya Shishkov [Tue, 21 Jan 2014 19:06:11 +0000 (20:06 +0100)]
dxtory: add more compressed and uncompressed modes

10 years agovp9: fix bugs in updating coef probabilities with parallelmode=1
Guillaume Martres [Sun, 19 Jan 2014 18:04:59 +0000 (19:04 +0100)]
vp9: fix bugs in updating coef probabilities with parallelmode=1

- The memcpy was completely wrong because
s->prob_ctx[s->framectxid].coef is a [4][2][2][6][6][3] array, whereas
s->prob.coef is a [4][2][2][6][6][11] array.
- The additional check was committed to ffmpeg by Ronald S. Bultje.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agovp9: fix mvref finding to adhere to bug in libvpx.
Ronald S. Bultje [Sun, 19 Jan 2014 18:04:58 +0000 (19:04 +0100)]
vp9: fix mvref finding to adhere to bug in libvpx.

Fixes a particular youtube video that I unfortunately can't share.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agortpdec_asf: Copy the need_parsing field from the chained demuxer
Martin Storsjö [Thu, 23 Jan 2014 12:07:46 +0000 (14:07 +0200)]
rtpdec_asf: Copy the need_parsing field from the chained demuxer

This fixes playback of mp3 streams in rtp/asf. This used to work
until c6f1dc8, but mostly by coincidence.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agompegvideo_enc: Don't call ff_h263dsp_init unconditionally
Martin Storsjö [Wed, 22 Jan 2014 14:58:36 +0000 (16:58 +0200)]
mpegvideo_enc: Don't call ff_h263dsp_init unconditionally

This fixes builds with e.g. --disable-decoders --disable-encoders
--enable-encoder=mjpeg.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agobfin: vp3: Mark all binary object sections appropriately
Diego Biurrun [Wed, 22 Jan 2014 13:01:08 +0000 (05:01 -0800)]
bfin: vp3: Mark all binary object sections appropriately

This fixes a leftover from e44d7c659ba56d7efd6de10d5d99a1c44fd997fa.

10 years agoh264: skip chroma edges at the picture boundary while deblocking 4:4:4
Janne Grunau [Mon, 20 Jan 2014 17:16:54 +0000 (18:16 +0100)]
h264: skip chroma edges at the picture boundary while deblocking 4:4:4

This handles macroblock edges for the chroma components in the same way
as for the luma compoment for 4:4:4 streams. The Spec explicitly states
that the deblocking filter is not applied to edges at the boundary of
the picture.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
10 years agoconfigure: Set default HOSTCFLAGS/HOSTCPPFLAGS after compiler detection
Diego Biurrun [Tue, 21 Jan 2014 18:54:14 +0000 (19:54 +0100)]
configure: Set default HOSTCFLAGS/HOSTCPPFLAGS after compiler detection

This prevents the default HOSTCFLAGS from getting clobbered by flags
passed to configure on the command line.

10 years agorgb2rgb_template: add MMX/SSE2/AVX-optimized deinterleaveBytes
Michael Niedermayer [Tue, 19 Nov 2013 13:57:52 +0000 (14:57 +0100)]
rgb2rgb_template: add MMX/SSE2/AVX-optimized deinterleaveBytes

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoswscale/x86/rgb2rgb: add support for AVX
Michael Niedermayer [Tue, 19 Nov 2013 13:46:01 +0000 (14:46 +0100)]
swscale/x86/rgb2rgb: add support for AVX

This does not yet include any actual AVX code

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoswscale: add nv12/nv21->yuv420 converter
Michael Niedermayer [Tue, 19 Nov 2013 13:17:26 +0000 (14:17 +0100)]
swscale: add nv12/nv21->yuv420 converter

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoswscale: fix stride used in planarToNv12Wrapper()
Michael Niedermayer [Tue, 19 Nov 2013 13:19:22 +0000 (14:19 +0100)]
swscale: fix stride used in planarToNv12Wrapper()

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agolavc: do not force the emu edge flag
Anton Khirnov [Mon, 20 Jan 2014 14:22:09 +0000 (15:22 +0100)]
lavc: do not force the emu edge flag

The default get_buffer2() implementation (and possibly some
user ones) does not allocate edges when this flag is set, which may
expose bugs in some decoders. Until the 10 release is out, it is safer
to remove this part.

10 years agodxtory: change error code for unexpected slice configuration
Kostya Shishkov [Sat, 18 Jan 2014 13:35:47 +0000 (14:35 +0100)]
dxtory: change error code for unexpected slice configuration

10 years agodxtory: correctly handle YUV slices with average odd height
Kostya Shishkov [Sat, 18 Jan 2014 13:34:30 +0000 (14:34 +0100)]
dxtory: correctly handle YUV slices with average odd height

10 years agodxva2: Use correct printf format strings
Diego Biurrun [Tue, 21 Jan 2014 13:42:44 +0000 (14:42 +0100)]
dxva2: Use correct printf format strings

10 years agodxva2: Add missing #includes
Diego Biurrun [Tue, 21 Jan 2014 13:42:23 +0000 (14:42 +0100)]
dxva2: Add missing #includes

10 years agodxva2: Log errors verbosely
Sam Lantinga [Sun, 19 Jan 2014 14:42:36 +0000 (15:42 +0100)]
dxva2: Log errors verbosely

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agodxva2: Retry IDirectXVideoDecoder_BeginFrame()
Sam Lantinga [Thu, 9 Jan 2014 19:59:54 +0000 (19:59 +0000)]
dxva2: Retry IDirectXVideoDecoder_BeginFrame()

If the function returns E_PENDING retry for a fixed number of times.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agohevc: Bound check cu_qp_delta
Luca Barbato [Sat, 11 Jan 2014 19:13:20 +0000 (20:13 +0100)]
hevc: Bound check cu_qp_delta

The T-REC-H.265-2013044 page 91 states it has to be in the range
[-(26 + s->sps->qp_bd_offset / 2), (25 + s->sps->qp_bd_offset / 2)].

10 years agohevc: Bound check slice_qp
Luca Barbato [Sat, 11 Jan 2014 19:13:20 +0000 (20:13 +0100)]
hevc: Bound check slice_qp

The T-REC-H.265-2013044 page 79 states it has to be in the range
[-s->sps->qp_bd_offset, 51].

Sample-Id: 00001386-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agohevc: Prevent some integer overflows
Luca Barbato [Sat, 11 Jan 2014 11:33:42 +0000 (12:33 +0100)]
hevc: Prevent some integer overflows

get_ue_golomb_long() returns an unsigned.

Sample-Id: 00001541-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agohevc: Remove useless clip
Guillaume Martres [Sat, 11 Jan 2014 21:46:25 +0000 (22:46 +0100)]
hevc: Remove useless clip

The src buffer should only contain values in the interval
[0, (1 << BIT_DEPTH) - 1].

Since shift = (BIT_DEPTH - 5), src[x] >> shift must be in
the interval [0, 31], so no clip is needed.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agohevc: clip pixels when transquant bypass is used
Guillaume Martres [Sat, 11 Jan 2014 21:46:24 +0000 (22:46 +0100)]
hevc: clip pixels when transquant bypass is used

The reconstructed picture should always be clipped (see section 8.6.5),
previously we did not clip coding units where
cu_transquant_bypass_flag == 1.

Sample-Id: 00001325-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agohevc: Use uint64 to check for tile dimensions
Luca Barbato [Sat, 11 Jan 2014 02:20:45 +0000 (03:20 +0100)]
hevc: Use uint64 to check for tile dimensions

And use unsigned datatypes.

Otherwise it would overflow.

Sample-Id: 00001315-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agohevc: Fix modulo operations
Michael Niedermayer [Fri, 10 Jan 2014 20:32:05 +0000 (21:32 +0100)]
hevc: Fix modulo operations

Keep qp fields within the range.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agohevc: check that VPS referenced from SPS exists
Michael Niedermayer [Fri, 10 Jan 2014 20:32:04 +0000 (21:32 +0100)]
hevc: check that VPS referenced from SPS exists

This matches how its done for SPS/PPS.
Fixes null pointer dereference.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agovc1: Always reset numref when parsing a new frame header.
Michael Niedermayer [Sun, 19 Jan 2014 15:28:25 +0000 (15:28 +0000)]
vc1: Always reset numref when parsing a new frame header.

Fixes an issue where the B-frame coding mode switches from interlaced
fields to interlaced frames, causing incorrect decisions in the motion
compensation code and resulting in visual artifacts.

CC: libav-stable@libav.org
Signed-off-by: Tim Walker <tdskywalker@gmail.com>
10 years agortmpproto: Send a full, absolute timestamp if it isn't monotonically growing
Martin Storsjö [Fri, 17 Jan 2014 12:30:57 +0000 (14:30 +0200)]
rtmpproto: Send a full, absolute timestamp if it isn't monotonically growing

The normal differential timestamps can't handle negative
differences, thus send a full packet header with an absolute
timestamp in these cases.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agortmpproto: Avoid using uninitialized memory
Martin Storsjö [Fri, 17 Jan 2014 12:29:57 +0000 (14:29 +0200)]
rtmpproto: Avoid using uninitialized memory

If the url ends with .flv, we stripped it but didn't initialize
rt->playpath, doing av_strlcat on an uninitialized buffer.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomov: do not set avg_frame_rate in the demuxer
Justin Ruggles [Thu, 16 Jan 2014 20:59:05 +0000 (15:59 -0500)]
mov: do not set avg_frame_rate in the demuxer

The track duration is often not reliable or is not the duration
represented by the number of frames. In those cases, avg_frame_rate
was reported incorrectly. Removing this code falls back to the
default calculation in avformat_find_stream_info().

This is a partial revert of commit c3aeaa540.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
10 years agolavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width().
Anton Khirnov [Thu, 2 Jan 2014 10:07:11 +0000 (11:07 +0100)]
lavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width().

10 years agompegvideo: allocate edges when encoding.
Anton Khirnov [Wed, 1 Jan 2014 19:04:53 +0000 (20:04 +0100)]
mpegvideo: allocate edges when encoding.

Allocating edges will be removed from generic code, so the encoder must
handle this explicitly.

10 years agolavc: allow the caller to override dimensions in ff_get_buffer()
Anton Khirnov [Wed, 1 Jan 2014 19:03:05 +0000 (20:03 +0100)]
lavc: allow the caller to override dimensions in ff_get_buffer()

This will be useful for allocating edges in the encoders.

10 years agoeac3: cosmetics, re-indent.
Tim Walker [Fri, 17 Jan 2014 15:08:18 +0000 (16:08 +0100)]
eac3: cosmetics, re-indent.

10 years ago(e)ac3: clip surround mix level indexes.
Tim Walker [Fri, 17 Jan 2014 15:06:34 +0000 (16:06 +0100)]
(e)ac3: clip surround mix level indexes.

Values 0-2 are reserved, 3 (-1.5dB) should be used instead.

10 years ago(e)ac3: parse and store the Lt/Rt and LFE mix levels.
Tim Walker [Fri, 17 Jan 2014 14:57:40 +0000 (15:57 +0100)]
(e)ac3: parse and store the Lt/Rt and LFE mix levels.

10 years agoac3: set default matrix encoding modes in parse_frame_header.
Tim Walker [Fri, 17 Jan 2014 14:18:45 +0000 (15:18 +0100)]
ac3: set default matrix encoding modes in parse_frame_header.

Deduplicates some code.

10 years agoh264: check that an IDR NAL only contains I slices
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: check that an IDR NAL only contains I slices

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agoh264: reset num_reorder_frames if it is invalid
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: reset num_reorder_frames if it is invalid

An invalid VUI is not considered a fatal error, so the SPS containing it
may still be used. Leaving an invalid value of num_reorder_frames there
can result in writing over the bounds of H264Context.delayed_pic.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agoh264: reset ref count if decoding the slice header fails
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: reset ref count if decoding the slice header fails

Otherwise the ER code might try to use some already freed references.

Fixes possible access to freed memory.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agoh264: prevent two matching fields from being both a short/long ref combination
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: prevent two matching fields from being both a short/long ref combination

Fixes possible access to freed memory.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agoh264: do not call field_end if we do not have a current picture
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: do not call field_end if we do not have a current picture

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agoh264: limit allowed pred modes in ff_h264_check_intra_pred_mode() to 3
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: limit allowed pred modes in ff_h264_check_intra_pred_mode() to 3

Higher modes are not allowed for 16x16/chroma, which is what this
function is used for. Otherwise this function would return 0 (vertical
prediction) for invalid higher modes, which could result in invalid
reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agoh264: reset first_field if frame_start() fails for missing refs
Anton Khirnov [Thu, 28 Nov 2013 09:54:35 +0000 (10:54 +0100)]
h264: reset first_field if frame_start() fails for missing refs

In this case we may not have a current frame, while first_field being
set implies we do.

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org

10 years agoPrepare for 10_alpha2 Release
Reinhard Tartler [Sat, 18 Jan 2014 15:27:27 +0000 (10:27 -0500)]
Prepare for 10_alpha2 Release

10 years agoavisynth: fix setting packet properties
Michael Niedermayer [Mon, 13 Jan 2014 15:09:26 +0000 (10:09 -0500)]
avisynth: fix setting packet properties

Reviewed-by: Stephen Hutchinson <qyot27@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agobuffersrc: handle non-refcounted frames in av_buffersrc_add_frame() correctly
Anton Khirnov [Thu, 16 Jan 2014 10:06:02 +0000 (11:06 +0100)]
buffersrc: handle non-refcounted frames in av_buffersrc_add_frame() correctly

10 years agoyuv4mpeg: set average frame rate
Anton Khirnov [Wed, 15 Jan 2014 20:14:46 +0000 (21:14 +0100)]
yuv4mpeg: set average frame rate

10 years agoavconv: print a warning when falling back to default 25fps
Anton Khirnov [Wed, 15 Jan 2014 20:32:38 +0000 (21:32 +0100)]
avconv: print a warning when falling back to default 25fps

10 years agomp3enc: allow omitting the id3v2 header with -id3v2_version 0
Anton Khirnov [Tue, 14 Jan 2014 21:06:03 +0000 (22:06 +0100)]
mp3enc: allow omitting the id3v2 header with -id3v2_version 0