Commit Graph

18847 Commits

Author SHA1 Message Date
Christophe Gisquet ad507d7907 x86: dcadsp: implement SSE lfe_dir
Results for Arrandale/Windows:
32: 1670 -> 316
64:  728 -> 298

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-28 13:00:47 +01:00
Christophe Gisquet 87ec849fe9 dcadec: remove scaling in lfe_interpolation_fir
The scaling factor is constant so it is faster to scale the
FIR coefficients in the tables during compilation.

Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-28 13:00:47 +01:00
Diego Biurrun a55546f48d proresenc: Reuse proper dsputil infrastructure for FDCT 2014-02-28 11:19:47 +01:00
Diego Biurrun 92e598a57a prores: Drop DSP infrastructure for prores encoder bits
None of the encoder bits are arch-optimized.
2014-02-28 11:17:25 +01:00
Diego Biurrun d6acefe058 proresenc: Drop unnecessary DCT permutation bits
No permutation is necessary for the FDCT.
2014-02-28 11:00:24 +01:00
Diego Biurrun b23650491f prores: Use consistent names for DSP arch initialization functions 2014-02-28 10:34:55 +01:00
Diego Biurrun f2408ec9d7 Give IDCT matrix transpose macro a more descriptive name
This also avoids a macro name clash and related warning on ARM.
2014-02-27 13:38:00 -08:00
Diego Biurrun a63ac1106d build: Do not redundantly specifiy H.263-related object files for MSMPEG4v*
These are already covered through dependencies specified in configure.
2014-02-26 19:44:55 +01:00
Diego Biurrun 4ec336484d parser: cosmetics: Drop some unnecessary parentheses 2014-02-25 13:40:47 +01:00
Luca Barbato a1c699659d parser: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-02-25 12:28:33 +01:00
Diego Biurrun ed61f3ca8a parser: Remove commented-out cruft 2014-02-25 11:59:05 +01:00
Derek Buitenhuis 8aca00cc2b libx265: Properly handled dynamic linking with MSVC
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:07:33 -05:00
Derek Buitenhuis 0f7fa48cf1 libx265: Support SAR
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:07:33 -05:00
Derek Buitenhuis 2142b2efcd libx265: Support 4:4:4
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 11:06:59 -05:00
Derek Buitenhuis d00a504b24 libx265: Update API usage
Framerate is now a sane rational instead of an integer, and
inputDepth is changed to what it actually is.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-24 15:50:04 +00:00
Anton Khirnov 30517a9f05 Use av_frame_copy() to simplify code where appropriate. 2014-02-24 07:25:07 +01:00
Anton Khirnov 8feac29cc4 lavc: use AVFrame API properly in ff_reget_buffer() 2014-02-24 07:25:07 +01:00
Luca Barbato 8eeacf31c5 hevc: Do not left shift a negative value in hevc_loop_filter_chroma 2014-02-23 14:34:41 +01:00
Luca Barbato ff486c0f7f hevc: Do not right shift a negative value in get_pcm 2014-02-23 14:34:40 +01:00
Luca Barbato 50c988aa6d hevc: Drop unnecessary shifts in deblocking_filter_CTB
beta_offset is pre-multiplied by 2.
2014-02-23 14:34:34 +01:00
Luca Barbato d922c5a5fb h264: Fix a typo from the previous commit
f777504f64 changed a - in +

CC: libav-stable@libav.org
2014-02-22 12:26:32 +01:00
Diego Biurrun dc9e05e279 libvorbis: Give consistent names to all functions, structs, and defines 2014-02-21 11:08:09 +01:00
Vittorio Giovara f777504f64 h264: Lower bound check for slice offsets
And use the value from the specification.

