Commit Graph

12533 Commits

Author SHA1 Message Date
Reimar Döffinger
b1c32fb5e5 Use "d" suffix for general-purpose registers used with movd.
This increases compatibilty with nasm and is also more consistent,
e.g. with h264_intrapred.asm and h264_chromamc.asm that already
do it that way.

Originally committed as revision 25042 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-05 10:10:16 +00:00
Stefano Sabatini
7160bb716b Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
symbols, and move them from libavcodec/avcodec.h to libavutil/cpu.h.

Originally committed as revision 25040 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-04 09:59:08 +00:00
Martin Storsjö
dab95c0584 Fix the dependencies of the RTP muxer
This fixes building with --disable-everything --enable-muxer=rtp, closing
issue 2159.

Originally committed as revision 25036 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-03 21:13:01 +00:00
Ronald S. Bultje
2c166c3af1 Port latest x264 deblock asm (before they moved to using NV12 as internal
format), LGPL'ed with permission from Jason and Loren. This includes mmx2
code, so remove inline asm from h264dsp_mmx.c accordingly.

Originally committed as revision 25031 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-03 16:52:46 +00:00
Eli Friedman
a10a9f5cd0 Fix typo in r25019.
Patch by Eli Friedman <eli.friedman at gmail dot com>.

Originally committed as revision 25022 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-01 23:19:36 +00:00
Ronald S. Bultje
615da9b1d9 Unscrew breakage after my last commit because of symbol prefixes.
Originally committed as revision 25020 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-01 21:10:19 +00:00
Ronald S. Bultje
a33a2562c1 Rename h264_weight_sse2.asm to h264_weight.asm; add 16x8/8x16/8x4 non-square
biweight code to sse2/ssse3; add sse2 weight code; and use that same code to
create mmx2 functions also, so that the inline asm in h264dsp_mmx.c can be
removed. OK'ed by Jason on IRC.

Originally committed as revision 25019 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-01 20:56:16 +00:00
Ronald S. Bultje
14bc1f2485 Split h264dsp_mmx.c (which was #included in dsputil_mmx.c) in h264_qpel_mmx.c,
still #included in dsputil_mmx.c and is part of DSPContext, and h264dsp_mmx.c,
which represents H264DSPContext and is now compiled on its own.

Originally committed as revision 25018 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-01 20:48:59 +00:00
Aurelien Jacobs
eda7c983c1 add FF_API_PALETTE_CONTROL define to drop usage of AVPaletteControl
and delay this transition to v54 as it is currently not functional

Originally committed as revision 25016 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-01 10:26:28 +00:00
Diego Biurrun
625bac784b Use quotes instead of angle brackets for local #includes.
Originally committed as revision 25015 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-01 02:12:03 +00:00
Ronald S. Bultje
5929b3a651 Fix vertical align.
Originally committed as revision 25009 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-31 12:32:24 +00:00
Tobias Bindhammer
d1cacdb8dd Checking return values of av_malloc(z) and report an error in case.
Originally committed as revision 25003 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-31 07:14:47 +00:00
Alex Converse
99d7a3e862 aacenc: Remove an unused variable from adjust_frame_information().
Originally committed as revision 25002 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-31 00:33:56 +00:00
Alex Converse
1297f58132 aacenc: Don't set s->cur_channel before apply_window_and_mdct().
In general s->cur_channel should be phased out.

Originally committed as revision 25001 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-31 00:31:17 +00:00
Alex Converse
8e4c11e90a aacenc: Write tag.elem_id early.
Originally committed as revision 25000 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-30 23:52:03 +00:00
Alex Converse
0e107f7890 psymodel: Const correct FFPsyWindowInfo.
Originally committed as revision 24999 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-30 23:48:35 +00:00
Alex Converse
76dfe4ebc5 aacenc: Only apply M/S if common_window is set.
Originally committed as revision 24998 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-30 23:43:03 +00:00
David Conrad
c740f737e9 vorbisdec: Use int instead of uint16_fast_t for index variables
uint16_fast_t is unsigned int (or long) on Linux, which when compared
with int results in an unsigned compare.

Originally committed as revision 24994 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-30 22:34:09 +00:00
Ronald S. Bultje
79ce0f002e Fix compilation failure if yasm is disabled (missing vp3 symbols).
Originally committed as revision 24992 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-30 20:30:40 +00:00
Ronald S. Bultje
de1c253bab Split intra prediction initialization (i.e. assigning of function pointers)
into its own file, it doesn't belong in h264dsp_mmx.c (much less so in
dsputil_mmx.c).

Originally committed as revision 24990 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-30 16:34:13 +00:00
Ronald S. Bultje
d0eb5a1174 Move H264 chroma MC from inline asm to yasm. This fixes VP3/5/6 and VC-1
fate failures on Win64.

Originally committed as revision 24989 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-30 16:31:04 +00:00
Ronald S. Bultje
e9f5f020c6 Move VP3 IDCT functions from inline ASM to YASM. This fixes part of the VP3/5/6
issues on Win64.

Originally committed as revision 24988 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-30 16:25:46 +00:00
Ronald S. Bultje
7e7c4b6008 Put ff_ prefix on non-static {put_signed,put,add}_pixels_clamped_mmx()
functions.

Originally committed as revision 24987 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-30 16:22:27 +00:00
Vitor Sessak
ef4a93426a Include stdint.h instead of inttypes.h, it is enough for what this file need.
Originally committed as revision 24966 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-29 15:46:38 +00:00
Vitor Sessak
774b20ca72 Hopefully fix the fate-ws_snd breakage on PPC
Originally committed as revision 24959 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-28 21:17:49 +00:00
Loren Merritt
19d929f9a3 cosmetics in imdct_sse
Originally committed as revision 24958 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-28 21:03:13 +00:00
Aurelien Jacobs
601090b5c0 cosmetic
Originally committed as revision 24955 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-28 14:07:16 +00:00
Ronald S. Bultje
4eca52ed19 Fix typos when converting inline asm to yasm, fixes MMX-only fate-ea-vp61.
Originally committed as revision 24948 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-26 14:33:39 +00:00
Tobias Bindhammer
3156df450f Clarify code/avoid possible bugs by using precalculated values that are used for extradata as well
Originally committed as revision 24941 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-26 10:03:06 +00:00
Tobias Bindhammer
6cd94998a4 enable a flexible lifetime
Originally committed as revision 24940 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-26 10:03:03 +00:00
Tobias Bindhammer
99d8166daf Setting proper values in extradata for future use in muxer
Originally committed as revision 24939 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-26 10:02:59 +00:00
Martin Storsjö
e0ae6c17fe Flush the PutBitsContext at the end of each block when encoding ADPCM IMA QT
Originally committed as revision 24938 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-26 07:39:34 +00:00
S.N. Hemanth Meenakshisundaram
5da19b53c6 Implement avcodec_get_channel_layout().
Patch by S.N. Hemanth Meenakshisundaram smeenaks:ucsd+edu.

