Commit Graph

18905 Commits

Author SHA1 Message Date
Anton Khirnov
e46ad30a80 vp8: use a fixed-size edge emu buffer
The reason is the same as for e588615d93

Based on a patch by Ronald S. Bultje <rsbultje@gmail.com>
2014-02-04 11:21:07 +01:00
Jan Ekström
5de64bb34d 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>
2014-02-04 10:59:28 +01:00
Anton Khirnov
b25e84b739 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
2014-02-04 10:39:07 +01:00
Luca Barbato
816e5b9970 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
2014-02-01 17:04:49 +01:00
Luca Barbato
09e2203b8b 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
2014-02-01 17:02:35 +01:00
Janne Grunau
7716dd9fbb 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
2014-01-31 11:09:11 +01:00
Jan Ekström
5312818524 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.
2014-01-31 11:09:10 +01:00
Ronald S. Bultje
9ee9c679a7 x86: videodsp: Fix a bug in a %if statement where we used '%%' instead of '&&'.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-01-30 15:33:23 +01:00
Ronald S. Bultje
51daafb02e 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>
2014-01-30 15:30:01 +01:00
John Stebbins
23d461fe87 ac3dec: Allow asymmetric application of DRC when drc_scale > 1
Amplification of quiet sounds is enhanced.
Inspired by gbooker's A52Decoder.
2014-01-29 23:26:25 +01:00
Diego Biurrun
54b2ce7418 mpeg: Drop unused parameters from ff_draw_horiz_band() 2014-01-29 16:37:23 +01:00
Janne Grunau
6d93307f8d 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
2014-01-25 21:50:20 +01:00
Janne Grunau
fb0c9d41d6 avutil: remove timer.h include from internal.h
Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
2014-01-25 21:50:20 +01:00
Kostya Shishkov
28e1eed3c2 dxtory: compressed RGB555/RGB565 decoding support 2014-01-24 20:09:51 +01:00
Kostya Shishkov
0e1ad2f591 dxtory: add more compressed and uncompressed modes 2014-01-24 20:09:44 +01:00
Guillaume Martres
50866c8d95 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>
2014-01-24 07:03:11 +01:00
Ronald S. Bultje
bd01412313 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>
2014-01-24 07:02:56 +01:00
Martin Storsjö
cff480e49d 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>
2014-01-22 18:42:38 +02:00
Diego Biurrun
19987fa18c bfin: vp3: Mark all binary object sections appropriately
This fixes a leftover from e44d7c659b.
2014-01-22 05:38:15 -08:00
Janne Grunau
ea49f60523 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>
2014-01-22 13:44:28 +01:00
Anton Khirnov
e0ab5078a7 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.
2014-01-21 17:54:09 +01:00
Kostya Shishkov
025fd76e1a dxtory: change error code for unexpected slice configuration 2014-01-21 17:47:50 +01:00
Kostya Shishkov
e91a3f1bdb dxtory: correctly handle YUV slices with average odd height 2014-01-21 17:47:50 +01:00
Diego Biurrun
ade4ecb42d dxva2: Use correct printf format strings 2014-01-21 14:42:44 +01:00
Diego Biurrun
766df7ca89 dxva2: Add missing #includes 2014-01-21 14:42:23 +01:00
Sam Lantinga
9d80b1ae95 dxva2: Log errors verbosely
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-21 12:46:29 +01:00
Sam Lantinga
5b2b23f2d6 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>
2014-01-21 12:46:28 +01:00
Luca Barbato
e22ebd04bc 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)].
2014-01-21 11:59:54 +01:00
Luca Barbato
0d999333f9 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
2014-01-21 11:59:30 +01:00
Luca Barbato
838740e642 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
2014-01-21 11:59:18 +01:00
Guillaume Martres
faf03ecba0 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>
2014-01-21 11:58:52 +01:00
Guillaume Martres
a246d06fe0 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>
2014-01-21 11:58:37 +01:00
Luca Barbato
b37e796082 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
2014-01-21 11:57:51 +01:00
Michael Niedermayer
d5c15ebeaf 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>
2014-01-21 11:57:43 +01:00
Michael Niedermayer
a7a07cc98a 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>
2014-01-21 11:57:36 +01:00
Michael Niedermayer
dd2d0039b6 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>
2014-01-20 23:22:30 +01:00
Anton Khirnov
93c553c71e lavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width(). 2014-01-20 12:52:28 +01:00
Anton Khirnov
024db24912 mpegvideo: allocate edges when encoding.
Allocating edges will be removed from generic code, so the encoder must
handle this explicitly.
2014-01-20 12:50:14 +01:00
Anton Khirnov
f7e85ee996 lavc: allow the caller to override dimensions in ff_get_buffer()
This will be useful for allocating edges in the encoders.
2014-01-20 12:49:47 +01:00
Tim Walker
0d43b114cc eac3: cosmetics, re-indent. 2014-01-19 19:12:58 +01:00
Tim Walker
ade75fb811 (e)ac3: clip surround mix level indexes.
Values 0-2 are reserved, 3 (-1.5dB) should be used instead.
2014-01-19 19:12:52 +01:00
Tim Walker
c229f571fd (e)ac3: parse and store the Lt/Rt and LFE mix levels. 2014-01-19 19:12:42 +01:00
Tim Walker
1f604f96ea ac3: set default matrix encoding modes in parse_frame_header.
Deduplicates some code.
2014-01-19 19:12:33 +01:00
Anton Khirnov
8b2e5e42bb h264: check that an IDR NAL only contains I slices
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-18 20:53:31 +01:00
Anton Khirnov
9ecabd7892 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
2014-01-18 20:53:06 +01:00
Anton Khirnov
0652e024c6 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
2014-01-18 20:51:04 +01:00
Anton Khirnov
98cc9efc5f 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
2014-01-18 20:42:39 +01:00
Anton Khirnov
00dbff4c3e 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
2014-01-18 20:42:21 +01:00
Anton Khirnov
7f0e81db3c 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
2014-01-18 20:41:59 +01:00
Anton Khirnov
d1b3fabe69 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
2014-01-18 20:41:24 +01:00
Diego Biurrun
aab40bbfd5 x86: dsputil: Simplify xvmc deprecation conditional 2014-01-15 15:23:46 +01:00
Diego Biurrun
dc4d726bab build: Add separate hidden config option for the intrax8 code
This allows for slightly cleaner dependency specification.
2014-01-15 15:23:46 +01:00
Janne Grunau
fe96769bed aarch64: port neon clobber test from arm 2014-01-15 12:31:07 +01:00
Janne Grunau
f896bca03f aarch64: h264 (bi)weight NEON optimizations
Ported from ARMv7 NEON.
2014-01-15 12:31:07 +01:00
Janne Grunau
36e3b1f2fd aarch64: h264 loop filter NEON optimizations
Ported from ARMv7 NEON.
2014-01-15 12:31:04 +01:00
Janne Grunau
c65d67ef50 aarch64: hpeldsp NEON optimizations
Ported from ARMv7 NEON.
2014-01-15 12:30:24 +01:00
Janne Grunau
d5dd8c7bf0 aarch64: h264 qpel NEON optimizations
Ported from ARMv7 NEON.
2014-01-15 12:17:49 +01:00
Janne Grunau
8438b3f09f aarch64: h264 idct NEON assembler optimizations
Ported from ARMv7 NEON.
2014-01-15 12:13:41 +01:00
Janne Grunau
71617884a2 aarch64: h264 chroma motion compensation NEON optimizations
Since RV40 and VC-1 use almost the same algorithm so optimizations for
those two decoders are easy to do and included.
2014-01-15 12:07:18 +01:00
Janne Grunau
1e9265cd8f dct-test: test ff_simple_idct_neon only on ARM for now
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-01-15 11:58:39 +01:00
Janne Grunau
8b4119187b cabac: remove leftovers from the cabac encoder
The cabac encoder was only used by the removed cabac test.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-01-14 22:19:03 +01:00
Diego Biurrun
46bacb5cc6 x86: Consistently use cpu flag detection macros in places that still miss it 2014-01-14 00:04:58 +01:00
Diego Biurrun
7151c5d04a arm: Use full filenames as multiple inclusion guards 2014-01-14 00:04:52 +01:00
Tim Walker
49b9badcaa vc1: Enable the interlaced B-frame codepath.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-13 10:23:01 +01:00
Michael Niedermayer
6d98959c8a vc1: Add avg_no_rnd_vc1_chroma_mc4_c()
Needed for proper interlaced support.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-01-13 10:22:58 +01:00
Luca Barbato
c798a6fedc vc1: Factorize out chroma MC 2014-01-13 10:21:53 +01:00
Luca Barbato
a1f5164814 vc1dsp: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-01-12 18:33:25 +01:00
Martin Storsjö
44a0a98f92 arm: Add an option for making sure NEON registers aren't clobbered
This is pretty much based on the same test for XMM registers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-11 00:03:00 +02:00
Maxim Polijakowski
e6f0bb6527 ATRAC3+ decoder
Cleanup by Diego Biurrun.

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2014-01-09 19:33:07 +01:00
Diego Biurrun
4c642d8d98 x86: hpeldsp: Add missing av_cold attribute to init function 2014-01-09 15:09:07 +01:00
Diego Biurrun
b0be1ae792 x86: avcodec: Add a bunch of missing #includes for av_cold 2014-01-09 15:09:07 +01:00
Diego Biurrun
4b48201d4d ac3tab.h: #include the correct headers 2014-01-09 15:09:07 +01:00
Anton Khirnov
d48132b7de mjpegdec: apply flipping after decoding, not before
This is simpler and removes a silly restriction on edges being present.
2014-01-09 09:56:51 +01:00
Guillaume Martres
e588615d93 hevc: fix decoding of one PU wide files
For those the block size may be larger than the source linesize (if the
edges are not allocated).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-09 09:46:13 +01:00
Anton Khirnov
ca96e33716 vp9: drop support for real (non-emulated) edges
They are not measurably faster on x86, they might be somewhat faster on
other platforms due to missing emu edge SIMD, but the gain is not large
enough to justify the added complexity.
2014-01-09 09:43:59 +01:00
Anton Khirnov
ef8c93e2f1 vp8: drop support for real (non-emulated) edges
They are not measurably faster on x86, they might be somewhat faster on
other platforms due to missing emu edge SIMD, but the gain is not large
enough to justify the added complexity.
2014-01-09 09:41:24 +01:00
Anton Khirnov
ebfe622bb1 mpegvideo: drop support for real (non-emulated) edges
Several decoders disable those anyway and they are not measurably faster
on x86. They might be somewhat faster on other platforms due to missing
emu edge SIMD, but the gain is not large enough (and those decoders
relevant enough) to justify the added complexity.
2014-01-09 09:41:19 +01:00
Martin Storsjö
952d3187d8 arm: Add a missing # as prefix for an immediate constant
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-07 19:30:13 +02:00
Martin Storsjö
5dae487235 arm: Allow overriding the alignment set in the function macro
The function macro always sets .align 2 before declaring the
function label (since 5c5e1ea3) and always sets the section to
.text (since 278caa6a).

