Commit Graph

12829 Commits

Author SHA1 Message Date
Michael Niedermayer
bc29ae4a77 2 pass mode for ffv1 to optimally order the range coder states.
Originally committed as revision 25560 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-24 12:31:09 +00:00
Michael Niedermayer
6019cd9ff2 Factorize state_transition init out.
Originally committed as revision 25559 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-24 12:31:00 +00:00
James Zern
2aa72ecccc Add new -slices option and use it for libvpx and libx264.
Patch by James Zern, jzern google

Originally committed as revision 25551 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-22 18:09:14 +00:00
Nicolas George
f9b4eef457 Use forced key frames when encoding with libxvid.
Patch by Nicolas George, nicolas D george A normalesup D org

Originally committed as revision 25550 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-22 18:01:48 +00:00
Michael Niedermayer
4c3267aaad Fix memleak in mjpeg decoder.
Originally committed as revision 25549 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-22 02:25:26 +00:00
Michael Niedermayer
a2d4dfd493 Optimize EOB check in mjpeg decode_block() by adjusting the VLC symbol.
Originally committed as revision 25548 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 22:44:51 +00:00
Michael Niedermayer
e4463f21ee Simplify last coeff check in mjpeg decode_block()
Originally committed as revision 25547 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 22:44:47 +00:00
Michael Niedermayer
2111a191eb Check index in mjpeg AC decode against overflowing.
This fixes a possibly exploitable buffer overflow and it will likely also be needed for future overreading fixes.

Originally committed as revision 25546 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 22:44:44 +00:00
Michael Niedermayer
5675a11f92 Add a seperate VLC table for progressive jpeg so we dont have to subtract 16 in the inner loop.
Originally committed as revision 25545 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 22:44:41 +00:00
Michael Niedermayer
8870b25140 Factor code&0xf out of if() in decode_block_progressive().
Originally committed as revision 25544 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 22:44:37 +00:00
Michael Niedermayer
7f4a1e8f6c Cleanup decode_block_progressive()
Originally committed as revision 25543 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 22:44:34 +00:00
Michael Niedermayer
614252863d Factorize ((unsigned) code) >> 4 out of decode_block_progressive() in jpeg.
Originally committed as revision 25542 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 22:44:31 +00:00
Michael Niedermayer
76c80ef569 Move if() in mjpeg decode_block() to simplify condition.
Originally committed as revision 25541 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 22:44:28 +00:00
Michael Niedermayer
1932182498 Simplify build_vlc() by using init_vlc_sparse() in mjpeg.
Originally committed as revision 25540 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 22:44:18 +00:00
Rafaël Carré
fc068f9f27 Fixed DXVA_Slice_H264_Long::BitOffsetToSliceData value.
The 8 bits offset (nal unit type) should not be added, as the spec says:

"This bit offset is the offset within the RBSP data for the slice, relative
to the starting position of the slice_header() in the RBSP"

This fixes DXVA2 support for intel GPU.

Patch by Rafaël Carré (funman _AT_ videolan _DOT_ org).