Sample-Id: 00000451-google
Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-02-20 18:58:38 +01:00
Janne Grunau 9c029f67ca aarch64: use EXTERN_ASM consistently for exported symbols
Based on e3fec3f095 for arm.
2014-02-20 15:24:35 +01:00
Christophe Gisquet ef010f08ae dca: replace some memcpy by AV_COPY128
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-20 14:16:43 +01:00
Janne Grunau 982b596ea6 h264: avoid undefined behavior in chroma motion compensation
Makes fate-h264 pass under valgrind --undef-value-errors=yes with
-cpuflags none. {avg,put}_h264_chroma_mc8_8 approximately 5% faster,
{avg,put}_h264_chroma_mc4_8 2% faster both on x86 and arm.
2014-02-20 14:02:06 +01:00
Diego Biurrun 4bcca3611d mpeg4video_parser: Drop pointless av_-prefix from static function 2014-02-20 04:16:15 -08:00
Diego Biurrun 984e339866 avcodec: Consistently name encoder init functions foo_encode_init 2014-02-20 04:16:15 -08:00
Diego Biurrun 017a06a9ee x86: dsputil: Use correct file name as multiple inclusion guard 2014-02-20 04:16:15 -08:00
Diego Biurrun ba42c85247 bit_depth_template: Use file name as multiple inclusion guard 2014-02-20 04:16:15 -08:00
Diego Biurrun 61e7c7f27b svq3: Adjust #endif comment 2014-02-20 04:16:15 -08:00
Luca Barbato 521726ff57 hevc: Always consider VLC NALU type mismatch fatal
Sample-Id: 00001667-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-02-19 16:59:40 +01:00
Luca Barbato 175e506332 hevc: Mention the missing SPS in the error message 2014-02-19 16:59:40 +01:00
Diego Biurrun b23bc95920 x86: dca: Add missing multiple inclusion guards 2014-02-19 10:19:15 +01:00
Luca Barbato fea6db064b h264: informative error reporting in decode_slice_header()
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-02-18 23:47:55 +01:00
Luca Barbato 96f9fbe109 h264: fix slice_type value reported in decode_slice_header()
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-02-18 23:47:32 +01:00
Diego Biurrun 4d7ab5cfeb doxygen: Add a number of missing function parameter descriptions 2014-02-17 15:36:09 +01:00
Vittorio Giovara 614b9e4db8 h264: use avpriv_request_sample for chroma_format_idc 2014-02-16 23:51:44 +01:00
Diego Biurrun b339182eba Move all example programs to doc/examples
Also drop support for building examples in library directories.
2014-02-16 21:37:21 +01:00
Maxim Poliakovski 77fbc03265 g2meet: validate bpp and bitmasks in the display info
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2014-02-16 16:32:53 +01:00
Tim Walker 9cd4bc4176 ac3dec: set AV_FRAME_DATA_DOWNMIX_INFO side data. 2014-02-15 22:25:00 +01:00
Tim Walker 9c0e4b3395 ac3: update AC3PreferredStereoDownmixMode.
'11b' is reserved in the A/52 specification,
but newer encoders use it to indicate a Dolby
Pro Logic II compatible Lt/Rt downmix.
2014-02-15 22:24:48 +01:00
Vittorio Giovara dc971acf4a h264_parser: use enum values in h264_find_frame_end() 2014-02-15 18:29:49 +01:00
Janne Grunau 98fdfa9970 ppc: reduce overreads when loading 8 pixels in altivec dsp functions
Altivec can only load naturally aligned vectors. To handle possibly
unaligned data a second vector is loaded from an offset of the original
location and the data is recovered through a vector permutation.
Overreads are minimal if the offset for second load points to the last
element of data. This is 7 for loading eight 8-bit pixels and overreads
are reduced from 16 bytes to 8 bytes if the pixels are 64-bit aligned.
For unaligned pixels the overread is reduced from 23 bytes to 15 bytes
in the worst case.
2014-02-14 18:34:04 +01:00
Jan Ekström 3fbad00714 utvideoenc: Enable support for multiple slices and use them
The official Ut Video decoder only threads with slices, thus until
now any files encoded by the libavcodec encoder have only been
decodable with a single thread. The default slice count is now
set to subsampled_height / 120.

Also sets slices to 1 for the Ut Video encoder tests to keep them
green.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-14 15:09:39 +00:00
Derek Buitenhuis 4127e6aeb6 libx265: Remove redundant default param call
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-14 14:27:45 +00:00
Derek Buitenhuis 41836c4e30 libx265: Fix use of uninitialized input picture
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-14 14:27:45 +00:00
Vittorio Giovara 066ad24984 h264_sei: reorder headers
Also drop unused assert.h.
2014-02-14 05:10:58 +01:00
Vittorio Giovara 304e916a92 h264_sei: name buffering period type consistently 2014-02-14 05:08:47 +01:00
Vittorio Giovara 15210354cf h264: drop outdated comments 2014-02-14 05:08:37 +01:00
Vittorio Giovara 3a05767028 h264: store current_sps_id inside the current sps
In preparation for MVC support.
2014-02-14 05:05:46 +01:00
Vittorio Giovara 73e8fab31d h264: print values in case of error
Also make error style consistent and drop redundant information.
2014-02-14 05:05:35 +01:00
Luca Barbato f8c507f44b h264: Refactor ff_h264_decode_ref_pic_list_reordering
In preparation for MVC support.
2014-02-13 23:34:50 +01:00
Janne Grunau 73eca738ac mpeg12dec: do not add stereo3D side data to a non-existing frame
User data is usually coded before slice data. That means the frame
the user data belongs to is not available while parsing the user data.
The stereo3D side data has to use the same indirection over the private
context as pan scan information and A53 captions.