The .align 5 before certain functions, added in fc252eba, were added
before .text and .align were added to the function macro and thus
became useless/unused when the function macro got them.

This restores the original intention, to align the loop entry
points.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-07 19:29:56 +02:00
Martin Storsjö
b7b932f5e3 arm: Remove a leftover define for the pld instruction
This file no longer uses the pld instruction at all, all such uses
have been split into hpeldsp_arm.S.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-07 19:29:42 +02:00
Martin Storsjö
67bb3a4e28 arm: cosmetics: Reindent the h264dsp neon init function
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-07 19:29:31 +02:00
Diego Biurrun
794fcf79a8 Rename CONFIG_FFT_FLOAT ---> FFT_FLOAT
The define does not originate from configure, so it should not
have a name that is CONFIG_-prefixed.
2014-01-06 19:12:48 +01:00
Paul B Mahol
63debaa74c libopusenc: Change default frame duration to 20 ms
20 ms is the default in the libopus encoder, and gives better
quality than 10 ms.

Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-06 18:56:44 +02:00
Anton Khirnov
9cbf2d78f0 pthread_frame: unref decoded frames on failure
This is similar to what the non-threaded code already does.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:25:55 +01:00
Anton Khirnov
a03a642d5c h264: do not use 422 functions for monochrome
Fixes invalid memory access.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:25:36 +01:00
Anton Khirnov
9eef9eb301 h264: check that execute_decode_slices() is not called too many times
Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:25:25 +01:00
Anton Khirnov
bfd26b7ce6 h264: reject mismatching luma/chroma bit depths during sps parsing
There is no point in delaying the check and it avoids bugs with a
half-initialized context.

Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:23:45 +01:00
Anton Khirnov
9a026c7298 h264: rebuild the default ref list if the reference count changes
Fixes possible access to freed memory.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:23:17 +01:00
Anton Khirnov
4736d003fa cavsdec: check ff_get_buffer() return value
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-06 08:22:48 +01:00
Anton Khirnov
50079a6aa9 lavc: do not leak the internal frame if opening the codec fails 2014-01-06 08:21:58 +01:00
Anton Khirnov
8058284ce0 lavc: add 422/444 YUV with alpha to align_dimensions()
Aligns frame dimensions to 16, which fixes potential invalid writes.
2014-01-06 08:20:56 +01:00
Kostya Shishkov
2f97094608 lagarith: do not call simd functions on unaligned lines
They end up overwriting past the line end.