Originally committed as revision 25538 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 18:39:57 +00:00
Baptiste Coudurier
b4a6c8fb50 cosmetics, indentation
Originally committed as revision 25533 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 06:22:54 +00:00
Baptiste Coudurier
12a5150bf4 10l fix h263+ encoder, format will be 8, array size is 8 not 7
Originally committed as revision 25532 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-21 06:21:07 +00:00
Michael Niedermayer
c868524b9a Replace 5 by named constant MAX_CONTEXT_INPUTS in ffv1.c
Originally committed as revision 25529 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-19 17:26:27 +00:00
Stefano Sabatini
f2f8fb1035 Remove redundant text in the log.
Originally committed as revision 25517 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-18 13:19:59 +00:00
Stefano Sabatini
082a857522 Make XAN decoder return meaningful error codes.
Originally committed as revision 25516 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-18 13:19:53 +00:00
Michael Niedermayer
d721141f54 Move shared functions out of CONFIG_FFV1_ENCODER ifdef
Originally committed as revision 25511 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-16 21:31:16 +00:00
Michael Niedermayer
d56839fc6d Store slice position and size per keyframe in ffv1.2
Originally committed as revision 25478 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-15 02:05:06 +00:00
Michael Niedermayer
1da7257739 Fix indention of ffv1.c after previous commits.
Originally committed as revision 25477 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-14 22:10:50 +00:00
Michael Niedermayer
e42393d168 Store quant table index per plane and slice.
Originally committed as revision 25476 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-14 22:03:41 +00:00
Michael Niedermayer
f08ed90d94 Assert that the context doesnt overflow in ffv1.
Originally committed as revision 25475 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-14 22:03:38 +00:00
Michael Niedermayer
e2b2f8454c Rectangular slice support for ffv1.2
Originally committed as revision 25474 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-14 22:03:32 +00:00
James Zern
da7548585e Fix crash when using iblock option (when a warning is logged).
Patch by James Zern, jzern google

Originally committed as revision 25472 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-14 07:47:49 +00:00
Stefano Sabatini
aec966958c Add support for PIX_FMT_RGBA in the targa encoder.
Patch sponsored by Animoto.

Originally committed as revision 25470 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-13 13:11:45 +00:00
Stefano Sabatini
bbf874f19b Use named constants defined in targa.h.
Originally committed as revision 25465 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-13 10:39:47 +00:00
Stefano Sabatini
b5becbab09 Create a targa.h file to contain common definitions for targa encoder
and decoder.

Originally committed as revision 25464 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-13 10:39:45 +00:00
Stefano Sabatini
e259eadcab Make the targa encoder return sane error values rather than -1.
Originally committed as revision 25455 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-12 18:44:28 +00:00
Stefano Sabatini
7c559bc77e Targa encoder: log error message in case the pixel format in input is
not supported.

Originally committed as revision 25454 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-12 18:44:25 +00:00
Michael Niedermayer
c5ac275b2e Allow storing multiple quant tables in extradata that can then be selected per keyframe in ffv1.
Originally committed as revision 25439 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-10 21:04:45 +00:00
Michael Niedermayer
0f27aca7b3 Store global things in extradata for ffv1 ver=2.
ver=2 is not set yet so this does not affect output.

Originally committed as revision 25438 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-10 21:04:41 +00:00
Michael Niedermayer
228adaab8d Make sure version is not decreased for 16bit per sample colorspaces in ffv1.
Originally committed as revision 25437 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-10 21:04:38 +00:00
Michael Niedermayer
4f22b3bbbf Factorize quant table read and write code in ffv1.c
Originally committed as revision 25436 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-10 21:04:34 +00:00
Martin Storsjö
6ded3a0411 Fix headers so that "make checkheaders" passes again
Originally committed as revision 25411 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-08 08:56:36 +00:00
Reimar Döffinger
6c2142809c Add d modifier to asm argument to fix nasm compilation.
Originally committed as revision 25397 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-07 19:18:18 +00:00
John Stebbins
2c5438aa57 Fix default value of time_offset_length.
Patch by John Stebbins stebbins jetheaddev com.

Originally committed as revision 25374 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-06 17:50:05 +00:00
Ramiro Polla
326bf69acc fft: mark xmm registers as clobbered in ff_imdct_calc_sse
Originally committed as revision 25363 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-06 01:27:02 +00:00
Ronald S. Bultje
dd68d4db43 MMX, MMX2, SSE2 and SSSE3 optimizations for pred16x16/8x8_plane H264 intra
prediction (plus some with different rounding for svq3/rv40). Speedup (for
SSSE3) about ~6-fold, 3.6% faster overall with cathedral sample.