Originally committed as revision 24936 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-26 00:38:25 +00:00
Ronald S. Bultje
6697bc33e2 Revert r24931, it broke Win32 and some BSD compiles (yay fate).
Originally committed as revision 24934 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-25 20:36:35 +00:00
Måns Rullgård
3d1b1caa6b Remove duplicate definitions of fullpel MC functions
This removes duplicated definitions of 8x8 and 16x16 fullpel MC
functions with various names reducing dsputil.o by 8k on x86_64.

Originally committed as revision 24933 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-25 20:14:21 +00:00
Måns Rullgård
694c5a2850 sp5x: remove broken code under #if 0
Originally committed as revision 24932 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-25 20:14:17 +00:00
Ronald S. Bultje
72f642400b Mark xmm6 and xmm7 as clobbered in ff_vp3_idct_sse2(), which is contributing
to the VP6 fate failures on Win64.

Originally committed as revision 24931 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-25 19:57:05 +00:00
Måns Rullgård
69dad87c48 VP6: fix vp6_filter_diag4_mmx/sse on 64-bit
The stride can be negative and must be sign extended before being
used in pointer arithmetic.

Originally committed as revision 24926 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-25 15:41:11 +00:00
Måns Rullgård
94f8b2d799 ARM: update struct offsets
Originally committed as revision 24923 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-25 14:45:17 +00:00
Ronald S. Bultje
89fa3504ed Move vp6_filter_diag4() x86 SIMD code from inline ASM to YASM. This should
help in fixing the Win64 fate failures.

Originally committed as revision 24922 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-25 13:44:16 +00:00
Ronald S. Bultje
3a0885146c Move vp6_filter_diag4() from DSPContext to VP56DSPContext.
Originally committed as revision 24921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-25 13:42:28 +00:00
Tobias Bindhammer
d09c0a1666 cleanup a bit in a64multi_encode_frame()
Originally committed as revision 24914 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-25 11:47:50 +00:00
Tobias Bindhammer
9f63810491 added/extended some comments in a64multi_encode_frame()
Originally committed as revision 24913 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-25 11:47:47 +00:00
Måns Rullgård
c0ec9918b0 Remove global mm_flags variable
Originally committed as revision 24909 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-24 17:47:05 +00:00
Ronald S. Bultje
3611c45ab7 Mark xmm registers as clobbered in simple loopfilter. Should fix the last
two VP8-related fate failures on Win64.

Originally committed as revision 24908 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-24 16:52:27 +00:00
Alex Converse
4c399dc82b Fix undefined expressions that use multiple calls to get_bits().
Because the order of evaluation of subexpressions is undefined, two
get_bits() calls may not be part of the same expression.

See also r24902.

Originally committed as revision 24906 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-24 16:10:25 +00:00
Måns Rullgård
b3c1652b82 msmpeg4v1: fix undefined behaviour in msmpeg4_decode_picture_header()
Because the order of evaluation of subexpressions is undefined, two
get_bits() calls may not be part of the same expression.  In this
specific case, using get_bits_long() is simpler.

This fixes msmpeg4v1 decoding with armcc.

Originally committed as revision 24902 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-24 15:40:57 +00:00
Tobias Bindhammer
e2f402f160 added interlacing option and compression option for colorram (lut)
Originally committed as revision 24901 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-24 15:21:27 +00:00
Tobias Bindhammer
bb07ab7cf2 fixed some return values and deprecated CODEC_TYPE_VIDEO.
dithering (faster) along a linear gradient now.

Originally committed as revision 24898 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-24 14:02:31 +00:00
Nathan Caldwell
62147469da acenc: LAME-inspired window decision
This performs quite a bit better than the current 3GPP-inspired window decision
on all the samples I have tested. On the castanets.wav sample it performs very
similar to iTunes window selection, and seems to perform better than Nero.
On fatboy.wav, it seems to perform at least as good as iTunes, if not better.
Nero performs horribly on this sample.

Patch by: Nathan Caldwell <saintdev@gmail.com>

Originally committed as revision 24892 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-23 20:00:03 +00:00
Alex Converse
c36b2c010e Revert unintended changes to fft.h from r24890.
Originally committed as revision 24891 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-23 19:35:58 +00:00
Nathan Caldwell
af00dddeca aacenc: Rename Psy3gpp* structs to AacPsy*
This allows cleaner implementation of other psymodels using the existing
structs. It also will make it easier to interchange individual parts of
the psymodel to create hybrid models.

Patch by: Nathan Caldwell <saintdev@gmail.com>

Originally committed as revision 24890 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-23 19:27:24 +00:00
Alex Converse
cb4f12466b imdct/x86: Use "s->mdct_size" instead of "1 << s->mdct_bits".
It generates smaller cleaner code.

Originally committed as revision 24887 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-23 15:51:09 +00:00
Tobias Bindhammer
e4d2ab5298 removed an unnecessary blank line
Originally committed as revision 24882 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-23 13:19:48 +00:00
Tobias Bindhammer
b7cf4e4f55 enabling codec and muxer by registering it in allcodec.c and allformat.c and adding files to the build-system
Originally committed as revision 24878 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-23 11:52:34 +00:00
Tobias Bindhammer
40c5ee9903 added codec-ids for the a64 codec
Originally committed as revision 24877 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-23 11:51:04 +00:00
Tobias Bindhammer
7bf7833fb7 Initial version of the a64 (multicolor charset) codec
Originally committed as revision 24873 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-23 11:46:32 +00:00
Ronald S. Bultje
684d608bde Fix segfaults in VP8 SIMD code on Win64 (and FATE/win64 failures).
Originally committed as revision 24871 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-23 02:41:22 +00:00
Alex Converse
78b5c97d3e Convert ff_imdct_half_sse() to yasm.
This is to avoid split asm sections that attempt to preserve some
registers between sections.

Originally committed as revision 24869 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-22 14:39:58 +00:00
Reimar Döffinger
2a86d4b905 The 24-bit ydt also should not depend on endianness,
since all of it ends up in a single 32-bit pixel.
This seems likely to be wrong though, since it is different
from the 15 and 16 bit modes and might explain the half-width
issue for 24 bit truemotion.