Partially based on a patch by Michael Niedermayer <michaelni@gmx.at>

Bug-Id: vlc/9700
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-01-06 08:19:29 +01:00
Anton Khirnov
f4a8a00805 sgidec: fix buffer size check in expand_rle_row()
Right now it will spuriously fail if the linesize is exactly equal to
the data width.

CC:libav-stable@libav.org
2014-01-06 08:18:45 +01:00
Anton Khirnov
adb199d1bc kgv1dec: replace forcing EMU_EDGE by a copy
The decoder currently sets CODEC_FLAG_EMU_EDGE and relies on
get_buffer2() to always provide buffers with linesize == 2 * width.
This is wrong, since we place no such restriction on get_buffer2()
implementations.

Fix this by decoding into internal buffers and copying them to output
frames. Since this is a very obscure decoder, the performance hit should
not be an issue.
2014-01-06 08:15:36 +01:00
Anton Khirnov
fe80fa53bc 4xm: replace forcing EMU_EDGE by a copy
The decoder currently sets CODEC_FLAG_EMU_EDGE and relies on
get_buffer2() to always provide buffers with linesize == 2 * width.
This is wrong, since we place no such restriction on get_buffer2()
implementations.

Fix this by decoding into internal buffers and copying them to output
frames. Since this is a very obscure decoder, the performance hit should
not be an issue.
2014-01-06 08:14:14 +01:00
Anton Khirnov
fffca3d278 4xm: return a proper error code. 2014-01-06 08:13:50 +01:00
Tim Walker
7840c40445 (e)ac3dec: set AV_FRAME_DATA_MATRIXENCODING side data. 2014-01-05 16:41:56 +01:00
Tim Walker
13345fc1f8 (e)ac3: parse and store the Dolby Surround, Surround EX and Headphone mode flags. 2014-01-05 16:41:56 +01:00
Tim Walker
e92123093d mlpdec: set AV_FRAME_DATA_MATRIXENCODING side data. 2014-01-05 16:41:56 +01:00
Tim Walker
4b7f1a7ced mlp: Parse TrueHD decoder channel modifiers and set the AVMatrixEncoding for each substream. 2014-01-05 16:41:56 +01:00
Tim Walker
30d70e79a6 dcadec: set AV_FRAME_DATA_MATRIXENCODING side data. 2014-01-05 16:41:56 +01:00
Tim Walker
6bfdb2de88 dcadec: set the output channel mode more accurately.
When downmixing 2.1 to 2-channel, if the 2.0 portion is Lt/Rt, sum-difference or dual mono, the actual output will be the same (with the LFE either mixed-in or discarded).