Originally committed as revision 25361 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 22:06:18 +00:00
Carl Eugen Hoyos
5dd7f994c6 Do not assume PIX_FMT_YUV420P will remain the only supported output format for H264.
Originally committed as revision 25352 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 17:24:18 +00:00
Tobias Bindhammer
2a26520a97 Cosmetics, lots of.
Originally committed as revision 25348 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 12:14:30 +00:00
Tobias Bindhammer
bbc26bae11 Skip unnecessary calculations in 4col-mode.
Originally committed as revision 25347 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 12:14:27 +00:00
Tobias Bindhammer
90a3ffe276 Add possibility to crop screens inside of encoded frames.
Originally committed as revision 25346 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 12:14:23 +00:00
Tobias Bindhammer
93ee7f9c41 Add check for height when cropping.
Originally committed as revision 25345 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 12:14:20 +00:00
Tobias Bindhammer
a4d2690309 Introduce palette with dynamic size.
Originally committed as revision 25344 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 12:14:14 +00:00
Michael Niedermayer
cfa5a81ea6 Move aspect ratio 0/0 avoidance code so the values in the sps struct are not missed.
This preempts issues with av_cmp_q(0/0, X)

Originally committed as revision 25337 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-05 01:43:25 +00:00
İsmail Dönmez
9276bdddca snowdsp: Explicitly state the operand sizes
Fixes compilation with clang's builtin assembler

Patch by İsmail Dönmez, ismail at namtrac dot org

Originally committed as revision 25331 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-04 13:08:13 +00:00
Benjamin Larsson
62784e3733 Add the CODEC_CAP_CHANNEL_CONF capability code and add
that flag to the dca codec. This capability when set
will make sure the codec will initialize the channel
configuration instead of trusting the container. This
fixes issue 2137 and issue 850.

Originally committed as revision 25320 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-02 22:18:02 +00:00
Justin Ruggles
2e0559b713 Support decoding of FLAC files without a STREAMINFO header.
Originally committed as revision 25315 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-02 20:37:43 +00:00
Reimar Döffinger
645e75992d Fix GSM decoding: regular GSM and MSGSM do not use the same
bitstream endianness, so they cannot reuse the same code
without a lot of function call overhead.
Thus use templating to compile two different binaries.

Originally committed as revision 25312 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-02 09:51:26 +00:00
Jason Garrett-Glaser
05931ab763 Make FRAPS decoder use PC range instead of TV range
FRAPS appears to output PC range streams.  I can't guarantee this is true of
all versions.

Originally committed as revision 25308 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-02 08:39:34 +00:00
Baptiste Coudurier
35e33b9aac 10l fix h263 encoder resolution test, array size is 8 not 7
Originally committed as revision 25305 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-02 01:26:00 +00:00
Tomas Härdin
fbeabfca2f Add pcm_lxf, a decoder for the 20-bit planar PCM format used in LXF
Originally committed as revision 25280 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-01 11:08:19 +00:00
Aurelien Jacobs
59b4e5ba49 add FF_API_INOFFICIAL define to disable the deprecated 'inofficial' flag
Originally committed as revision 25277 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-30 20:40:10 +00:00
Aurelien Jacobs
838dc131f1 add FF_API_SET_STRING_OLD define to disable the deprecated av_set_string API
Originally committed as revision 25276 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-30 20:34:35 +00:00
Aurelien Jacobs
0743de4ffd add FF_API_USE_LPC define to disable the deprecated AVCodecContext.use_lpc field
Originally committed as revision 25275 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-30 20:31:42 +00:00
Aurelien Jacobs
448ce9258c add FF_API_SUBTITLE_OLD define to disable the deprecated decode_subtitle API
Originally committed as revision 25273 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-30 20:12:46 +00:00
Aurelien Jacobs
164bc38c26 add FF_API_VIDEO_OLD define to disable the deprecated decode_video API
Originally committed as revision 25272 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-30 19:51:22 +00:00
Aurelien Jacobs
a377cfa6c2 add FF_API_AUDIO_OLD define to disable the deprecated decode_audio API
Originally committed as revision 25270 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-30 15:37:01 +00:00
Niobos
e2f0214a0b Fix a yuv420p sample that was incorrectly detected as yuv411p
(576i50 25Mbps 4:1:1 special case was wrong).
Fixes issue2211