Originally committed as revision 24864 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-21 19:50:36 +00:00
Reimar Döffinger
47af623967 Since the 24 bit format is decoded to endian-dependant
BGR32 and not BGR24, do not swap red and blue on big-endian
for this format as well.

Originally committed as revision 24863 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-21 19:40:38 +00:00
Reimar Döffinger
751c5093c6 Do not swap red and blue when decoding truemotion
on big-endian.

Originally committed as revision 24862 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-21 19:37:33 +00:00
Stefano Sabatini
c901f6ab6f Cosmetics: remove useless ().
Originally committed as revision 24860 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-21 15:18:54 +00:00
Reimar Döffinger
a29b1700ee Export the presentation video dimensions as avctx->width/avctx->height.
Originally committed as revision 24858 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-21 11:52:03 +00:00
Måns Rullgård
375fb9f17a dv: fix alignment of scratch buffer
Originally committed as revision 24854 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-20 19:49:47 +00:00
Laurent Aimar
8bdf11815c Fixed mpeg12 top field first flag value with field picture encoding.
The relevent extract of the iso 13818-2 about the value of the syntaxical
element top_field_first of the Picture Coding Extension is:

"top_field_first -- The meaning of this element depends upon picture_structure,
progressive_sequence and repeat_first_field.
[...]
In a field picture top_field_first shall have the value '0', and the only field
output by the decoding process is the decoded field picture."

Originally committed as revision 24853 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-20 18:28:42 +00:00
Måns Rullgård
dd5f3238c1 imc: fix undefined float to int conversion
Conversion of an out of range float to int is undefined.  Clipping to
the final range first avoids such problems.  This fixes decoding on
MIPS, which handles these conversions differently from many other CPUs.

Originally committed as revision 24838 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-19 16:51:26 +00:00
Måns Rullgård
ead7ef8251 fft-test: format error output more readably
Originally committed as revision 24799 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-16 20:34:06 +00:00
Jason Garrett-Glaser
2b476e02e1 Remove some stray +s in VP8
Originally committed as revision 24791 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-13 02:02:07 +00:00
Stefano Sabatini
81c1ecabab Deprecate ff_get_plane_bytewidth() in favor of
av_get_image_linesize().

Originally committed as revision 24787 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-12 15:06:04 +00:00
Stefano Sabatini
7906e2b974 Implement av_get_image_linesize() and use it in
ff_get_plane_bytewidth().

The new implementation is more generic, more compact and more correct.

Originally committed as revision 24786 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-12 15:05:58 +00:00
Jason Garrett-Glaser
05c04cdf54 VP5/6/8: ~7% faster arithmetic decoding
Grab from the bitstream in 16-bit chunks instead of 8-bit chunks.
TODO: grab in 32-bit chunks on 64-bit systems.

Originally committed as revision 24783 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-12 01:11:32 +00:00
S.N. Hemanth Meenakshisundaram
9f08d80363 Add av_picture_data_copy() and reimplement av_picture_copy() as a
wrapper of it.

The new function is more generic, and does not depend on the
definition of the AVPicture struct.

Patch by S.N. Hemanth Meenakshisundaram s + "meenakshisundaram".substr(0, 7) + "@ucsd.edu".

Originally committed as revision 24768 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 14:18:52 +00:00
Pascal Massimino
aa93c52c21 remove b4_stride/mb_stride.
correct mb_xy to use mb_width.
tighten allocations.
reduce the amount of zeroing.

Originally committed as revision 24760 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 08:27:38 +00:00
Pascal Massimino
ccf13f9e20 fix over-allocation. confused b4_stride with mb_width.
Originally committed as revision 24758 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-11 05:24:19 +00:00
Ronald S. Bultje
af0a61cc40 Fix buffer overrun if idx is negative (it can be down to -23>>4), by prepending
two padding zeroes before it. Should fix fate failures on openBSD and crashes
on MacOSX (that I cannot reproduce).

Originally committed as revision 24750 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-09 13:54:59 +00:00
Vitor Sessak
46a76dec93 Fix handling of truncated files. Should fix random FATE breakages.
Originally committed as revision 24745 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-09 07:17:01 +00:00
Jason Garrett-Glaser
4a384de5b8 Split h264dsp and h264pred in configure.
Many H.264 derivatives, like RV40 and VP8, use the H.264 prediction functions
but not the weight/loopfilter functions.
This should reduce the size of builds with one of these derivatives but without
H.264 decoding itself.

Originally committed as revision 24741 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 23:10:25 +00:00
Reinhard Tartler
2901cc9a95 Fix spelling in comment(s)
Originally committed as revision 24737 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 14:11:43 +00:00
Jason Garrett-Glaser
b70c95e05a H.264: 8% faster CAVLC zero-run decoding
Originally committed as revision 24736 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 12:30:44 +00:00
Stefano Sabatini
a63dbf3970 Fix the compilation of some libavcodec/lib* files which were not
including libavcore/imgutils.h, which was required since the recent
avcodec_check_dimensions() -> av_check_image_size() transition.

Originally committed as revision 24734 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-07 01:36:35 +00:00
Alex Converse
18b95d85f2 libvpxdec: Fix "error: implicit declaration of function ‘av_check_image_size’".
av_check_image_size() is declared in libavcore/imgutils.h.

Originally committed as revision 24717 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 18:57:14 +00:00
Alex Converse
51aaf51143 vorbis_dec: Change partition_class[] to uint8_t.
When sizeof(uint_fast8_t) >= sizeof(int) there are unintended size effects.

Originally committed as revision 24716 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 16:10:42 +00:00
Diego Biurrun
3447f12d66 Add a CONFIG_ variable for generic Huffman routines.
Originally committed as revision 24715 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 10:29:14 +00:00
Stefano Sabatini
6ce9b4310c Remove use of the deprecated function avcodec_check_dimensions(), use
av_check_image_size() instead.

Originally committed as revision 24711 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 09:37:04 +00:00
Stefano Sabatini
bf176f58b7 Deprecate avcodec_check_dimensions() in favor of the new function
av_check_image_size() declared in libavcore/imgutils.h.

Originally committed as revision 24709 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 09:36:45 +00:00
Måns Rullgård
85fbad4555 fft-test: free buffers before exiting
Originally committed as revision 24708 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-06 07:09:12 +00:00
Jason Garrett-Glaser
7e13022a4d VP8: fix bug in prefetch
Motion vectors in VP8 are qpel, not fullpel.

Originally committed as revision 24707 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-05 20:03:54 +00:00
Måns Rullgård
fa2d5d54b9 ARM: NEON H264 8x8 IDCT
Parts by David Conrad.