Also, when downmixing an arbitrary layout to 2-channel, if the bitstream contains custom downmix coefficients targeting Lt/Rt, then the output will be Lt/Rt rather than regular Stereo.
2014-01-05 16:41:56 +01:00
Tim Walker
5b4797a21d avframe: add AV_FRAME_DATA_MATRIXENCODING side data type.
Includes a libavcodec utility function to update a frame's side data.
2014-01-05 16:41:56 +01:00
Alex Converse
7f29644108 aac: Fix low delay windowing.
AAC LD uses a low overlap sine window instead of a KBD window.
2014-01-04 14:42:38 -08:00
Alex Converse
b2212dec0f aac: Fix TNS decoding for the 512 sample window family. 2014-01-04 14:42:38 -08:00
Martin Storsjö
3348e3492d arm: Use the matching endfunc macro instead of the assembler directive directly
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-04 13:53:08 +02:00
Martin Storsjö
2ad4ee345a arm: Add a missing endfunc macro call
Signed-off-by: Martin Storsjö <martin@martin.st>
2014-01-04 13:53:02 +02:00
Anton Khirnov
a3a55645f0 mpegvideo: remove disabled bfin asm
It has been disabled as 'broken' over 3 years ago in b716a792
2014-01-03 16:54:24 +01:00
Anton Khirnov
a4d0c6e050 mpegvideo: move dct_unquantize functions up to avoid forward declarations 2014-01-03 16:54:00 +01:00
Anton Khirnov
aec25b1c46 mpegvideo: split the encoding-only parts of frame_start() into a separate function
This introduces some code duplication. However, much of it should go
away once the decoders stop using MpegEncContext.
2014-01-03 16:52:49 +01:00
Anton Khirnov
58312b2472 h264: reset data_partitioning if decoding the slice header for NAL_DPA fails
If it was set before then we can end up trying to decode a slice without
a valid slice header, which can lead to invalid memory access.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:42:02 +01:00
Anton Khirnov
e89aa4bf56 lzw: switch to bytestream2
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:40:43 +01:00
Anton Khirnov
24057c8320 eacmv: check the framerate before setting it.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:39:09 +01:00
Anton Khirnov
5569146d48 adx: check that the offset is not negative
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:38:36 +01:00
Anton Khirnov
a6a2282c25 rv30: fix extradata size check.
It has been checking the number of bits in the offset instead of the
actual offset.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:38:33 +01:00
Anton Khirnov
feded990e3 mpegvideo: set reference/pict_type on generated reference frames
Otherwise the generic code will unref them, which can then result in
last_picture_ptr == current_picture_ptr, which causes deadlocks at least
in rv40.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-01-03 16:36:43 +01:00
Luca Barbato
4d2bb28931 h264: namespace the decode function
Make much easier debugging.
2013-12-27 07:48:13 +01:00
Diego Biurrun
b83d1ee3b4 avutil: Move library version related macros to version.h
This is a more sensible place for these macros.
2013-12-26 19:05:22 +01:00
Mason Carter
61ae993957 vc1: Fix intensity compensation performance regression
Introduced by 28243b0d35

Intensity compensation is always used once it was encountered, because
v->next_use_ic is never set back to zero.

Reset v->next_use_ic, when resetting v->next_luty/uv.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-12-22 18:31:44 +01:00
Guillaume Martres
7398e0516f hevc: move DSP declarations from hevc.h into hevcdsp.h
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-12-22 03:49:11 +01:00
Justin Ruggles
be7c323176 Add a libwebp encoder 2013-12-21 17:01:42 -05:00
Martin Storsjö
d307e408d4 arm: Don't clobber callee saved registers in scalarproduct
q4-q7/d8-d15 are supposed to not be clobbered by the callee.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-20 20:48:30 +02:00
Mickaël Raulet
5c3fa74b94 hevc: support luma bit depth != chroma bit depth for PCM coding units
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-20 19:39:53 +01:00
Guillaume Martres
78d0b7f36e hevc: warn when an unknown profile is used
Bitstreams conforming to the spec should not use profiles not defined
in it.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-20 19:39:38 +01:00
Gildas Cocherel
259cddb137 hevc_ps: fix indentation
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-20 19:39:10 +01:00
Gildas Cocherel
2d18aaa14b hevc: refactor Profile Tier Level
Also store a few PTL flags which were skipped before

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-20 19:38:59 +01:00
Guillaume Martres
67bbaed5c4 hevc: don't check for errors in PTL code
According to the spec, the value of XXX_reserved_zero_44bits should be
ignored, so don't report an error when it's not zero.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-20 19:36:44 +01:00
Gildas Cocherel
321cb8b048 hevc: store profile and level in AVCodecContext
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-20 19:36:24 +01:00
Gildas Cocherel
2a41826bea lavc: add HEVC profiles names
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-20 19:35:27 +01:00
Anton Khirnov
dfc50ac85e x86: mpegvideo: move denoise_dct asm to mpegvideoenc
This function is encoding-only.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-12-20 17:16:11 +01:00
Mason Carter
b254490bda vc1: arm: Add NEON no_rnd chroma MC
Apply David Conrad's old patch to the modern codebase.

http://ffmpeg.org/pipermail/ffmpeg-devel/2009-April/059877.html

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-20 14:53:42 +02:00
Mason Carter
832e190632 vc1: arm: Add NEON assembly
For:

ff_vc1_inv_trans_{8,4}x{8,4}_{dc_,}neon
ff_put_pixels8x8_neon
ff_put_vc1_mspel_mc{0,1,2,3}{0,1,2,3}_neon (except for 00)

Based on ARM assembly code in libavcodec/arm by Rob Clark and Mans
Rullgard.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-20 14:53:39 +02:00
Martin Storsjö
b3189aff8b png_parser: Fix parsing on big endian
Since pc.state is populated by shifting in from the end of the
32 bit word, the content within pc.state is already in native endian
and should not be read with the AV_R{L,B} functions.

This was already done correctly for state64 above.

This fixes the fate-corepng test on big endian.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-18 12:12:19 +02:00
Michael Niedermayer
d8fd183683 vc1: Fix mb_height for field pictures
Tables are always allocated now with sufficient space for either progressive
or interlaced content. The alternative would be to detect a change
and reallocate.