Patch by Niobos, niobos dest-unreach be

Originally committed as revision 25269 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-30 12:26:42 +00:00
Ronald S. Bultje
a52ffc3f54 Move static inline function to a macro, so that constant propagation in
inline asm works for gcc-3.x also (hopefully). Should fix gcc-3.x FATE
breakage after r25254.

Originally committed as revision 25262 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 17:42:26 +00:00
Alexander Strange
1bb56bdb41 rawdec: Properly pass reordered_opaque through the decoder
Originally committed as revision 25261 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 15:43:37 +00:00
Eli Friedman
329d689f75 Use sse2 variant of put_pixels16() for no_rnd also. Provides a minor speed
increase to e.g. vc1, snow and mpeg decoding.

Patch by Eli Friedman <eli dot friedman gmail com>.

Originally committed as revision 25259 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 15:34:43 +00:00
Michael Niedermayer
77336a5e12 Allow setting the impulse block bias for libvorbis through a private codec parameter.
First example and test of private codec parameters.

Originally committed as revision 25258 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 15:09:38 +00:00
Michael Niedermayer
dc51a72ba4 Move allocation and init to defaults of the private codec contexts to avcodec_get_context_defaults3().
That way the user app can set codec specific parameters in the private context
before opening it.

Originally committed as revision 25257 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 15:05:47 +00:00
Ronald S. Bultje
cd17285e6c Merge b_idx and edge variables, and optimize the ASM to directly load variables
from memory locations/offsets depending on b_idx plus constants, rather than
having gcc do this. This saves several lea calls and together saves about
10 cycles in h264_loop_filter_strength_mmx2().

Originally committed as revision 25256 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 14:04:39 +00:00
Ronald S. Bultje
0cc8a5d088 Remove mv_mask variable. Replace the related pand -1/0 instructions by either
a pxor, or remove the instruction alltogether. Altogether, this saves 1
instruction.

Originally committed as revision 25255 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 14:03:30 +00:00
Ronald S. Bultje
c0673f2cf4 Remove d_idx as a variable, and instead load it as a constant in the asm.
This has no measurable speed effect because the surrounding code doesn't
take advantage of this yet.

Originally committed as revision 25254 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 14:02:32 +00:00
Ronald S. Bultje
2c3135f6d3 Unroll inner bidir loop in h264_loop_filter_strength_mmx2(), which gets rid
of the d_idx variable and therefore allows for future optimizations. No speed
difference by this commit itself.

Originally committed as revision 25253 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 13:35:24 +00:00
Ronald S. Bultje
4b81511cab Unloop the outer loop in h264_loop_filter_strength_mmx2(), which allows
inlining various constants within the loop code. 20 cycles faster on
cathedral sample.

Originally committed as revision 25252 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 13:34:20 +00:00
Michael Niedermayer
655c36b22f Add AVClass for the private context, this will be used for codec specific options.
Originally committed as revision 25250 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-29 11:59:25 +00:00
Jason Garrett-Glaser
4dece8c7f8 Try to fix crashes introduced by r25218
r25218 made assumptions about the existence of past reference frames that
weren't necessarily true.

Originally committed as revision 25243 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-28 09:06:22 +00:00
Michael Chinen
59cb40b921 Fix index_entries pos:
It was being set wrong for files with data_offset > 0

Patch by Michael Chinen, mchinen gmail

Originally committed as revision 25239 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-27 22:17:58 +00:00
Baptiste Coudurier
2a5db1aa58 In dv decoder, set sample aspect aspect ratio, fix issue #1612
Originally committed as revision 25232 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-27 21:31:29 +00:00
Baptiste Coudurier
348a3237cc In dv decoder, use the expected aspect ratio logic, like other decoders do,
following width/height = par/dar.

Originally committed as revision 25231 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-27 21:30:41 +00:00
Michael Niedermayer
6e73cef6e3 Fix several security issues in flicvideo.c
This fixes CVE-2010-3429