Originally committed as revision 24706 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-05 19:45:57 +00:00
Jason Garrett-Glaser
98fe09df7b Add file missing in r24702
Originally committed as revision 24703 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-05 00:49:48 +00:00
Eli Friedman
c12d6955e2 H.264: SSE2/SSSE3 weighted prediction asm
Patch by Eli Friedman <eli.friedman at gmail dot com>

Originally committed as revision 24702 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-05 00:13:38 +00:00
Jason Garrett-Glaser
905ef0d064 VP5/6/8: eliminate CABAC dependency
Create a custom table for VP5/6/8's renorm to avoid depending on H.264's.
Saves one instruction in the arithmetic decoder as well.

Originally committed as revision 24701 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-04 23:04:05 +00:00
Måns Rullgård
a79e921ee6 fft-test: exit with non-zero status if test failed
Originally committed as revision 24693 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-04 06:56:55 +00:00
Martin Storsjö
8d370d88e5 Fix VP8 decoder dependencies
This reverts rev 24674 - the VP8 decoder actually depends on cabac.o.
vp8.c includes vp56.h, which includes cabac.h, which has inline functions
that reference tables from cabac.c.

This fixes compilation with --disable-everything --enable-decoder=vp8.

Originally committed as revision 24692 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-04 05:20:49 +00:00
Jason Garrett-Glaser
1e73967950 VP8: partially inline decode_block_coeffs
Avoids a function call in the case of empty DCT blocks (most of the time).

Originally committed as revision 24691 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-04 02:23:25 +00:00
Jason Garrett-Glaser
ffbf0794f9 Fix 100L in r24689
Accidentally committed some timing code.

Originally committed as revision 24690 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-04 01:40:58 +00:00
Jason Garrett-Glaser
afb54a85c3 VP8: simplify decode_block_coeffs to avoid having to track nonzero coeffs
Slightly faster.

Originally committed as revision 24689 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-04 01:38:08 +00:00
Jason Garrett-Glaser
d0c38ea0aa Cosmetics: add missing space to options.c
Originally committed as revision 24688 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-04 00:08:16 +00:00
Jason Garrett-Glaser
b0d5879513 VP8: slightly faster DCT coefficient probability update
Originally committed as revision 24687 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 23:21:47 +00:00
Måns Rullgård
2eef529195 ARM: update struct offsets
Originally committed as revision 24686 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 22:29:38 +00:00
Måns Rullgård
f079a64aea Move cavs dsp functions to their own struct
Originally committed as revision 24685 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 20:59:00 +00:00
Jason Garrett-Glaser
61ee75bbf8 Silence unused function warnings in vp56.h
Originally committed as revision 24684 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 11:35:41 +00:00
Jason Garrett-Glaser
476be414a4 VP8: make another RAC call branchy
1-2 clocks faster.

Originally committed as revision 24683 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 11:34:24 +00:00
Jason Garrett-Glaser
8b9b5e085f VP5/6/8: add one inline missed in r24677
Originally committed as revision 24682 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 11:21:22 +00:00
Jason Garrett-Glaser
0908f1b945 VP8: unroll partition type decoding tree
~34% faster partition type decoding.

Originally committed as revision 24681 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 11:10:58 +00:00
Jason Garrett-Glaser
c5dec7f137 VP8: unroll splitmv decoding tree
Much faster splitmv mode decoding.

Originally committed as revision 24680 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 10:37:14 +00:00
Jason Garrett-Glaser
23117d69c1 VP8: unroll MB mode decoding tree
~50% faster MB mode decoding, plus eliminate a costly switch.

Originally committed as revision 24679 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 10:24:28 +00:00
Jason Garrett-Glaser
cd2769c142 VP5/6/8: tweak some arithcoder inlining
Always inline the arithmetic coder, except in the case of header-parsing stuff,
in which case don't inline it at all to save code size.

Originally committed as revision 24677 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 08:06:08 +00:00
Alex Converse
55aa55f2e1 vorbisdec: Return AVERROR(ENOMEM) on malloc() failure.
This is especially important because classifs can be very large.

Originally committed as revision 24676 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 00:27:54 +00:00
Alex Converse
366d919016 vorbisdec: Prevent a potential integer overflow.
If sizeof uint_fast8_t > 1 and sizeof size_t <= 4, the expression that mallocs
classifs  is susceptible to integer overflow.

Originally committed as revision 24675 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-03 00:25:06 +00:00
Diego Biurrun
83abdf5ff0 The VP8 decoder does not depend on cabac.o.
Originally committed as revision 24674 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 23:49:49 +00:00
Diego Biurrun
efbc455915 The VP8 decoder does not depend on vp56.o and vp56data.o.
Originally committed as revision 24673 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 23:23:27 +00:00
Diego Biurrun
2e2ca50655 Remove redundant h264pred.o from VP8 objects list.
It is already selected through the H264DSP dependency of VP8.

Originally committed as revision 24672 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 23:16:52 +00:00
Jason Garrett-Glaser
370b622a45 VP8: eliminate a dereference in coefficient decoding
Originally committed as revision 24671 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 22:48:38 +00:00
Jason Garrett-Glaser
f311208cf1 VP8: much faster DC transform handling
A lot of the time the DC block is empty: don't do the WHT in this case.
A lot of the rest of the time, there's only one coefficient: make a special
DC-only transform for that case.
When the block is empty, don't incorrectly mark luma DCT blocks as having DC
coefficients.

Originally committed as revision 24670 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 20:57:03 +00:00
Måns Rullgård
c934562c12 vorbisdec: change a uint_fast32_t to 'unsigned', fix llvm-gcc build
Originally committed as revision 24669 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 20:35:50 +00:00
Jason Garrett-Glaser
827d43bb9d VP8: move zeroing of luma DC block into the WHT
Lets us do the zeroing in asm instead of C.
Also makes it consistent with the way the regular iDCT code does it.

Originally committed as revision 24668 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 20:18:09 +00:00
Pascal Massimino
d2840fa49c only store intra prediction modes on the boundary for keyframes, not as a plane.
inter-frame behaviour unchanged.