This fixes decoding of a sample.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-17 22:01:45 +02:00
Vittorio Giovara
3d9fc21e59 h264: Refactor decode_frame_packing_arrangement
Directly set the fields when necessary.
2013-12-17 09:34:08 +01:00
Luca Barbato
3a149e23d3 hevc: Refactor decode_nal_sei_frame_packing_arrangement
Directly set the fields when necessary.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2013-12-17 09:34:08 +01:00
Peter Holik
6fd99e78de png: add a standalone parser
Useful for reading png images from a pipe.
2013-12-17 09:34:08 +01:00
Diego Biurrun
79d9884e95 build: Merge pthreads/w32threads OBJS declarations 2013-12-13 16:47:50 +01:00
Martin Storsjö
35686a289f mp3adu: Set the channel layout properly
This fixes decoding, broken since 7e35037.

This is similar to what was done for the normal mp3 decoder in
f4a86bc9.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-12 10:18:25 +02:00
Anton Khirnov
d7b3ee9a3a lavc: deprecate avcodec_get_frame_defaults().
Also bump libavcodec micro and add an APIchanges entry saying that
av_frame_* should now be used instead of the lavc AVFrame functions.
2013-12-11 20:39:55 +01:00
Anton Khirnov
598ce4ab4f h264: call av_frame_unref() instead of avcodec_get_frame_defaults().
This is a temporary workaround to allow deprecating
avcodec_get_frame_defaults(). The proper solution will be using a
properly allocated AVFrame in Picture.
2013-12-11 20:39:55 +01:00
Anton Khirnov
48d17ee6dc api-example: remove an unneeded call to avcodec_get_frame_defaults().
avcodec_decode_audio4() resets the frame itself.
2013-12-11 20:39:55 +01:00
Anton Khirnov
2d1f4288dd mpegvideo: call av_frame_unref() instead of avcodec_get_frame_defaults().
This is a temporary workaround to allow deprecating
avcodec_get_frame_defaults(). The proper solution will be using a
properly allocated AVFrame in Picture.
2013-12-11 20:39:55 +01:00
Anton Khirnov
b06c8bce02 mpegvideo: remove an unneeded call to avcodec_get_frame_defaults().
ff_mpeg_unref_picture() already resets the frame.
2013-12-11 20:39:55 +01:00
Anton Khirnov
95a8a5aca6 lavc: call av_frame_unref() instead of avcodec_get_frame_defaults().
avcodec_get_frame_defaults() will be deprecated.
2013-12-11 20:39:55 +01:00
Anton Khirnov
9431356218 lavc: deprecate avcodec_free_frame()
av_frame_free() should be used instead.
2013-12-11 20:39:54 +01:00
Anton Khirnov
eb891b3114 Replace all uses of avcodec_free_frame with av_frame_free(). 2013-12-11 20:39:54 +01:00
Guillaume Martres
17a10d51b8 hevc: set time_base when possible
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-11 20:39:54 +01:00
Gildas Cocherel
33452aede6 hevc: store the VPS list as an AVBufferRef, just like the others *PS
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-11 20:39:54 +01:00
Michael Niedermayer
b769cf4b44 hevc: do not dereference pointer before NULL check in verify_md5()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-11 20:39:54 +01:00
Reinhard Tartler
2a0fb7286d alsdec: check block length
Fix writing over the end

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Addresses: CVE-2013-0845
2013-12-10 07:21:40 -05:00
Vittorio Giovara
acb77dff6a hevc: parse frame packing arrangement SEI messages and save relevant stereo3d information 2013-12-09 16:02:43 +01:00
Vittorio Giovara
3d1d175367 mpeg12enc: set frame packing information when relevant metadata is found 2013-12-09 16:02:43 +01:00
Vittorio Giovara
bacc2869f3 mpeg12dec: parse frame packing arrangement user_data and save relevant stereo3d information 2013-12-09 16:02:43 +01:00
Vittorio Giovara
09cb75cdeb libx264: set frame packing information when relevant information is found 2013-12-09 16:02:43 +01:00
Vittorio Giovara
5b10ef729f h264: parse frame packing arrangement SEI messages and save relevant stereo3d information 2013-12-09 16:02:43 +01:00
Diego Biurrun
d64341e498 configure: Prefix libc-related variables with "libc_"
Simplifies host/target libc detection splitting.
2013-12-09 11:47:43 +01:00
Alexandra Khirnova
9b8d11a76a avcodec: Use av_reallocp where suitable
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-12-09 12:27:51 +02:00
Anton Khirnov
d4f1188d1a dv: use AVFrame API properly 2013-12-09 09:10:14 +01:00
John Stebbins
c9ca220ef2 ac3dec: make drc_scale exponentially
The a52 spec suggests that "partial compression" should scale the
drc value in this manner.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-12-09 08:54:42 +01:00
Anton Khirnov
37a749012a lavc: rework handling of refcounted_frames=0
Use only proper AVFrame API (no assigning of whole frames, since that
hardcodes sizeof(AVFrame) into lavc).