Originally committed as revision 25223 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-27 15:16:16 +00:00
Jason Garrett-Glaser
e2983d6eac Improve error concealment of lost frames
If a frame is lost, replace it with data from the previous valid frame.

Originally committed as revision 25218 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-27 04:43:41 +00:00
Stefano Sabatini
41f87daaa3 Bump version and update APIchanges after r25210.
Originally committed as revision 25216 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-27 00:30:14 +00:00
Martin Storsjö
6677249889 Bump minor version for the addition of the G.722 encoder
Originally committed as revision 25211 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 14:47:00 +00:00
Michael Niedermayer
6ed040408b Move AVOptions from libavcodec to libavutil
Originally committed as revision 25210 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 14:25:22 +00:00
Kostya Shishkov
cba322d76d Make WMV3 decoder attempt to decode WMVP as well
Originally committed as revision 25209 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 13:56:50 +00:00
Kostya Shishkov
10f93363b7 RES_SM in WMV3 is really two flags, so split it in decoder
Originally committed as revision 25208 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 13:54:35 +00:00
Reimar Döffinger
02b424d9c8 Add d suffix to movd target register to make it work with nasm.
Originally committed as revision 25206 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 09:15:18 +00:00
Reimar Döffinger
dc77e985b7 Split and then simplify address generation macro.
Allows nasm to work for this code.

Originally committed as revision 25205 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 09:08:11 +00:00
Michael Niedermayer
53eb458a72 Fix rv20 encoding so the binary decoder can decode it.
Originally committed as revision 25203 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 01:56:48 +00:00
Stefano Sabatini
b9f9e59afc Replace deprecated CODEC_TYPE_AUDIO and CODEC_TYPE_VIDEO with the
corresponding AVMEDIA_TYPE_* symbols.

Originally committed as revision 25201 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-25 23:27:16 +00:00
Maksym Veremeyenko
b299c4e4d3 Support deinterlacing of YUVJ422P in old deinterlacer.
Patch by Maksym Veremeyenko verem at m1stereo tv.

Originally committed as revision 25195 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-25 14:37:54 +00:00
Reimar Döffinger
b641982b23 rawdec: ensure that there is always a valid palette for formats that
should have one like gray8 etc.

Originally committed as revision 25190 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-25 08:44:35 +00:00
Måns Rullgård
d66a546f77 vorbisenc: remove VLAs
Originally committed as revision 25183 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 20:42:08 +00:00
Ronald S. Bultje
7e117771cd Remove unused variable.
Originally committed as revision 25173 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 15:31:46 +00:00
Ronald S. Bultje
ae11291865 Unroll loop in h264_idct_add16intra_sse2(). Basically identical to r25171, this
inlines scan8[] and removes loop setup. 15% faster, 0.4% overall.

See "[PATCH] unroll loop in h264_idct_add8_sse2()" thread on ML.

Originally committed as revision 25172 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 14:07:23 +00:00
Ronald S. Bultje
4bca677494 Unroll loop in h264_idct_add8_sse2(). This means we can inline scan8[] in the
code directly also and remove loop setup. 20% faster in function, 0.8% overall.

See "[PATCH] unroll loop in h264_idct_add8_sse2()" thread on ML.

Originally committed as revision 25171 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 14:05:45 +00:00
Stefano Sabatini
e44c01563f Deprecate av_opt_show() in favor of a new function av_opt_show2(),
which allows to specify only a subset of all the options to show.

Originally committed as revision 25166 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-24 00:51:40 +00:00
Martin Storsjö
21e681ba57 Add a G.722 encoder
Originally committed as revision 25164 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-23 21:33:29 +00:00
Reimar Döffinger
2efcde73fc rawdec: only allocate a full-frame size buffer if it actually will
be used, place palette buffer in the context to simplify this.

Originally committed as revision 25163 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-23 20:23:15 +00:00
Ivan Kalvachev
392c99007f The debug text output of macroblocks can indicate MB_TYPE_INTERLACED,
but it used to do it only for h264 codec.
Allow it for other codecs, as mpeg2 and mpeg4 also set this flag.