Originally committed as revision 24664 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 09:44:53 +00:00
Benoit Fouet
497d7991b5 Change a doxy comment to a normal one.
Originally committed as revision 24662 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 07:26:27 +00:00
Benoit Fouet
1aa15491f2 Fix doxygen comments.
/**\u2264 => /**<

Originally committed as revision 24661 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 07:25:25 +00:00
Jason Garrett-Glaser
10bf2eebbe VP8: simplify token_prob handling
~1.5% faster decode_block_coeffs

Originally committed as revision 24659 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-02 05:20:38 +00:00
Pascal Massimino
c22b4468a6 prevent access to vp8_coeff_band[16]
Originally committed as revision 24656 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-01 23:20:06 +00:00
Ronald S. Bultje
6341838f3c Use word-writing instead of dword-writing (with two cached but otherwise
unchanged bytes) in the horizontal simple loopfilter. This makes the filter
quite a bit faster in itself (~30 cycles less on Core1), probably mostly
because we don't need a complex 4x4 transpose, but only a simple byte
interleave. Also allows using pextrw on SSE4, which speeds up even more
(e.g. 25% faster on Core i7).

Originally committed as revision 24638 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 23:13:15 +00:00
Nick Brereton
ace7f813cd dca: fix dynrange coefficient in xch
Patch by Nick Brereton

Originally committed as revision 24637 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 22:15:59 +00:00
Justin Ruggles
6768beb4a8 cosmetics: rename output_* to write_*
Originally committed as revision 24634 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 21:14:03 +00:00
Justin Ruggles
3d2cd42f8a Simplify verbatim mode fallback by checking the frame size before writing.
Originally committed as revision 24632 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 21:08:53 +00:00
Justin Ruggles
2249a7f312 Change max_framesize for small final frame.
Originally committed as revision 24631 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 20:52:33 +00:00
Justin Ruggles
7c29a5de25 Calculate an exact frame size before writing. Now the buffer size requirements
can be known exactly, so larger frame sizes can be safely encoded without buffer
overwrite.

Originally committed as revision 24630 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 20:32:12 +00:00
Justin Ruggles
675eb677c5 cosmetics: rename find_subblock_rice_params() to find_subframe_rice_params()
Originally committed as revision 24629 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 20:19:07 +00:00
Justin Ruggles
089c18f315 Reduce number of input parameters to find_subblock_rice_params().
Originally committed as revision 24628 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 20:17:59 +00:00
Justin Ruggles
d309f01950 10l: fix bit count for frame header
Originally committed as revision 24627 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 18:48:48 +00:00
Justin Ruggles
b22f9d6535 Simplify fallback to verbatim mode encoding.
Originally committed as revision 24626 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 17:23:29 +00:00
Justin Ruggles
45e2908757 cosmetics: line wrap and vertical alignment
Originally committed as revision 24625 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 17:07:24 +00:00
Justin Ruggles
8fbb8d31d8 Combine calc_rice_params_fixed() and calc_rice_params_lpc() into a single
function.

Originally committed as revision 24624 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 17:06:10 +00:00
Justin Ruggles
43b3273e5b Remove unneeded wrapper function.
Originally committed as revision 24622 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 16:50:27 +00:00
Justin Ruggles
0f5cc12c4f Remove duplicate code by adding a flag for encoding in verbatim mode.
Originally committed as revision 24621 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 16:46:32 +00:00
Stefano Sabatini
05236ed735 Use av_fill_image_pointers/linesizes in place of ff_fill_pointer/linesize,
and drop the the ff_ variants at the next major bump.

Originally committed as revision 24620 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 16:46:20 +00:00
Justin Ruggles
93d65e3d92 Estimate frame size during encoding.
Originally committed as revision 24619 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 16:37:23 +00:00
Vitor Sessak
fa738b3ad1 Remove x86/mmx.h. It is not used anymore and has been deprecated for years.
Originally committed as revision 24618 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 16:20:45 +00:00
Vitor Sessak
0913a92a59 Fix compilation with --disable-yasm. 10l to me.
Originally committed as revision 24617 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 16:17:54 +00:00
Vitor Sessak
de4bc44abb Convert deinterlacing MMX code to YASM
Originally committed as revision 24615 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-31 14:50:51 +00:00
Justin Ruggles
eb96f1698a cosmetics: indentation
Originally committed as revision 24612 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 21:33:51 +00:00
Justin Ruggles
520effb9b5 Combine output_subframe() and output_subframes().
Originally committed as revision 24611 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 21:32:19 +00:00
Justin Ruggles
fb443a6f3b Remove unneeded variable.
Originally committed as revision 24610 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 21:27:00 +00:00
Justin Ruggles
724f34716b cosmetics: indentation
Originally committed as revision 24609 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 21:07:21 +00:00
Justin Ruggles
6d263f41ae Combine output_subframe_verbatim() and output_subframe_lpc().
Originally committed as revision 24608 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 21:06:38 +00:00
Justin Ruggles
6266cfb4ce Combine and simplify output_residual() and output_subframe_lpc().
Originally committed as revision 24607 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 20:53:02 +00:00
Justin Ruggles
fc001d6cc1 cosmetics: reindent
Originally committed as revision 24606 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 20:29:03 +00:00
Justin Ruggles
175a57113f Combine and simplify output_subframe_fixed() and output_subframe_lpc().
Originally committed as revision 24605 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 20:28:46 +00:00
Justin Ruggles
89912b5ff1 Combine and simplify output_subframe_constant() and output_subframe_verbatim().
Originally committed as revision 24604 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 20:24:15 +00:00
Justin Ruggles
1f1c05b09f Pass FlacSubframe to output_subframe_* instead of channel number.
Originally committed as revision 24603 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 20:09:14 +00:00
Justin Ruggles
15f537ed53 cosmetics: change FlacEncodeContext variable name from ctx to s in several
places for consistency.

Originally committed as revision 24602 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 19:40:18 +00:00
Justin Ruggles
871a24f3bf Set coded_frame->pts in the FLAC encoder
Originally committed as revision 24601 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 19:18:48 +00:00
Justin Ruggles
27e3418844 Do not need to set coded_frame->key_frame = 1 because it is already set in
avcodec_alloc_frame().

Originally committed as revision 24600 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 19:02:59 +00:00
Justin Ruggles
7fe0c7c823 Move debug logging of compression options to a single function.
Originally committed as revision 24599 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 18:59:27 +00:00
Justin Ruggles
e08ec71480 Add 2 failed memory allocation checks
Originally committed as revision 24598 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 18:34:39 +00:00
Justin Ruggles
e35b689ebd cosmetics: pretty-print flacenc.c
Originally committed as revision 24597 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 18:30:09 +00:00
Stefano Sabatini
fc2db52e2f Make avpicture_fill() directly call av_fill_image_linesizes() and
av_fill_image_pointers() rather than their wrappers ff_fill_linesize()
and ff_fill_pointer().

Improve performance.

Originally committed as revision 24587 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-30 08:42:08 +00:00
Stefano Sabatini
e7bd48a6ae Move fill_image_linesize() and fill_image_data_ptr() from
libavcodec/imgconvert.c and make them public in libavcore/imgutils.h,
with the names av_fill_image_linesizes() and av_fill_image_pointers().

Originally committed as revision 24583 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-29 23:44:57 +00:00
Vitor Sessak
740dfe7012 Fix compilation in x86_64. I broke it with r24580.
Originally committed as revision 24582 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-29 22:45:21 +00:00
Vitor Sessak
2c3dda6838 Translate libmpeg2 MMX IDCT to plain asm
Originally committed as revision 24580 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-29 22:19:54 +00:00
James Zern
53cf47829a Map rc_buffer_size to and c_initial_buffer_occupancy to their libvpx
counterparts.

Patch by James Zern, jzern at google

Originally committed as revision 24566 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-28 08:02:35 +00:00
Alex Converse
b6356d9726 10l: missed one reindent.
Originally committed as revision 24563 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-28 05:40:38 +00:00
Alex Converse
52fa20542b Reindent after last commit.
Originally committed as revision 24562 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-28 05:38:30 +00:00
Alex Converse
d950497083 ff_prefix non static vp56 functions.
Originally committed as revision 24561 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-28 05:36:33 +00:00
Martin Storsjö
317167e7d9 nellymoserenc: Declare the supported sample format
Originally committed as revision 24560 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-28 05:19:42 +00:00
Pascal Massimino
a8ab0cccf7 b0rk3d FATE + black helicopters hissing -> rolling back to r24556 and sleeping
Originally committed as revision 24559 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-27 23:09:13 +00:00
Pascal Massimino
62d1f7864e perform the clipping on luma_dc_qmul[1] and chroma_qmul[0] earlier
Originally committed as revision 24558 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-27 22:23:50 +00:00
Pascal Massimino
e7e81959d6 save some copies by moving some fields out of proba[2]
Originally committed as revision 24557 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-27 22:21:49 +00:00
Nick Brereton
df9844937f DCA: fix multichannel -> 2 channel downmix.
Patch by Nick Brereton

Originally committed as revision 24555 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-27 21:45:43 +00:00
Nick Brereton
08634e7bda Setup correct channel value when downmixing is required.
Patch by Nick Brereton

Originally committed as revision 24554 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-27 21:44:09 +00:00
Aurelien Jacobs
af0554e530 remove useless cast
Originally committed as revision 24553 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-27 21:12:16 +00:00
Reimar Döffinger
6f2c05f307 Document how the ref_buf is used.
Originally committed as revision 24551 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-27 17:11:13 +00:00
Michael Niedermayer
a20df85886 Fix doxy that refers to the wrong variable.
Originally committed as revision 24549 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-27 15:54:26 +00:00
Alexander Kojevnikov
49d7ef282d Show correct bitrate for VBR MP3 files.
Patch by Alexander Kojevnikov, alexander kojevnikov com

Originally committed as revision 24539 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-27 10:08:34 +00:00
Stefan Gehrer
de29597680 add Chinese AVS encoding via external library libxavs
Originally committed as revision 24533 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-27 07:18:36 +00:00
Stefano Sabatini
126b638ea0 Deprecate av_parse_video_frame_size() and av_parse_video_frame_rate()
in favor of the newly added corresponding functions
av_parse_video_size() and av_parse_video_rate() defined in
libavcore/parseutils.h.

This change also adds a linking-time dependency of libavcodec and of
libavfilter on libavcore.

Originally committed as revision 24518 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 23:12:28 +00:00
Ronald S. Bultje
ab4d031889 Use pmaddubsw for the mbedge_filter (>=ssse3), 6-10 cycles faster.
Originally committed as revision 24514 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 21:18:19 +00:00
Jason Garrett-Glaser
e25dee602f VP8: Much faster SSE2 MC
5-10% faster or more on Phenom, Athlon 64, and some others.
Helps some on pre-SSSE3 Intel chips as well, but not as much.

Originally committed as revision 24513 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 19:34:00 +00:00
S.N. Hemanth Meenakshisundaram
9dd9d67bd0 Define static functions fill_image_linesize() and
fill_image_data_ptr(). ff_fill_linesize() and ff_fill_pointer() now wrap
these functions.

The new functions are more generic, and are going to be exported in a
future patch.

Patch by S.N. Hemanth Meenakshisundaram smeenaks # ucsd § edu.

Originally committed as revision 24512 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 14:30:47 +00:00
Ronald S. Bultje
48adb7e7a4 Enable no-loop memory/register saving for ssse3/sse4 also.
Originally committed as revision 24511 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 14:07:57 +00:00
Ronald S. Bultje
2a180c69ea Save a register (or regsize of stackspace for x86-32) for the no-loop
mbedge loopfilter functions, by re-using space that holds a variable
that we no longer need.

Originally committed as revision 24510 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 14:00:15 +00:00
Ronald S. Bultje
bcd4aa6498 Use nested ifs instead of &&, which appears to not work with %ifidn (i.e. this
construct was always enabled, even for <ssse3 versions).

Originally committed as revision 24509 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 13:56:51 +00:00
Axel Holzinger
0b2c75cb68 Rename pow variable to pwr.
Patch by Axel Holzinger <aholzinger gmx de>.

Originally committed as revision 24508 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 13:52:49 +00:00
Ronald S. Bultje
2208053bd3 Split pextrw macro-spaghetti into several opt-specific macros, this will make
future new optimizations (imagine a sse5) much easier. Also fix a bug where
we used the direction (%2) rather than optimization (%1) to enable this, which
means it wasn't ever actually used...

Originally committed as revision 24507 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 13:50:59 +00:00
Jason Garrett-Glaser
fca05ea8a0 VP8: add missing free
Fixes a tiny memory leak.

Originally committed as revision 24504 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-26 07:10:30 +00:00
Carl Eugen Hoyos
28e241de5d Fix r24445: Instead of needlessly initialising a variable, silence the warning.
Originally committed as revision 24498 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-25 14:49:45 +00:00
Carl Eugen Hoyos
b9542223a3 Only 4-bit ADPCM IMA WAV files are supported.
Originally committed as revision 24493 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-25 14:33:16 +00:00
Ronald S. Bultje
6de5b7c6b8 Fix obvious bug in assignment. Somehow, the test vectors don't test this...
Originally committed as revision 24489 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-25 02:42:40 +00:00
Aurelien Jacobs
ba2c508d0c add SubRip muxer and demuxer
Originally committed as revision 24488 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 22:50:12 +00:00
Ronald S. Bultje
e3f7bf774c Fix SPLATB_REG mess. Used to be a if/elseif/elseif/elseif spaghetti, so this
splits it into small optimization-specific macros which are selected for each
DSP function. The advantage of this approach is that the sse4 functions now
use the ssse3 codepath also without needing an explicit sse4 codepath.

Originally committed as revision 24487 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 19:33:05 +00:00
Alex Converse
63e1278d88 aacenc: TLS: Save maximum values for each swb in a table.
This gives an almost 20% speedup.

Originally committed as revision 24484 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 17:11:51 +00:00
Alex Converse
031d5cea04 10l: Remove some commented out code that slipped in.
Originally committed as revision 24483 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 17:01:50 +00:00
Alex Converse
fe461767e6 aacenc: TLS: Try to preserve some energy in each non-zero band.
Reduce scalefactors in non-zero bands that underflow by twice as much as those
in bands that just fail to hit psy targets.

Originally committed as revision 24482 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 16:36:01 +00:00
Reimar Döffinger
edac49daf5 Use "const" qualifier for pointers that point to input data of
audio encoders.
This is purely for clarity/documentation purposes.

Originally committed as revision 24481 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 13:59:49 +00:00
Alex Converse
c226fc5bfb aacenc: Prevent premature termination of the two loop search.
Originally committed as revision 24476 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 04:23:26 +00:00
Alex Converse
81824fe059 aacdec: Only load and write each predictor variable once.
This is slightly faster and opens the door for further optimization.

Originally committed as revision 24475 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 02:57:08 +00:00
Alex Converse
70c99adb48 aacdec: 4% faster main profile decoding.
Originally committed as revision 24474 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 02:41:47 +00:00
Alex Converse
51ffd3a62f aacenc: Favor log2f() and sqrtf() over log2() and sqrt().
Originally committed as revision 24473 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-24 02:10:59 +00:00
Alex Converse
04d72abf17 aacenc: Factorize some scalefactor utilities.
Originally committed as revision 24472 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 22:37:42 +00:00
Eli Friedman
3611e7a309 Inline asm for VP56 arith coder
This is a lot more reliable to get cmov rather than trying to trick gcc into
generating it, useful since it's 2% faster overall.

Patch by Eli Friedman <eli.friedman at gmail>

Originally committed as revision 24471 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 21:46:30 +00:00
David Conrad
ca18a478e3 VP8: Inline traversing vp8_small_mvtree
Much faster read_mv_component, slightly faster overall

Originally committed as revision 24470 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 21:46:25 +00:00
David Conrad
7697cdcf95 VP8: Use vp56_rac_get_prob_branchy when the bit is only used by an if()
Originally committed as revision 24469 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 21:46:20 +00:00
David Conrad
fe1b5d974a Decode DCT tokens by branching to a different code path for each branch
on the huffman tree, instead of traversing the tree in a while loop.

Based on the similar optimization in libvpx's detokenize.c

10% faster at normal bitrates, and 30% faster for high-bitrate intra-only

Originally committed as revision 24468 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 21:46:17 +00:00
David Conrad
5474ec2ac8 Move renormalization of the VP56 arith decoder to before decoding a bit
No difference at the moment, but allows a future branchy variant
of vp56_rac_get_prob to be significantly faster

Originally committed as revision 24467 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 21:46:14 +00:00
David Conrad
b3d755ec8b Split renorm of vp56 arith decoder to its own function
Originally committed as revision 24466 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 21:46:08 +00:00
David Conrad
24675b8093 vp56's arith decoder's code_word is only 16 bits, no need for unsigned long
Originally committed as revision 24465 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 21:46:01 +00:00
Jason Garrett-Glaser
13a1304bb3 Add myself to VP8 copyright and maintainers.
Also add Ronald to maintainers.

Originally committed as revision 24464 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 21:42:35 +00:00
Jason Garrett-Glaser
414ac27d8f VP8: always_inline some things to force gcc to do the right thing
Mostly seems to help in the MC code, which gets a hundred cycles faster.

Originally committed as revision 24463 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 21:36:21 +00:00
Jason Garrett-Glaser
06d50ca804 VP8: use AV_RL24 instead of defining a new RL24.
Originally committed as revision 24462 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 21:17:18 +00:00
Jason Garrett-Glaser
9fddd14a8e VP8: Slightly faster MV selection
Don't clamp best mv unless it's actually used.

Originally committed as revision 24461 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 19:06:22 +00:00
Jason Garrett-Glaser
14767f35ed VP8: use AV_ZERO32 instead of AV_WN32A where relevant
Originally committed as revision 24460 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 10:42:19 +00:00
Jason Garrett-Glaser
09959ec46e VP8: eliminate redundant code in r24458
Originally committed as revision 24459 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 10:34:21 +00:00
Jason Garrett-Glaser
a71abb714e VP8: shave a few clocks off check_intra_pred_mode
Originally committed as revision 24458 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 10:24:38 +00:00
Jason Garrett-Glaser
0087aa47d0 VP8: fix broken sign bias code in MV pred
Apparently the official conformance test vectors don't test this feature,
even though libvpx uses it.

Originally committed as revision 24456 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 06:41:35 +00:00
Jason Garrett-Glaser
3ae079a3c8 VP8: optimize DC-only chroma case in the same way as luma.
Add MMX idct_dc_add4uv function for this case.
~40% faster chroma idct.

Originally committed as revision 24455 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 06:02:52 +00:00
Jason Garrett-Glaser
3df56f4118 VP8: Clean up some variable shadowing.
Originally committed as revision 24454 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 03:44:37 +00:00
Jason Garrett-Glaser
51c9156438 VP8 asm: cosmetics (spacing)
Originally committed as revision 24453 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 03:02:56 +00:00
Jason Garrett-Glaser
8a467b2d44 VP8: 30% faster idct_mb
Take shortcuts based on statistically common situations.
Add 4-at-a-time idct_dc function (mmx and sse2) since rows of 4 DC-only DCT
blocks are common.
TODO: tie this more directly into the MB mode, since the DC-level transform is
only used for non-splitmv blocks?

Originally committed as revision 24452 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 02:58:27 +00:00
Jason Garrett-Glaser
ef38842f0b VP8: smarter prefetching
Don't prefetch reference frames that were used less than 1/32th of the time so
far in the frame.
This helps speed up to ~2% on videos that, in many frames, make near-zero
(but not entirely zero) use of golden and/or alt-refs.
This is a very common property of videos encoded by libvpx.

Originally committed as revision 24451 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 01:59:56 +00:00
Baptiste Coudurier
9479415e4e In h264 parser, return immediately if buf_size is 0, avoid printing
erroneous message for last frame.

Originally committed as revision 24450 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 00:34:09 +00:00
Jason Garrett-Glaser
c25c776708 VP8: clear DCT blocks in iDCT instead of using clear_blocks.
~0.3% faster overall.

Originally committed as revision 24448 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 00:07:16 +00:00
Jason Garrett-Glaser
b74f70d646 VP8: avoid a memset for non-i4x4 blocks with no coefficients
Originally committed as revision 24447 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-23 00:05:44 +00:00
Jason Garrett-Glaser
145d31865d Get rid of more unnecessary dereferences in VP8 deblocking
Originally committed as revision 24446 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 23:11:40 +00:00
Jason Garrett-Glaser
867215336d Shut up an uninitialized variable GCC warning in VP8.
Originally committed as revision 24445 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 23:04:51 +00:00
Jason Garrett-Glaser
c4211046d2 Smarter VP8 prefetching
Prefetch all refs (including altref), but only if they've been used so far this
frame.
~2.5% faster overall.

TODO: Do something even smarter, like using how often each ref has been used
so far, so that a couple blocks of a rarely-used ref don't force us to prefetch
it.

Originally committed as revision 24444 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 23:03:08 +00:00
Jason Garrett-Glaser
8cfae560ad Fix stupid bug in VP8 prefetching code
Originally committed as revision 24443 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 22:15:43 +00:00
Jason Garrett-Glaser
2a38c2e99a Eliminate a LUT in escape decoding in VP8 decode_block_coeffs
Originally committed as revision 24441 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 22:08:09 +00:00
Jason Garrett-Glaser
d292c3455e Eliminate some repeated dereferences in VP8 inter_predict
Originally committed as revision 24438 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 21:05:30 +00:00
Ronald S. Bultje
dc5eec8085 Use pextrw for SSE4 mbedge filter result writing, speedup 5-10cycles on
CPUs supporting it.

Originally committed as revision 24437 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 19:59:34 +00:00
James Zern
7eb185e0a3 Map settings for 2-pass libvpx encoding.
Patch by James Zern, jzern at google

Originally committed as revision 24430 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 12:35:32 +00:00
Jason Garrett-Glaser
b946111fde Eliminate a pointless memset for intra blocks in P-frames in VP8
Originally committed as revision 24429 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 12:15:29 +00:00
Jason Garrett-Glaser
b9a7186bf4 VP8: Don't store segment in macroblock struct anymore.
Not necessary with the previous patch.

Originally committed as revision 24427 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 11:55:55 +00:00
Jason Garrett-Glaser
c55e0d34ba Convert VP8 macroblock structures to a ring buffer.
Uses a slightly nonintuitive ring buffer size of (width+height*2) to simplify
addressing logic.
Also split out the segmentation map to a separate structure, necessary to
implement the ring buffer.

Originally committed as revision 24426 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 11:45:18 +00:00
Jason Garrett-Glaser
968570d65f Calculate deblock strength per-MB instead of per-row
Gives better cache locality, since the VP8Macroblock structs are still in cache.
Inspired by the way x264 does it.

Originally committed as revision 24417 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 07:24:22 +00:00
Jason Garrett-Glaser
d1c58fce20 Avoid tracking i4x4 modes in P-frames in VP8
As in the previous commit, they aren't used for context selection, so it saves
memory this way.

Originally committed as revision 24416 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 07:04:45 +00:00
Jason Garrett-Glaser
158e062c95 Avoid useless fill_rectangle in P-frames in VP8
In VP8, i4x4 only uses contexts based on neighbors in I-frames.

Originally committed as revision 24415 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 06:39:54 +00:00
Jason Garrett-Glaser
7bf254c41d Optimize partition mv decoding in VP8
Originally committed as revision 24414 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 06:29:26 +00:00
Jason Garrett-Glaser
c0498b3031 Take shortcuts for mv0 case in VP8 MC
Avoid edge emulation -- it isn't needed if there isn't any subpel.

Originally committed as revision 24413 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 05:49:09 +00:00
Jason Garrett-Glaser
702e8d3376 Much faster VP8 mv and mode prediction
Originally committed as revision 24412 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 04:26:41 +00:00
Jason Garrett-Glaser
d229ae2b62 Convert vp56_mv to 16-bit.
Saves nothing except a bit of memory/cache now, but will allow future
optimizations.

Originally committed as revision 24411 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 03:33:29 +00:00
Jason Garrett-Glaser
d864dee8ab Add prefetching to VP8 decoder
~5% faster overall, probably depends on CPU and resolution.

Originally committed as revision 24410 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 03:09:10 +00:00
Ronald S. Bultje
003243c3c2 Fix and enable horizontal >=SSE2 mbedge loopfilter.
Originally committed as revision 24409 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 01:35:26 +00:00
Loren Merritt
c7b1d9768c relicense h264 deblock sse2 to lgpl
Originally committed as revision 24408 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-22 00:39:49 +00:00
Loren Merritt
532e769701 sync yasm macros from x264
Originally committed as revision 24406 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 22:45:16 +00:00
Jason Garrett-Glaser
8731dbd890 Eliminate one instruction in VP8 dc_add_sse4
Originally committed as revision 24405 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 22:41:37 +00:00
Jason Garrett-Glaser
7dd224a42d Various VP8 x86 deblocking speedups
SSSE3 versions, improve SSE2 versions a bit.
SSE2/SSSE3 mbedge h functions are currently broken, so explicitly disable them.

Originally committed as revision 24403 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 22:11:03 +00:00
Jason Garrett-Glaser
b8b231b5dc Make mmx VP8 WHT faster
Avoid pextrw, since it's slow on many older CPUs.
Now it doesn't require mmxext either.

Originally committed as revision 24397 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 20:51:01 +00:00
Diego Pettenò
3fc548df28 Make ff_inverse stay with libavutil, and optional copy it to libavcodec.
The ff_inverse table is used by FASTDIV macro, defined in libavutil, but up
to now the table was defined only in libavcodec.

After this change, the main copy of ff_inverse is part of libavutil (just
like FASTDIV), but if CONFIG_SMALL is unset, then a different copy is made
available to libavcodec, to avoid the performance penalty of using an
external look up table.

Dynamic linking works, because the libraries are linked with -Bsymbolic, so
the local copy of the symbol has priority over the external; static linking
works because the table is on a standalone object file in both libraries,
so the linker is able to discard one of the two.

Tested on Linux/x86-64 and Mac OS X/x86-64.

Originally committed as revision 24383 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 12:37:37 +00:00
David Conrad
af521abc28 Add header declarations for mmx/sse constants missing them
Originally committed as revision 24381 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 10:02:07 +00:00