Make a copy of the side data, so the caller can use av_frame_unref/free
on non-refcounted frames, eliminating the need for
avcodec_get_frame_defaults()/avcodec_free_frame().
2013-12-09 08:54:29 +01:00
Anton Khirnov
a1ee164869 lavc/decode_video(): always unref the frame if there is no output in decode_video
Not just on failure. This is the same thing that is done in the audio
path and should prevent leaks in decoders that allocate a frame, but
then end up not writing into it.
2013-12-09 08:44:34 +01:00
Anton Khirnov
85f947aefb lavc: remove a pointless check in decode_audio4()
av_frame_unref() works fine on unallocated frames.
2013-12-09 08:44:24 +01:00
Anton Khirnov
d4f0f2d1e8 lavc: use buf[0] instead of data[0] as the indicator of an allocated frame
data[0] may be NULL for valid frames with hwaccel pixel formats.
2013-12-09 08:44:11 +01:00
Anton Khirnov
e5419709f5 lavc: remove the extended_data workarounds.
All decoders should now handle it properly.
2013-12-09 08:42:52 +01:00
Anton Khirnov
d351ef47d0 pthread_frame: use the AVFrame API properly.
Remove the extended_data workaround, all decoders should now handle this
properly.
2013-12-09 08:42:25 +01:00
Anton Khirnov
b605b123ef mxpegdec: use the AVFrame API properly. 2013-12-09 08:41:57 +01:00
Anton Khirnov
afa21a12bf p*menc: use the AVFrame API properly. 2013-12-09 08:41:20 +01:00
Anton Khirnov
e2274aa555 mjpegdec: use the AVFrame API properly. 2013-12-09 08:40:29 +01:00
Diego Biurrun
4958f35a2e dsputil: Move apply_window_int16 to ac3dsp
The (optimized) functions are used nowhere else.
2013-12-08 17:57:15 +01:00
Guillaume Martres
9aa053cede libvpx: do not mark VP9 as experimental when using libvpx >= 1.3.0
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-12-08 00:28:27 +01:00
Michael Niedermayer
b6a9719941 dcadec: Decode LFE to avoid adding random data when downmixing with LFE
Signed-off-by: Tim Walker <tdskywalker@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-12-06 23:37:05 +01:00
Justin Ruggles
d085f80fa1 webp: add a special case for a huffman table with only 1 symbol
The vlc reader cannot handle 0-bit huffman codes. For most
situations WebP uses the "simple" huffman coding for this case,
but that will only handle symbols up to 255. For the LZ77 distance
codes, larger symbol values are needed, so it can happen in rare
cases that a normal huffman table is used that only has a single
symbol.
2013-12-05 20:37:06 -05:00
Justin Ruggles
f51e3a1971 webp: do not call av_frame_free() on the user-provided frame
Fixes double-free on error.
2013-12-05 20:36:54 -05:00
Anton Khirnov
b73a8922d8 ljpegenc: split yuv encoding into a separate function 2013-12-05 13:38:07 +01:00
Anton Khirnov
fa4476815d ljpegenc: split bgr encoding into a separate function 2013-12-05 13:37:56 +01:00
Anton Khirnov
daffed3b17 ljpegenc: accept bgr24 instead of bgra
The alpha plane is not encoded.
2013-12-05 13:37:41 +01:00
Anton Khirnov
0cdbc4d393 ljpegenc: rename the encoding function.
The new name is more consistent with the rest of Libav.
2013-12-05 13:37:32 +01:00
Anton Khirnov
72c0b8f724 ljpeg: remove a commented-out line 2013-12-05 13:37:09 +01:00
Anton Khirnov
24abd806ea ljpegenc: deMpegEncContextize
The encoder uses almost none of the mpegvideo infrastructure, only some
fields from MpegEncContext.

The FATE results change because now an all-zero quant matrix is written
into the file. Since it is not used for anything for ljpeg, this should
not be a problem.
2013-12-05 13:35:55 +01:00
Anton Khirnov
86eb2eaac6 mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_dc()
This will allow deMpegEncContextizing the LJPEG encoder.
2013-12-05 13:35:30 +01:00
Anton Khirnov
3360ad9955 mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_trailer()
This will allow deMpegEncContextizing the LJPEG encoder.
2013-12-05 13:35:15 +01:00
Anton Khirnov
058d5f2feb mjpegenc: do not pass MpegEncContext to ff_mjpeg_encode_picture_header()
This will allow deMpegEncContextizing the LJPEG encoder.
2013-12-05 13:34:26 +01:00
Anton Khirnov
6d70639c7d mjpegenc: do not pass MpegEncContext to jpeg_table_header()
Pass the three needed fields from it directly.
This will allow to deMpegEncContextize the LJPEG encoder.
2013-12-05 13:34:13 +01:00
Anton Khirnov
e1eaaec765 mjpegenc: remove commented out never-to-be-finished WIP cruft 2013-12-05 13:34:01 +01:00
Anton Khirnov
ff506c75b7 mjpegenc: do not pass MpegEncContext to put_huffman_table()
It only needs PutBitContext from it, so pass that directly.
2013-12-05 13:33:40 +01:00
Anton Khirnov
a1ba1f20b3 mjpegenc: cosmetics, reformat jpeg_put_comments() 2013-12-05 13:33:29 +01:00
Anton Khirnov
0812f5a40a mjpegenc: write the JFIF header if the sample aspect ratio is set
MpegEncContext.aspect_ratio_info is never set for mjpeg, so this was
never written before.
2013-12-05 13:28:32 +01:00
Anton Khirnov
66499f34b5 mpegvideo: do not set current_picture_ptr in decoders
This code was originally added in
5f1948111a to h263 to set decoded frame
pts to some random numbers (removed in
a1c5cc429d) and then cargo culted to other
decoders.