Originally committed as revision 25156 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-21 22:44:27 +00:00
Måns Rullgård
c0bc8b9afb x86: disable SSE functions using stack when stack is not aligned
This fixes crashes with ICC 10.1.

Originally committed as revision 25153 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-21 17:57:21 +00:00
Måns Rullgård
75c490f467 ARM: disable movw/movt for relocated values on Apple platforms
Apparently Apple platforms do not handle movw/movt relocations
properly, leading to runtime crashes in code using them.

Originally committed as revision 25150 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-20 21:50:46 +00:00
Benjamin Larsson
4792d1e792 Support deinterlacing of YUVJ420P.
Originally committed as revision 25148 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-20 11:34:27 +00:00
Måns Rullgård
f41237c9db x86: remove hack disabling sse2 h264 loop filter with 32-bit icc
Originally committed as revision 25146 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-18 20:44:32 +00:00
Vitor Sessak
6e2ecc2dba Remove pointless semicolon
Originally committed as revision 25141 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-17 19:33:56 +00:00
Ronald S. Bultje
ada65af9d1 Don't access upper 32 bits of a 32-bit int on 64-bit systems.
Originally committed as revision 25140 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-17 12:24:22 +00:00
Ronald S. Bultje
6c3d021891 Properly add HAVE_YASM around yasmified symbols. Should fix compile error
on configurations using --disable-yasm.

Originally committed as revision 25138 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-17 03:01:57 +00:00
Ronald S. Bultje
e2e341048e Move hadamard_diff{,16}_{mmx,mmx2,sse2,ssse3}() from inline asm to yasm,
which will hopefully solve the Win64/FATE failures caused by these functions.

Originally committed as revision 25137 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-17 01:56:06 +00:00
Ronald S. Bultje
d0acc2d2e9 Move sse16_sse2() from inline asm to yasm. It is one of the functions causing
Win64/FATE issues.

Originally committed as revision 25136 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-17 01:44:17 +00:00
Carl Eugen Hoyos
eb6fb058f2 Remove useless comment.
Originally committed as revision 25129 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-16 08:30:01 +00:00
James Darnley
efec9ac8a9 Allow float values for libmp3lame quality.
Patch by James Darnley, james D darnley A gmail

Originally committed as revision 25128 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-15 22:10:13 +00:00
Reimar Döffinger
82eac2f321 Check avctx width/height more thoroughly (e.g. all values 0 except width would
have been accepted before).
Also do not fail if they are invalid but instead override them to 0.
This allows decoding e.g. MPEG video when only the container values are corrupted.
For encoding a value of 0,0 of course makes no sense, but was allowed
through before and will be caught by an extra check in the encode function.

Originally committed as revision 25124 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-15 04:46:55 +00:00
Måns Rullgård
4a6cc8fa25 ARM: fix NEON h264_idct_add8
Originally committed as revision 25121 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-14 17:11:51 +00:00
Ronald S. Bultje
1d16a1cf99 Rename h264_idct_sse2.asm to h264_idct.asm; move inline IDCT asm from
h264dsp_mmx.c to h264_idct.asm (as yasm code). Because the loops are now
coded in asm instead of C, this is (depending on the function) up to 50%
faster for cases where gcc didn't do a great job at looping.

Since h264_idct_add8() is now faster than the manual loop setup in h264.c,
in-asm idct calling can now be enabled for chroma as well (see r16207). For
MMX, this is 5% faster. For SSE2 (which isn't done for chroma if h264.c does
the looping), this makes it up to 50% faster. Speed gain overall is ~0.5-1.0%.

Originally committed as revision 25119 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-14 13:36:26 +00:00
Carl Eugen Hoyos
6639af56ea Reindent after r25115.
Originally committed as revision 25116 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-13 22:09:28 +00:00
Zhou Zongyi
4383692896 Add R10k decoder.
Original patch by Zhou Zongyi, zhouzy A os pku edu cn, resubmitted by
James Darnley, james.darnley gmail, changes by me.