Bug-Id:632
2014-02-13 13:03:01 +01:00
Janne Grunau f795a8a8bf h264: make context_count unsigned
Removes the bogus but scary looking warning 'libavcodec/h264.c:4529:49:
warning: array subscript is below array bounds [-Warray-bounds]'.
2014-02-12 15:48:03 +01:00
Derek Buitenhuis 50ea93158d Add libx265 encoder
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-12 13:13:17 +00:00
John Stebbins 462d5e8e6c aacdec: set AVFrame sample_rate
AVFrame.sample_rate is set in ff_get_buffer, but aacdec calls
ff_get_buffer before the samplerate is known. So it needs to be
set again before returning the frame.
2014-02-12 12:52:28 +01:00
John Stebbins 52771346dc lavc: set AVFrame pkt_pts and reordered_opaque in reget_buffer
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2014-02-11 14:25:01 +01:00
Kostya Shishkov 6477449243 g2meet: make JPEG tile decoder operate on 8x8 block mask
This is needed for upcoming Go2Meeting (G2M2/G2M3) decoder.
2014-02-11 12:46:27 +01:00
Maxim Poliakovski d6d7851801 g2meet: factor out seeking to the chunk end
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2014-02-11 12:46:11 +01:00
Anton Khirnov 77bb0004bb rpza: limit the number of blocks to the total remaining blocks in the frame
Fixes invalid writes.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-02-10 15:22:28 +01:00
Anton Khirnov a46dc49744 rpza: move some variables to the blocks where they are used 2014-02-10 15:22:01 +01:00
Anton Khirnov c7769df178 rpza: use fixed-width int types 2014-02-10 15:21:35 +01:00
Anton Khirnov e1218ce914 rpza: switch to bytestream2 2014-02-10 15:18:21 +01:00
Luca Barbato 246d3bf0ec hevc: Conceal zero td
It was done only in check_mvset(), while mv_scale() is called also by
dist_scale().

Sample-Id: 00001579-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2014-02-09 19:53:43 +01:00
Kostya Shishkov e95018b694 dnxhd: Support DNx444
Bug-Id: 99
Bug-Id: videolan/9620
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2014-02-09 19:53:35 +01:00
Ronald S. Bultje 2f6eec65ac vp8: fix PPC assembly to work if src_stride != dst_stride
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-09 18:50:53 +01:00
Janne Grunau 6a8475dc4f asvenc: free avctx->coded_frame on codec close 2014-02-09 18:50:53 +01:00
Martin Storsjö d6eac2f1bc arm: Remove a stray .fpu directive
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-02-09 18:36:16 +01:00
Alexandra Khirnova 28e508a946 dnxhddec: return proper error code
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2014-02-09 18:36:16 +01:00
Maxim Poliakovski bc3f03567a g2meet: rename FRAME_INFO to more appropriate DISPLAY_INFO
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2014-02-09 16:13:23 +01:00
Tim Walker c1e7de8f62 mlp_parser: fix request_channel_layout behavior.
When request_channel_layout is 0,
all substreams should be decoded.

Thanks to Michael Niedermayer for spotting.

Also fix a mismatch between the parser and
decoder when request_channel_layout is a
subset of Stereo.
2014-02-08 20:10:51 +01:00
Michael Niedermayer f90a4bfc43 mlpdec: fix request_channel_layout behavior.
When request_channel_layout is 0,
all substreams should be decoded.

Signed-off-by: Tim Walker <tdskywalker@gmail.com>
2014-02-08 20:10:35 +01:00
Kostya Shishkov cde7df25ef Mirillis FIC video decoder
Does not contain cursor rendering yet.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2014-02-08 15:04:13 +00:00
Tim Walker c0c45188e5 mlp: improve request_channel_layout behavior.
Don't decode further substreams if request_channel_layout
is a subset of the current substream's channel_layout.

Before, we would only discard further substreams if
request_channel_layout matched the substream's
channel_layout extactly, thus decoding additional
channels which the caller would probably end up downmixing.
2014-02-08 13:39:37 +01:00
Janne Grunau 5c1c6e8226 dca: include dcadsp.h in {arm,x86}/dca.h for checkheaders 2014-02-08 13:38:36 +01:00
Vittorio Giovara b141c7b37e h264: give numbers to nalus
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
2014-02-08 13:38:31 +01:00
Janne Grunau 0cffd6fff5 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.
2014-02-08 12:10:56 +01:00
Christophe Gisquet 5fdbfcb5b7 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>
2014-02-07 22:54:18 +01:00
Christophe Gisquet 5b59a9fc61 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>
2014-02-07 22:52:40 +01:00
Christophe Gisquet 2bd44cb705 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>
2014-02-07 22:51:59 +01:00
Martin Storsjö 5bcbb516f2 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>
2014-02-07 15:13:58 +02:00
Ronald S. Bultje 5351964a2b 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>
2014-02-06 22:45:29 +01:00
Martin Storsjö 49ec551595 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>
2014-02-06 09:32:26 +02:00
Vittorio Giovara a91d3658d9 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>
2014-02-04 22:29:53 +01:00
Anton Khirnov 4c3e1956ee 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
2014-02-04 22:00:27 +01:00
Anton Khirnov 2240e2078d truemotion1: check the header size
Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-02-04 22:00:13 +01:00
Anton Khirnov 1713eec29a shorten: pad the internal bitstream buffer
Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-02-04 21:59:57 +01:00
Anton Khirnov 5430839144 eacmv: clear references on frame dimensions change
Fixes invalid reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
2014-02-04 21:59:14 +01:00
Diego Biurrun 190d4a447b avcodec: Suppress deprecation warnings from avcodec_alloc_frame()
The function is itself obsolete and slated for removal.
2014-02-04 13:46:20 +01:00
Vittorio Giovara d509ae5be0 jvdec: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2014-02-04 12:35:38 +01:00
Anton Khirnov 1f097d168d 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
2014-02-04 11:26:17 +01:00
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