The code is left in h263dec for now, since some part of the decoder
(apparently OBMC) relies on the specific previous frame to be reused.
2013-12-05 13:28:05 +01:00
Anton Khirnov
ac1fc92ea4 vc1dec: move setting repeat_pict after frame_start() has been called.
This will allow removing the hacks where each decoder sets
current_picture_ptr on its own.
2013-12-05 13:27:24 +01:00
Anton Khirnov
282c6a1a0e mpegvideo: make ff_release_unused_pictures() static
It is only called from one place in mpegvideo.c now. Also remove the
remove_current parameter, which is always 1.
2013-12-05 13:26:50 +01:00
Anton Khirnov
c99307caee mpegvideo: make frame_size_alloc() static.
It is not called from outside of mpegvideo.c anymore.
2013-12-05 13:25:46 +01:00
Anton Khirnov
0b0a7a751d mpegvideo: move encode-only parts of common_end() to encode_end() 2013-12-05 13:25:26 +01:00
Anton Khirnov
d0d111d059 mpegvideo: remove commented out cruft from ff_MPV_frame_end() 2013-12-05 13:25:15 +01:00
Anton Khirnov
381a722562 mpegvideo: split the encoding-only parts of ff_MPV_frame_end() into a separate function 2013-12-05 13:23:55 +01:00
Anton Khirnov
b7254288d2 mpegvideo: do not update last_non_b_pict_type in update_thread_context()
It is used for encoding only.
2013-12-05 13:23:33 +01:00
Anton Khirnov
1f8eb69079 mpegvideo: move encoding-only initialization from common_init() to encode_init() 2013-12-05 13:23:03 +01:00
Anton Khirnov
bedf952bb8 mpegvideo: move setting encoding-only vars from common_defaults() to encode_defaults() 2013-12-05 13:22:55 +01:00
Anton Khirnov
2cab011f0f mpegvideo: don't copy input_picture_number in update_thread_context()
It is encoding-only, frame threading is not used for encoding.
2013-12-05 13:22:46 +01:00
Anton Khirnov
ff7ffe4809 mpeg4videodec: move showed_packed_warning from MpegEncContext to Mpeg4DecContext 2013-12-05 13:22:37 +01:00
Anton Khirnov
f7d228676c mpeg4videodec: move intra_dc_threshold from MpegEncContext to Mpeg4DecContext 2013-12-05 13:22:18 +01:00
Anton Khirnov
a097f0049b mpeg12dec: move first_slice from MpegEncContext to Mpeg1Context 2013-12-05 13:22:03 +01:00
Anton Khirnov
ff300e435e mpegvideo: remove an unused variable 2013-12-05 13:21:57 +01:00
Anton Khirnov
e41ff4210a mpeg4videodec: move use_intra_dc_vlc from MpegEncContext to Mpeg4DecContext 2013-12-05 13:19:22 +01:00
Diego Biurrun
3d7c84747d x86: Initialize mmxext after amd3dnow optimizations
The mmxext optimizations should be at least equally fast if available and
amd3dnow optimizations are being deprecated. Thus the former should
override the latter, not the other way around.
2013-12-04 18:52:48 +01:00
Diego Biurrun
97d19c2fec dv: Split off DV video encoder into its own file 2013-12-02 13:13:09 +01:00
Diego Biurrun
21710ea821 dv: Move DV VLC data tables out of header file 2013-12-02 13:13:09 +01:00
Diego Biurrun
7ffaa19570 dsputil: x86: Move ff_inv_zigzag_direct16 table init to mpegvideo
The table is MMX-specific and used nowhere else.
2013-12-02 04:05:18 +01:00
Tim Walker
7dc827b709 dcadec: Add some logging before returning on error
Based on a patch by Michael Niedermayer.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-11-30 13:01:35 +01:00
Kostya Shishkov
01f6df01b6 go2meeting: disallow tile dimensions that are not multiple of 16
Original decoder seems to always use 176x128 tiles anyway and this helps
avoiding lots of issues with odd tile sizes in fuzzed files.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-29 17:37:59 +01:00
Anton Khirnov
e026ee0446 mpeg4videodec: move sprite_{shift,traj} from MpegEncContext to Mpeg4DecContext 2013-11-29 17:37:16 +01:00
Anton Khirnov
513d849bb6 mpeg4videodec: move num_sprite_warping_points from MpegEncContext to Mpeg4DecContext 2013-11-29 17:36:57 +01:00
Anton Khirnov
9ba3fc3e3d mpeg4videodec: move sprite_brightness_change from MpegEncContext to Mpeg4DecContext 2013-11-29 17:36:43 +01:00
Anton Khirnov
58c120a929 mpeg4videodec: move scalability from MpegEncContext to Mpeg4DecContext 2013-11-29 17:36:28 +01:00
Anton Khirnov
6e81597d5a mpeg4videodec: move enhancement_type from MpegEncContext to Mpeg4DecContext 2013-11-29 17:36:05 +01:00
Anton Khirnov
2992afda83 mpeg4videodec: remove a write-only variable from MpegEncContext 2013-11-29 17:35:57 +01:00
Anton Khirnov
3b1c0f686d mpeg4videodec: move new_pred from MpegEncContext to Mpeg4DecContext 2013-11-29 17:35:13 +01:00
Anton Khirnov
e89247debd mpeg4videodec: replace MpegEncContext.reduced_res_vop with a local variable 2013-11-29 17:34:34 +01:00
Anton Khirnov
8cebc9eaac mpeg4videodec: remove a write-only variable from MpegEncContext 2013-11-29 14:19:48 +01:00
Anton Khirnov
b1aacd5668 mpeg4videodec: move t_frame from MpegEncContext to Mpeg4DecContext 2013-11-29 14:19:48 +01:00
Anton Khirnov
0388907400 mpeg4videodec: move cplx_estimation_* fields from MpegEncContext to Mpeg4DecContext 2013-11-29 14:19:48 +01:00
Anton Khirnov
43af264de8 mpeg4videodec: move mpeg4-specific bug workaround variables from MpegEncContext to Mpeg4DecContext 2013-11-29 14:19:48 +01:00
Anton Khirnov
e2ceb17642 mpeg4videodec: move mpeg4-specific post-frame-decode code from h264dec to mpeg4videodec 2013-11-29 14:19:47 +01:00
Anton Khirnov
b452d5ae86 mpeg4videodec: move mpeg4-specific bug detection from h263 generic code to mpeg4 2013-11-29 14:19:47 +01:00
Anton Khirnov
48e1394095 mpeg4videodec: move MpegEncContext.resync_marker into Mpeg4DecContext. 2013-11-29 14:19:47 +01:00
Anton Khirnov
c2f7417eeb vc1: move MpegEncContext.resync_marker into VC1Context.
The field still remains in MpegEncContext because it is used by the
mpeg4 decoder.
2013-11-29 14:19:47 +01:00
Anton Khirnov
a5a71992ca mpeg4videoenc: don't set MpegEncContext.resync_marker
It is only used in one place immediately after it is set.
2013-11-29 14:19:47 +01:00
Anton Khirnov
ad09f52586 h263dec: remove commented out cruft 2013-11-29 14:19:47 +01:00
Anton Khirnov
bc5abfb19e mpeg4videodec: move MpegEncContext.rvlc to Mpeg4DecContext 2013-11-29 14:19:47 +01:00
Anton Khirnov
9f0617d213 mpeg4videodec: remove write-only sprite variables from MpegEncContext 2013-11-29 14:19:47 +01:00
Anton Khirnov
1a89025793 mpeg4videodec: move MpegEncContext.vol_sprite_usage to Mpeg4DecContext 2013-11-29 14:19:47 +01:00
Anton Khirnov
75bd07f732 mpeg4videoenc: write 0 instead of vol_sprite_usage
That field is never set for encoding.
2013-11-29 14:19:47 +01:00
Anton Khirnov
e62a43f6b1 mpeg4videodec: move MpegEncContext.time_increment_bits to Mpeg4DecContext
The field remains in MpegEncContext for use in the encoder.
2013-11-29 14:19:47 +01:00
Anton Khirnov
ee8af2dd99 mpeg4videodec: move MpegEncContext.shape to Mpeg4DecContext 2013-11-29 14:19:47 +01:00
Anton Khirnov
35e0833d41 mpeg4videodec: add a mpeg4-specific private context. 2013-11-29 14:19:47 +01:00
Tim Walker
3c8507a845 dcadec: add disable_xch private option.
This supplements the deprecated request_channels-based control of XCh decoding.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:53 +01:00
Tim Walker
220494ad0b dcadec: treat all 2-channel modes as Stereo in dca_downmix.
The check for (prim_channels > 2) before calling dca_downmix made these
cases unreachable, but now 2.1 layouts will go through the downmix code.
Having dual mono, Lt/Rt and sum-difference layouts print errors when
regular Stereo doesn't seems pointless.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:53 +01:00
Tim Walker
aaa44d0299 dca: support mixing LFE in dca_downmix.
Embedded downmix coefficients can use this.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:53 +01:00
Tim Walker
149438cfe5 dca: improve default stereo downmix coefficients.
Previous coefficients were producing a non-normalized, incorrect Lt/Rt downmix.