Originally committed as revision 25115 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-13 22:08:51 +00:00
Carl Eugen Hoyos
527c91e34a Test lowres before codec init.
Originally committed as revision 25114 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-13 22:03:29 +00:00
Justin Ruggles
c7d89948a3 Set a constant frame size for encoding G.726 audio.
Originally committed as revision 25107 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-11 19:52:09 +00:00
Måns Rullgård
c058dc222c tta: remove stray semicolon
Originally committed as revision 25103 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-11 09:32:14 +00:00
James Darnley
8d39fbd6d9 Allow mpeg encoding with qscale and very low frame rate.
Patch by James Darnley, james D darnley A gmail

Originally committed as revision 25102 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-10 23:41:14 +00:00
Marcelo Galvăo Póvoa
c7bb7eff81 Move AMR-NB frame unpacking code to a common file so it can be reused in
the AMR-WB decoder.

Patch by Marcelo Galvăo Póvoa.

Originally committed as revision 25100 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-10 19:51:08 +00:00
Luca Barbato
6f9932476d Update H263_AIC asm offset for the apple variant
Originally committed as revision 25099 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-10 19:25:42 +00:00
Alex Converse
bb2d8e9f05 aacdec: Rework channel mapping compatibility hacks.
For a PCE based configuration map the channels solely based on tags.
For an indexed configuration map the channels solely based on position.

This works with all known exotic samples including al17, elem_id0, bad_concat,
and lfe_is_sce.

Originally committed as revision 25098 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-10 18:01:48 +00:00
Reimar Döffinger
936cfbc589 Fix 24 bpp CSCD decoding, as for Windows bitmaps in this (and only this)
case the stride must be aligned to a multiple of 4.
The original CSCD encoder just compresses bitmaps it gets via Windows
API functions as-is, thus it uses exactly those alignment rules.

Originally committed as revision 25096 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-10 17:33:31 +00:00
Martin Storsjö
535cb0434d Allow the lowres option to affect audio codecs, too
Originally committed as revision 25094 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-10 06:19:31 +00:00
Jason Garrett-Glaser
8acb554aff LGPL SSE2 H.264 iDCT
This leaves no more GPL-only H.264 decoding asm code.

Approved by Loren.

Originally committed as revision 25092 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-10 02:25:12 +00:00
Reimar Döffinger
23e05db79c Fix indentation.
Originally committed as revision 25089 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-09 20:23:41 +00:00
Martin Storsjö
58e37eafce Add G.722 ADPCM audio decoder
Originally committed as revision 25086 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-09 19:21:16 +00:00
Diego Biurrun
e47ca217cb Use filename as pattern for multiple inclusion guards.
Originally committed as revision 25079 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-08 16:02:20 +00:00
Diego Biurrun
a9b98c0134 Add missing stdint.h #include; necessary to pass 'make checkheaders'.
Originally committed as revision 25078 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-08 15:34:13 +00:00
Stefano Sabatini
c6c98d0897 Move mm_support() from libavcodec to libavutil, make it a public
function and rename it to av_get_cpu_flags().

Originally committed as revision 25076 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-08 15:07:14 +00:00
Stefano Sabatini
9ec7458ddf Remove reference to not anymore existing symbol has_altivec and use
mm_support instead.

Fix compilation if altivec is present and libxvidff.c is compiled.

Originally committed as revision 25075 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-08 14:36:13 +00:00
Stefano Sabatini
ccf22d3ed1 Merge has_altivec() function into mm_support(), remove it and use
mm_support() instead.

Reduce complexity and simplify pending move to libavutil.

Originally committed as revision 25074 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-08 10:02:40 +00:00
Reimar Döffinger
83f72f138e Only draw the actually visible area in vp3_draw_horiz_band.
Fixes a black line in non-swapped, non-mod-16-height Theora videos
when vp3_draw_horiz_band is used.