The new coefficients produce a standard Lo/Ro downmix with 3dB attenuation.

This should match the typical default coefficients used by DTS encoders.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:53 +01:00
Tim Walker
44b17d794a dca: extract core substream's embedded downmix coeffcient codes, if present.
As per ETSI TS 102 114 V1.4.1 specification.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:53 +01:00
Tim Walker
27245b4e1b dca: remove embedded downmix coefficient extraction.
It was based on an old, seemingly incorrect specification, so default
coefficients were always used anyway.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 22:02:50 +01:00
Tim Walker
b6d5e6aa10 dca: convert dca_default_coeffs to float.
Easier to read, modify, and avoids relying on an outdated table.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 21:38:22 +01:00
Tim Walker
25609b63d2 dcadec: store the stereo downmix coefficients as float in the DCAContext.
The 7-bit codes previously used are absent from the ETSI 102 114 V1.4.1 spec.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 21:35:22 +01:00
Tim Walker
89de5157b1 dcadec: implement request_channel_layout.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-28 21:10:29 +01:00
Diego Biurrun
cf7860db60 x86: dsputil: Suppress deprecation warnings for XvMC bits
These parts are scheduled for removal on the next version bump.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2013-11-28 16:04:30 +01:00
Michael Niedermayer
d1916d13e2 dsputil/pngdsp: fix signed/unsigned type in end comparison
Fixes out of array accesses and integer overflows.
2013-11-28 15:37:55 +01:00
Anton Khirnov
8733799392 h263dec: sanitize a condition.
Call ff_mpeg4_decode_picture_header() only when the decoder has the
MPEG4 codec id, not based on a vaguely related value of h263_pred.
2013-11-27 22:24:50 +01:00
Anton Khirnov
4d388c0cd0 h264_refs: make sure not to write over the bounds of the default ref list
Fixes invalid writes.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2013-11-27 22:24:40 +01:00
Anton Khirnov
c6080d8900 lavc: remove mp3_header_(de)compress bitstream filters
They mangle the mp3 header in a non-standard way to save a few bytes.
People who care about space so much should just use a more efficient
codec.
2013-11-26 09:27:50 +01:00
John Stebbins
1eaac1d6f7 mpeg12dec: Extract CC user data into frame side data
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-11-26 08:37:22 +01:00