Originally committed as revision 25073 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-08 05:51:31 +00:00
Stefano Sabatini
9d2e0ad824 Remove use of deprecated functions av_image_fill_pointers/linesizes in
libavcodec/utils.c, fix warnings.

Originally committed as revision 25069 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 21:24:03 +00:00
Stefano Sabatini
4afbcf46c9 Reindent.
Originally committed as revision 25068 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 21:23:59 +00:00
Stefano Sabatini
34017fd9b2 Move av_picture_data_copy() to libavcore, and rename it
av_image_copy().

Originally committed as revision 25067 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 21:23:55 +00:00
Stefano Sabatini
e7eb2033ff Reimplement av_picture_data_copy() avoiding the use of PixFmtInfo
information.

Required for moving the function to libavcore.

Originally committed as revision 25066 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 21:23:52 +00:00
Stefano Sabatini
03ff61167e Reindent after the last commit.
Originally committed as revision 25065 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 21:23:48 +00:00
Stefano Sabatini
9686abb826 Reimplement ff_img_copy_plane() as av_image_copy_plane() in libavcore,
and deprecate the old function.

Originally committed as revision 25064 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 21:23:45 +00:00
Marcelo Galvăo Póvoa
48ac225db2 Move lsp2lpc_sipr() function to common code so it can be reused in a
AMRWB decoder.

Patch by Marcelo Galvăo Póvoa.

Originally committed as revision 25062 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 20:46:29 +00:00
Marcelo Galvăo Póvoa
1d96cc0865 Move AMRNB lsf2lsp() function to common code for using in future AMRWB decoder.
Patch by Marcelo Galvăo Póvoa

Originally committed as revision 25061 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 20:44:41 +00:00
Måns Rullgård
b33451eeac Check rc_buffer_size value using integer arithmetic
Using floating-point here can cause erroneous rejection of
parameters due to rounding errors leading to a slightly too
large result.

This fixes the mxf regression test with gcc 4.5 on x86_32.

Originally committed as revision 25060 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 19:54:48 +00:00
Stefano Sabatini
e16f217ceb Use new imgutils.h API names, fix deprecation warnings.
Originally committed as revision 25058 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-07 19:15:29 +00:00
Reimar Döffinger
3d487db153 Fix slice height for y position calculation for vp3_draw_horiz_band
when the video uses 4:2:2 instead of 4:2:0 coding.

Originally committed as revision 25052 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-06 19:26:18 +00:00
Reimar Döffinger
3b9ee20f70 Fix vp3_draw_horiz_band to not produce completely chaotical values
that result in overdrawing areas again and again if s->flipped_image
is false.

Originally committed as revision 25051 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-06 19:21:13 +00:00
Reimar Döffinger
6974952d24 VP3/Theora: validate aspect and reduce it before exporting it
via the context.

Originally committed as revision 25050 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-06 17:53:29 +00:00
Stefano Sabatini
8ef38f3f50 Add #ifndef around FF_API_MM_FLAGS.
The #ifndef is required to allow for example some automated regression
tests by simply configuring with: --extra-cflags="-DFF_API_FOO=0".

Originally committed as revision 25043 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-05 21:04:11 +00:00
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
David Conrad
c7eec58170 Move ff_pw_* from vc1dsp_mmx.c to dsputil_mmx.c
Should fix compilation with icc and should help prevent any future duplicates

Originally committed as revision 24380 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-21 10:02:03 +00:00
Ronald S. Bultje
e9e456d850 VP8 MBedge loopfilter MMX/MMX2/SSE2 functions for both luma (width=16)
and chroma (width=8).

Originally committed as revision 24378 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-20 22:58:56 +00:00
Ronald S. Bultje
268821e76e Chroma (width=8) inner loopfilter MMX/MMX2/SSE2 for VP8 decoder.
Originally committed as revision 24377 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-20 22:04:18 +00:00
Pascal Massimino
fd7242ddbd remove an unneeded av_realloc()
Originally committed as revision 24375 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-20 21:54:46 +00:00