Commit Graph

11172 Commits

Author SHA1 Message Date
Michael Niedermayer
3b9e61e45f Zero a/b only in the branch where they need to be zeroed.
Originally committed as revision 21679 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 22:58:03 +00:00
Michael Niedermayer
f28a2656c3 Merge mv&ref related code for spatial direct MV code.
a bit more than 10 cpu cycles faster.

Originally committed as revision 21678 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 21:53:55 +00:00
Michael Niedermayer
0a8dca8765 Precalculate a few variables for direct mv prediction for interlaced MBs.
Originally committed as revision 21677 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 21:09:09 +00:00
Michael Niedermayer
464baa6650 Set direct MB partitioning for 16x8 and 8x16 colocated MBs to the respective true partitioning.
Originally committed as revision 21675 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 17:40:22 +00:00
Michael Niedermayer
e8d964fa52 Factorize setting sub_mb_type out.
Originally committed as revision 21674 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 17:15:17 +00:00
Michael Niedermayer
668fd14287 Remove FIXMEs for cases that are disallowed by the spec.
Originally committed as revision 21669 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 15:13:56 +00:00
Michael Niedermayer
1c3ce2cd3e Check direct_8x8_inference_flag.
Originally committed as revision 21668 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 15:12:37 +00:00
Michael Niedermayer
33a6c0c9fe Skip the fill_colmap() case thats for MBAFF if we dont have an MBAFF frame.
Originally committed as revision 21667 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 14:55:59 +00:00
Michael Niedermayer
9873ae0d44 Fix CAVLC+8x8DCT+MBAFF loopfiltering.
Fixes issue1250

Originally committed as revision 21665 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 02:00:00 +00:00
Michael Niedermayer
488dba7000 Fix colocated map.
Originally committed as revision 21664 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 01:18:00 +00:00
Michael Niedermayer
d88ea35463 Fix reference selection for colocated MBs from frames to fields.
Originally committed as revision 21663 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 01:17:13 +00:00
Michael Niedermayer
5aa1d7598f Add assert(sps.direct_8x8_inference_flag) to FIXME comment.
Originally committed as revision 21662 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 01:14:58 +00:00
Michael Niedermayer
50f8e98507 ref_offset must be added after checking references validity.
Originally committed as revision 21661 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-07 01:13:56 +00:00
Reimar Döffinger
06e03fa0ae Add include necessary for ff_set_qscale
Originally committed as revision 21657 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-06 12:53:28 +00:00
Jai Menon
f6d2916550 Avoid using an intermediate variable.
Originally committed as revision 21656 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-06 12:52:22 +00:00
Jai Menon
b53ae8b6b1 Remove redundant use of numchannels since it is 1 for mono.
Originally committed as revision 21655 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-06 12:48:37 +00:00
Jai Menon
e243eee43f alac.c : Use av_freep instead of av_free.
Originally committed as revision 21654 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-06 12:38:42 +00:00
Michael Niedermayer
8dcbf4c7aa Long term references behave different from short term in spatial direct MV calculation.
Fixes FRExt_MMCO4_Sony_B / issue1251

Originally committed as revision 21651 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-06 02:55:58 +00:00
Jai Menon
f430c7b6ac Add ALAC 24 bps decoding support.
Originally committed as revision 21637 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-04 16:21:26 +00:00
Michael Niedermayer
3102d180bb Fix large timebases.
Fixed issue1633

Originally committed as revision 21636 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-04 15:30:37 +00:00
Michael Niedermayer
ed3e91489b Implement cool new vlc code.
Fixes issue1637

Originally committed as revision 21635 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-04 14:26:57 +00:00
Peter Ross
b9e06dddb7 IFF PBM/ILBM bitmap decoder
Originally committed as revision 21622 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-03 09:56:16 +00:00
Michael Niedermayer
299fd39697 Revert
r12684 | michael | 2008-04-04 02:43:34 +0200 (Fri, 04 Apr 2008) | 2 lines
	Disable the split function. This should end the mpeg1/2 global header issues.
The split function is essential for -ss to work
Fixes issue1226
If this breaks something please tell me, also if someoen remembers what problem
this originally caused tell me too, i searched but couldnt find it.

Originally committed as revision 21621 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-03 04:40:42 +00:00
Carl Eugen Hoyos
36cbdc9539 Fix r21223: AVup samples (issue 1685) need a buf offset like AV1x (issue 1684).
Originally committed as revision 21617 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-02 22:57:56 +00:00
Thilo Borgmann
8e14fbe89b Remove unnecessary fields in ALSSpecificConfig.
Originally committed as revision 21583 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-01 09:53:37 +00:00
Michael Niedermayer
5cd3928478 Set reordered_opaque during context alloc by default to AV_NOPTS_VALUE.
This should make sure that pictures allocated prior to avcodec_decode_video()
get AV_NOPTS_VALUE assigned.

Originally committed as revision 21580 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-01 00:18:49 +00:00
Daniel Verkamp
abafc87c46 Update binkaudio to new DECLARE_ALIGNED syntax
Originally committed as revision 21573 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-31 15:07:25 +00:00
Daniel Verkamp
315c8d6c4e libavcodec version bump for Bink codec IDs (r21536)
Originally committed as revision 21572 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-31 13:34:28 +00:00
Peter Ross
c0d3f516cb Bink Audio decoder
Originally committed as revision 21570 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-31 12:51:15 +00:00
Reimar Döffinger
688621d76b Add include to fix implicit declaration of ff_mpeg4_init_direct_mv and
ff_h263_encode_mba

Originally committed as revision 21568 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-31 12:27:05 +00:00
Peter Ross
6b807c15aa Add v210x decoder long name
Originally committed as revision 21567 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-31 12:06:33 +00:00
Michael Niedermayer
37b2b0d6cd Get rid of a check in one direction that cant be true in it in that part
of the code.
No meassureable speed change.

Originally committed as revision 21566 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-31 02:05:26 +00:00
Måns Rullgård
d132d50fb8 Blackfin: use SRAM only when CONFIG_SRAM is set
Originally committed as revision 21565 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-31 00:20:30 +00:00
Michael Niedermayer
f28f146473 Flush the bitreservour.
Fixes issue1716

Originally committed as revision 21559 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 21:55:18 +00:00
Michael Niedermayer
2646814897 Split first reference list comparission from mv comparission.
about 0.5% faster MBAFF loop filtering

Originally committed as revision 21552 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 20:07:37 +00:00
Reimar Döffinger
3d05c1fbec Make the jump-table section-relative for x86_64 with PIC enabled.
This allows to get rid of the macho64 specific hack that moves them
to rodata (with worse cache behaviour) and avoids textrels which
e.g. Gentoo does not allow for x86_64 libraries.

Originally committed as revision 21551 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 19:26:47 +00:00
Stefano Sabatini
80a07f6e47 Implement av_get_pix_fmt(), and deprecate avcodec_get_pix_fmt().
Originally committed as revision 21545 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 18:50:00 +00:00
Michael Niedermayer
4e992796a9 Replace h->left_type[0] by the local variable for it we have.
No meassureable speed effect.

Originally committed as revision 21541 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 14:33:25 +00:00
Michael Niedermayer
012dbcce08 slightly faster bit trickery.
Originally committed as revision 21540 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 14:10:06 +00:00
Michael Niedermayer
77821e11b3 Replace ?: by branchless code.
about 0.5% faster loop filtering

Originally committed as revision 21539 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 13:40:20 +00:00
Daniel Verkamp
4e5f42dd79 Add Bink codec IDs
Originally committed as revision 21536 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 09:48:55 +00:00
Kostya Shishkov
1cf3168516 Indeo Video Interactive 4 and 5 common code and DSP functions.
Reviewed and corrected by myself because there were no other volunteers in the
last weeks.

Originally committed as revision 21531 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-30 08:10:17 +00:00
Reimar Döffinger
800274f871 Make VP5 and VP6 decoders output a qscale table to allow for more automatic
post-processing, and add a new FF_QSCALE_TYPE_VP56 for this.

Originally committed as revision 21529 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-29 19:11:47 +00:00
Ronald S. Bultje
5e4e9042c4 Add no_repeat_mask option, so that single-pulse vectors can also be
expressed in a AMRFixed structure and handled by ff_set_fixed_vector().

Originally committed as revision 21528 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-29 16:49:06 +00:00
Robert Swain
4a27f326c5 Add support for vorbis 6.1 and 7.1 channel configurations as per the new spec
http://xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-800004.3.9

Originally committed as revision 21527 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-29 13:51:25 +00:00
Laurent Aimar
68a4d3498f vp56: check buffer size to fix a potential segfault
patch by Laurent Aimar  fenrir _at_ videolan _dot_ org

Originally committed as revision 21521 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 23:49:46 +00:00
Justin Ruggles
2c2cdc0bfb Simplify error handling by processing header errors separate from CRC and
buffer size vs. frame size errors.

Originally committed as revision 21519 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 23:19:33 +00:00
Reimar Döffinger
836fc77785 Move variable declaration to block where it is used and simplify code.
Avoids a (incorrect) "possibly used uninitialized" warning, no measurable
speed difference.

Originally committed as revision 21518 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 21:01:50 +00:00
Rafaël Carré
dd0cd3d273 Export H264 profile and level in AVCodecContext.
Patch by Rafaël Carré, rafael D carre A gmail

Originally committed as revision 21517 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 20:57:29 +00:00
Reimar Döffinger
88517e9f9d Extract duplicated code into a separate function.
5% faster on Intel Atom with gcc 4.4.1 (performance is unchanged
if using av_always_inline).

Originally committed as revision 21516 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 20:15:19 +00:00
Michael Niedermayer
34032e26ab factorize first filter call out, this makes the code somewhat
smaller without any speed loss.

Originally committed as revision 21514 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 19:44:13 +00:00
Ronald S. Bultje
52ed8d0efe Simplify. See "[PATCH] simplify ff_set_fixed_vector()" thread on mailinglist.
Originally committed as revision 21510 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 14:29:53 +00:00
Rafaël Carré
e9ca315dd1 Initialize thread_context[0] with h264 parser context.
This allows freeing the parser memory in the thread_context freeing loop.

Patch by Rafaël Carré gmailify(rafael, carre)

Originally committed as revision 21508 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 13:04:25 +00:00
Michael Niedermayer
592e03a8da Change wraper functions to always inline, they are faster now that way.
1% faster MBAFF decoding overall, maybe ~0.1% faster for the cathedral sample.

Originally committed as revision 21507 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 11:37:35 +00:00
Michael Niedermayer
5364db2893 indent
Originally committed as revision 21506 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 11:18:06 +00:00
Michael Niedermayer
2cf0d46d4c Restructure check_mv()
~20 cpu cycles faster loopfilter

Originally committed as revision 21505 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 11:12:46 +00:00
Michael Niedermayer
fabd704b37 Restructure if() in check_mv()
quite a bit faster

Originally committed as revision 21504 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 10:38:43 +00:00
Michael Niedermayer
ca7c784fdf Unroll loops in check_mv()
~6% faster (slow path) loopfilter (should be ~2% overall)

Originally committed as revision 21503 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 10:34:06 +00:00
Michael Niedermayer
e814817b74 Factor mv/ref compare code out.
This is a hair slower (0.15% maybe) but i really dont want to have the
identical code duplicated 3 times because gcc adds odd threaded jumps with
register reshuffling and register safe/restore.

Originally committed as revision 21502 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 10:10:02 +00:00
Michael Niedermayer
3b84924516 Simplify first edge filter condition.
Originally committed as revision 21497 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 02:41:52 +00:00
Michael Niedermayer
b6302d0c55 Cosmetics, mostly indention, 2 or so new fixme comments that i was to lazy
to split out

Originally committed as revision 21496 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 02:20:31 +00:00
Michael Niedermayer
0a32508d90 Make the fast loop filter path work with unavailable left MBs.
This prevents the issue with having to switch between slow and
fast code paths in each row.
0.5% faster loopfilter for cathedral

Originally committed as revision 21495 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 02:15:25 +00:00
Michael Niedermayer
b304767301 get rid of the start variable.
a few cycles faster

Originally committed as revision 21494 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 01:31:06 +00:00
Michael Niedermayer
980bcc554d Unroll main loop so the edge==0 case is seperate.
This allows many things to be simplified away.
h264 decoder is overall 1% faster with a mbaff sample and
0.1% slower with the cathedral sample, probably because the slow loop
filter code must be loaded into the code cache for each first MB of each
row but isnt used for the following MBs.

Originally committed as revision 21493 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-28 01:24:25 +00:00
Rafaël Carré
881b5b80da Fix svq3_* function declarations.
Patch by Rafaël Carré, rafael D carre A gmail

Originally committed as revision 21489 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 22:22:01 +00:00
Måns Rullgård
e3d8807315 SVQ1: 4-byte-align codebook tables
These tables are accessed as uint32 so they must be suitably aligned.

Originally committed as revision 21488 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 21:31:19 +00:00
Reimar Döffinger
7e2ef1b9e1 Fix possible crashes in mlp parser, it tries to go back 7 bytes after
finding the 4-byte signature.
Add a check that ignores the signature if we do not have enough previous
data to go back at least 7 bytes.

Originally committed as revision 21487 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 20:04:19 +00:00
Reimar Döffinger
d780511b94 Reduce log level of "Extracting .. channel downmix" to AV_LOG_DEBUG, the
message is pointless to ordinary users and is printed once per frame.

Originally committed as revision 21486 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 20:02:18 +00:00
Michael Niedermayer
9f72b23c5c Revert Revision: 21362
Log:
	Set CODEC_CAP_SUBFRAMES for adpcm decoders

	This makes ffmpeg stop printing millions of
	  Multiple frames in a packet from stream 0
	when decoding adpcm.
Reason: adpcm has no subframes, the flag does not belong there

Originally committed as revision 21481 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 13:30:05 +00:00
Michael Niedermayer
8670f84cf9 Update comment.
Originally committed as revision 21479 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 13:18:08 +00:00
Michael Niedermayer
e470ef7641 Use table to speedup access to non_zero_count in MBAFF with differing interlacing.
~4 cpu cycles speedup

Originally committed as revision 21474 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 11:14:29 +00:00
Stefano Sabatini
e8a9d01846 Fix misc typos, patch by
Fabian Greffrath base64_decode(PGZhYmlhbkBncmVmZnJhdGguY29tPg==).

Originally committed as revision 21473 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 00:31:52 +00:00
Michael Niedermayer
8652e44acd Simplify left_xy init
Originally committed as revision 21470 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-27 00:15:55 +00:00
Michael Niedermayer
599fe45b8d Split fill_caches() between loopfilter & decode, the 2 no longer where common
enough to justify the messy interleaving.

Originally committed as revision 21469 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 23:54:11 +00:00
Michael Niedermayer
16e5e39ab4 Optimize loop filtering of the left edge in MBAFF.
60 cpu cycles speedup

Originally committed as revision 21467 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 22:59:19 +00:00
Michael Niedermayer
dfe4dc154b use left_xy[1] in mbaff QP loop filter check, this improves the amount that can
be skiped.

Originally committed as revision 21465 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 20:28:58 +00:00
Michael Niedermayer
aebf31236e Optimize mv/ref cache init for left MB.
Originally committed as revision 21464 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 20:25:14 +00:00
Måns Rullgård
f2c694af28 Add UMULH()
This function/macro returns the high half of the unsigned 64-bit
product of two unsigned 32-bit operands.

Originally committed as revision 21463 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 18:05:55 +00:00
Loren Merritt
900479bb74 optimize h264_loop_filter_strength_mmx2
244->160 cycles on core2

Originally committed as revision 21462 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 17:17:48 +00:00
Michael Niedermayer
6548c939ec remove unneeded check
Originally committed as revision 21460 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 15:34:21 +00:00
Michael Niedermayer
18ea2f933c Use left_mb_xy from fill_caches instead of recalculating it.
Originally committed as revision 21459 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 14:57:53 +00:00
Michael Niedermayer
a715af8ff4 Simplify left_xy content for the loop filter, this also makes it closer to
what is needed and its faster too.

Originally committed as revision 21458 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 14:55:19 +00:00
Michael Niedermayer
d5c30c86d0 Simplify loop filter a little by using top/left_type.
Originally committed as revision 21457 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 13:39:26 +00:00
Michael Niedermayer
99344d4372 Set top & left types for deblock in fill_caches().
Originally committed as revision 21456 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 13:38:18 +00:00
Michael Niedermayer
aaa995d7f2 100l typo fix, mixed up +-1 forcing the loop filter skip to never skip.
Originally committed as revision 21455 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 13:30:33 +00:00
Michael Niedermayer
66472bcde0 cosmetic
Originally committed as revision 21454 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 13:28:55 +00:00
Michael Niedermayer
3046c25ec5 Fix qp_thres loop filter check for MBAFF.
Originally committed as revision 21453 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 13:27:22 +00:00
Michael Niedermayer
806ac67b51 Optimize mb neighbor initialization for MBAFF in fill_caches().
~10 cpu cycles speedup.

Originally committed as revision 21452 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 10:35:36 +00:00
Carl Eugen Hoyos
ddee80f384 Metasoft MJPEG codec has Cb and Cr swapped, fixes issue 1611.
Originally committed as revision 21451 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-26 10:30:24 +00:00
Michael Niedermayer
021dccba1f Fix heap overflow due to lack of nb_components check.
Originally committed as revision 21450 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-25 13:26:10 +00:00
Carl Eugen Hoyos
cc5d4f4c34 Release buffer when decoding is finished.
Originally committed as revision 21449 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-25 10:46:32 +00:00
Michael Niedermayer
2773920698 Optimize decode_cabac_field_decoding_flag().
~4 cpu cycles faster

Originally committed as revision 21447 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-25 02:44:34 +00:00
Alexander Strange
1e4f1c56d7 100l, correct wrong H.264+adaptive MBAFF decoding
Fixes several FATE tests.

Originally committed as revision 21445 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-25 01:56:13 +00:00
Alexander Strange
0b69d6254f H.264: Use 64-/128-bit write-combining macros for copies
2-3% faster decode on x86-32 core2.

Originally committed as revision 21440 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-25 00:30:44 +00:00
Justin Ruggles
008f872f61 Only check frame size if the header is valid.
Originally committed as revision 21439 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 23:55:33 +00:00
Carl Eugen Hoyos
b52fcba9cd Fix decoding ATI VCR2 codec, sample in
samples/V-codecs/ATI-VCR12/ATI/VCR2test.avi
Software decoding was broken since r8865, when two new context variables
were added, but not initialized in vcr2_init_sequence().
Another such context variable was added in r18381.

Originally committed as revision 21438 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 22:47:50 +00:00
Michael Niedermayer
996b099a0f Branchless setting of MB_TYPE_8x8DCT.
Not benchmarked as i failed to find a sample that uses this one. But it should be faster.

Originally committed as revision 21435 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 20:54:09 +00:00
Michael Niedermayer
81afcf1fae Remove cruft.
Originally committed as revision 21434 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 20:52:49 +00:00
Michael Niedermayer
d9ef0d2e14 Mark index as unsigend so gcc knows it doesnt need a sign extension on x86_64.
Any tips on how i can convince gcc that it doesnt need a
mov     %eax, %eax
in every get_bits() ?

Originally committed as revision 21433 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 19:19:09 +00:00
Michael Niedermayer
449d1442a6 a[b-1] -> (a-1)[b].
Helps gcc not to add seperate -1 instructions.

Originally committed as revision 21432 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 18:42:22 +00:00
Michael Niedermayer
7abc860323 Optimize suffix_length computation, 1 cpu cycle speedup.
Originally committed as revision 21431 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 18:23:46 +00:00
Michael Niedermayer
eeb1e92feb Simplify suffix_length computation, same speed.
Originally committed as revision 21430 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 18:18:08 +00:00
Michael Niedermayer
c78295ad1b Optimize level_code computation, 6cpu cycles speedup.
Originally committed as revision 21428 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 18:17:01 +00:00
Reimar Döffinger
0b882b4009 Fix crash in MLP decoder due to integer overflow.
Probably only DoS, init_get_bits sets buffer to NULL, thus causing a
NULL-dereference directly after.

Originally committed as revision 21426 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 18:07:29 +00:00
Michael Niedermayer
8ba436171f 1 cpu cycle faster suffix_length calculation.
Originally committed as revision 21425 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 18:05:02 +00:00
Laurent Aimar
f0f86627fe VC-1/WMV3 DXVA2 implementation
It allows VLD VC-1/WMV3 decoding using DXVA2 (GPU assisted decoding API under
VISTA and Windows 7).
 It is implemented by using AVHWAccel API.

Originally committed as revision 21424 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 17:27:00 +00:00
Michael Niedermayer
77d40dce93 Remove is_complex from loop_filter() its useless there in its current form.
Originally committed as revision 21423 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 17:02:44 +00:00
Laurent Aimar
34fecc9afd Added a few missing consts in dxva_h264.
Originally committed as revision 21422 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 16:40:58 +00:00
Laurent Aimar
0dc343d4cb Added a missing const to ff_h264_get_slice_type().
Originally committed as revision 21421 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 16:37:12 +00:00
Laurent Aimar
8880c8bcc3 Added missing const to get_bits_count().
Originally committed as revision 21419 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 16:22:09 +00:00
Michael Niedermayer
b2b7ab32aa Prefer cbp over cbp_table.
Originally committed as revision 21418 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 13:43:26 +00:00
Michael Niedermayer
50eb40a799 Remove all uses of slice_type* from the loop filter, also remove its
initialization befre the loop filter.

Originally committed as revision 21416 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-24 13:20:17 +00:00
Michael Niedermayer
2c0ee01866 Remove unneeded reset of non_zero_count_cache for deblock.
Originally committed as revision 21414 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 22:11:46 +00:00
Michael Niedermayer
01c511683f Remove useless things from the deblock side of fill_caches().
Originally committed as revision 21413 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 21:57:36 +00:00
Michael Niedermayer
ea3b456dd6 make mv_cache init 64bit where possible.
Originally committed as revision 21412 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 21:45:12 +00:00
Laurent Aimar
85167c46ef Moved reusable functions from dxva2_h264.c to dxva2.c
Originally committed as revision 21407 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 18:17:57 +00:00
Michael Niedermayer
0c32e19d58 Move +52 from the loop filter to the alpha/beta offsets in the context.
This should fix a segfault, also it might be faster on systems where the
+52 wasnt free.

Originally committed as revision 21406 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 18:05:30 +00:00
Reimar Döffinger
6231d0983b Release buffer when the codec is closed.
Originally committed as revision 21405 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 18:04:09 +00:00
Reimar Döffinger
b9e3f85dbc Use qstride = 0 and allocate only a single line for qscale_table since
for this codecs all quants are the same for a single frame.

Originally committed as revision 21404 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 18:01:38 +00:00
Laurent Aimar
e4833b5d71 Added ff_dxva2_ prefix to get_surface(_index) and commit_buffer functions.
Originally committed as revision 21403 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 18:01:28 +00:00
Laurent Aimar
8cf9bbb6dc Reindent the content of one if(){} in ff_dxva2_common_end_frame.
Originally committed as revision 21402 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 18:00:51 +00:00
Laurent Aimar
8db7ee09c3 Moved reusable code from dxva2_h264.c:end_frame to ff_dxva2_common_end_frame.
Originally committed as revision 21401 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 17:59:08 +00:00
Michael Niedermayer
1cc2d21175 Set edges based on cbp and mv partitioning, not just skiped MBs.
This is faster for videos that have lots of MBs that fall in this category.

Originally committed as revision 21400 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 15:28:34 +00:00
Reimar Döffinger
87ac0c0a39 Use AVPALETTE_COUNT instead of hard-coding 256.
This is consistent with other codecs and will also avoid a crash on the
memcpy to data[1] if AVPALETTE_SIZE ever increases.

Originally committed as revision 21399 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 15:22:48 +00:00
Reimar Döffinger
ab8075a2da Remove redundant initialization of the palette, it is part of the context
and that one is always 0-initialized already.

Originally committed as revision 21398 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 15:19:34 +00:00
Michael Niedermayer
6b3661b22d Optimize filter_mb_mbaff_edge*()
Originally committed as revision 21397 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 14:50:56 +00:00
Michael Niedermayer
933bea77e5 Optmize 8x8dct check used to skip some borders in the loop filter.
4 cpu cycles faster.

Originally committed as revision 21396 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 13:54:02 +00:00
Reimar Döffinger
6242b1c424 Use av_freep intead of av_free to free pointers in vp56 context.
Originally committed as revision 21395 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 13:49:09 +00:00
Reimar Döffinger
48c65d0dc9 Zero the frame data on allocation for VB codec, e.g. the FATE sample seems to
rely on this.

Originally committed as revision 21394 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 10:25:22 +00:00
Daniel Verkamp
a7e6328cba Export wma_critical_freqs as ff_wma_critical_freqs
Originally committed as revision 21391 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-23 08:39:50 +00:00
Reimar Döffinger
e62a55b92e The SSSE3 version of dct_quantize in mpegvideo_mmx_template.c needs
inv_zigzag_direct16 16-byte aligned, so mark it appropriately.
Fixes encoder crashes e.g. with MPlayer's -vf lavc.

Originally committed as revision 21389 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-22 23:40:18 +00:00
Alex Converse
3deb53849e Implement an sse version of scalarproduct_float().
Originally committed as revision 21386 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-22 23:07:58 +00:00
Kostya Shishkov
57835fc1ae Check for chunk boundaries when decoding VB codec data
Originally committed as revision 21385 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-22 19:07:44 +00:00
Kostya Shishkov
2727649677 Zero palette in case not all entries are initialized later
Originally committed as revision 21384 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-22 18:28:41 +00:00
Måns Rullgård
c67278098d Move array specifiers outside DECLARE_ALIGNED() invocations
Originally committed as revision 21377 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-22 03:25:11 +00:00
Michael Niedermayer
258b60c224 Gcc idiocy fixes related to filter_mb_edge*.
Change order of operands as gcc uses a hardcoded register per operand it seems
even for static functions
thus reducing unneeded moved (now functions try to pass the same argument in
the same spot).
Change signed int to unsigned int for array indexes as signed requires signed
extension while unsigned is free.
move the +52 up and merge it where it will end as a lea instruction, gcc always
splits the 52 out there turning the free +52 into an expensive one otherwise.
The changed code becomes a little faster.

Originally committed as revision 21375 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-22 01:59:17 +00:00
Michael Niedermayer
1f445f5473 Move dquant check into qscale overflow check.
This should be faster (couldnt meassue a difference), and its less picky
on slightly out of spec dquant.

Originally committed as revision 21373 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-21 21:01:26 +00:00
Michael Niedermayer
31f6e3c19e Make calculation of mask_edge free of branches, faster of course but probably
little effect overall as this is not that often executed.

Originally committed as revision 21366 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-21 16:50:31 +00:00
Michael Niedermayer
e9e949cf74 Clarify CODEC_CAP_SUBFRAMES.
Originally committed as revision 21364 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-21 13:49:47 +00:00
Måns Rullgård
2a58e45724 Set CODEC_CAP_SUBFRAMES for adpcm decoders
This makes ffmpeg stop printing millions of
  Multiple frames in a packet from stream 0
when decoding adpcm.

Originally committed as revision 21362 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-21 12:57:24 +00:00
David Conrad
1f630b9717 Use two separate memory arguments since 8+() is invalid gas syntax
Originally committed as revision 21360 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-21 09:46:57 +00:00
Måns Rullgård
68cf92ee5e Always call avcodec_thread_init()
The various avcodec_thread_init() functions are updated to return
immediately after setting avctx->thread_count.  This allows -threads 0
to pass through to codecs.  It also simplifies the usage for apps
using libavcodec.

Originally committed as revision 21358 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 22:55:50 +00:00
Michael Niedermayer
b4c2ada528 Attempt to fix asm compilation failure.
Only tested on gcc 4 & x86_64.

Originally committed as revision 21355 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 19:23:19 +00:00
Laurent Aimar
92c6a099ba H264 DXVA2 implementation
It allows VLD H264 decoding using DXVA2 (GPU assisted decoding API under
VISTA and Windows 7).
 It is implemented by using AVHWAccel API. It has been tested successfully
for some time in VLC using an nvidia card on Windows 7.

 To compile it, you need to have the system header dxva2api.h (either from
microsoft or using http://downloads.videolan.org/pub/videolan/testing/contrib/dxva2api.h)
 The generated libavcodec.dll does not depend directly on any new lib as
the necessary objects are given by the application using FFmpeg.

Originally committed as revision 21353 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 18:54:51 +00:00
Måns Rullgård
5e7dfb7de1 Move COPY3_IF_LT to lavc/mathops.h
This obscure macro is only used in motion_est.c so having it in lavc
makes more sense.  See discussion here:
http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-November/056561.html

Originally committed as revision 21346 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 06:01:54 +00:00
Alexander Strange
bec358d683 H.264: Declare bS with DECLARE_ALIGNED_8 for uint64_t casts.
Originally committed as revision 21345 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 03:28:57 +00:00
Michael Niedermayer
97775235ec Simplify/Optimize another of the mbaff loop filter cases.
Its faster but too rarely used to make a differnce.

Originally committed as revision 21344 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 03:00:08 +00:00
Michael Niedermayer
085d9d98e8 Only calculate the second chroma qp if it differs from the firstin the main
loop filter. (a little faster for the common case where they are equal)

Originally committed as revision 21342 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 01:49:24 +00:00
Michael Niedermayer
948180e7b1 Set bS with 64bits at a time.
Originally committed as revision 21341 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 01:38:32 +00:00
Michael Niedermayer
87df989ee3 Merge multiple IS_* macro uses where possible.
Originally committed as revision 21340 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 01:15:30 +00:00
Michael Niedermayer
55c54371c4 Simplify and optimize intra code in h264_loopfilter.c
Originally committed as revision 21339 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 00:44:03 +00:00
Vitor Sessak
7f3f5f46c2 Floating point discrete cosine transform
Originally committed as revision 21338 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 00:39:47 +00:00
David Conrad
c4f2b6dce3 Use constant offsets for memory operands since gcc is unable to
This fixes gcc failing to fit 6 memory locations into 7 registers on x86-32

Originally committed as revision 21337 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 00:34:10 +00:00
Michael Niedermayer
9528ce7b99 Sightly simplify initialization of int start.
No real speed change.

Originally committed as revision 21336 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-20 00:17:16 +00:00
Michael Niedermayer
3f50965b28 Mark the h264 c loop filter as av_always_inline av_flatten to make sure its
all inlined, its small and horizontal & vertical versions are build out of
them. no change as gcc already did this.

Originally committed as revision 21333 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 22:54:13 +00:00
Michael Niedermayer
c9640c17ac skip outer pixels if possible in h264_loop_filter_luma_c().
overall 3.7% faster loop filtering (C version only)

Originally committed as revision 21332 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 22:46:58 +00:00
Michael Niedermayer
655a1d57d5 Reenable ff_h264_filter_mb_fast() for all slices it supported before.
Originally committed as revision 21328 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 16:43:57 +00:00
Michael Niedermayer
9ac4548ff7 Fix h264_loop_filter_strength_mmx2() so it works with b frames.
Originally committed as revision 21327 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 16:40:36 +00:00
Michael Niedermayer
ebddd2e253 Remove -2 -> -1 remapping, its not needed anymore as we must remap all
references per LUT anyway.

Originally committed as revision 21323 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 14:28:19 +00:00
Jason Garrett-Glaser
76d81909ae Update libx264.c to use new libx264 features
With b_keyframe instead of IDR for detecting keyframes, ffmpeg should now
support periodic encoding with periodic intra refresh (although there is no
interface option for it yet).
Set the new timebase values for full VFR input support.
Bump configure to check for API version 83.

Originally committed as revision 21317 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 04:00:08 +00:00
Jai Menon
7817ddabc8 Apply changes made in r21308 to svq3.c.
Fixes compilation with gcc and -O0.

Originally committed as revision 21316 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 03:16:48 +00:00
Michael Niedermayer
c2894fbf1c Dont waste time initializing stuff for deblocking intra mbs, none of
it is used.

Originally committed as revision 21315 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 03:14:45 +00:00
Michael Niedermayer
580920f8dc Remove 2 checks from fetch_diagonal_mv() that apparently serve no purpose.
Originally committed as revision 21314 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 02:28:26 +00:00
Michael Niedermayer
26c83a4161 Move a few things into a deeper if() in fetch_diagonal_mv().
Originally committed as revision 21313 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 02:07:12 +00:00
Michael Niedermayer
350fc614b4 Remove code that handles the case of a MB pair to our right being available.
Thats not possible except maybe in FMO which noone uses anyway.
iam also not sure if this wasnt missing a part_width.

Originally committed as revision 21312 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-19 01:23:19 +00:00
Michael Niedermayer
7231ccf4d5 Cosmetic, get rid of &x[0]
Originally committed as revision 21309 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 23:55:19 +00:00
Michael Niedermayer
2b3649f656 Fix compilation with -O0.
Originally committed as revision 21308 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 23:41:12 +00:00
Michael Niedermayer
7a93858a6d Fix accumulated indention errors.
Originally committed as revision 21307 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 23:34:37 +00:00
Michael Niedermayer
70bd7a3d48 Optimize top non_zero_count_cache init.
Originally committed as revision 21306 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 23:31:14 +00:00
Michael Niedermayer
5e07aa7721 Dont init chroma elements of non_zero_count_cache for deblock.
Originally committed as revision 21305 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 23:30:21 +00:00
Michael Niedermayer
5cc5d9bf29 Remove unneeded for_deblock check, this code was alraedy under for_deblock.
Originally committed as revision 21304 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 23:27:53 +00:00
Michael Niedermayer
bffe82f504 Rather call filter_mb_mbaff_edge*v() more often than do extra calculations
in the innerst loop. ~150 cpu cycles faster

Originally committed as revision 21299 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 21:22:09 +00:00
Michael Niedermayer
fb823b7791 Fix 10l segfault with threads.
Originally committed as revision 21293 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 20:19:19 +00:00
Michael Niedermayer
0fe674cb4a Use h->slice_num where possible.
Originally committed as revision 21292 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 20:13:53 +00:00
Michael Niedermayer
bce6a1e7c7 Enable filter_mb_fast for CAVLC P slices.
Originally committed as revision 21291 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 19:45:56 +00:00
Michael Niedermayer
439d6b1dcf filter_mb_fast needs cbp_table to be set.
Originally committed as revision 21290 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 19:45:02 +00:00
Michael Niedermayer
42ebca8551 PAFF CABAC P slices seem to work as well, so enable them for ff_h264_filter_mb_fast() too.
Originally committed as revision 21289 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 16:29:16 +00:00
Michael Niedermayer
a8f4921595 Reenable filter_mb_fast for I slices and progressive CABAC P slices.
Originally committed as revision 21288 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 16:16:22 +00:00
Michael Niedermayer
a7d7cdaac7 Set h->cbp for ff_h264_filter_mb_fast().
Originally committed as revision 21287 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 16:11:13 +00:00
Michael Niedermayer
9327042c17 10l for someone, Store chroma_qp_diff in the correct struct.
Originally committed as revision 21286 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 14:05:30 +00:00
Gwenole Beauchesne
054947cafd Install <libavcodec/vaapi.h> header.
Originally committed as revision 21285 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 13:52:20 +00:00
Michael Niedermayer
b6ef858ec7 Move CAVLC 8x8 DCT special case from ff_h264_filter_mb() to fill_caches
that way it is also available for ff_h264_filter_mb_fast().

Originally committed as revision 21283 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 13:09:53 +00:00
Michael Niedermayer
6d7e6b2657 Perform reference remapping at fill_cache() time instead of in the
loop filter. This removes one obstacle of getting ff_h264_filter_mb_fast()
bitexact. code is maybe 0.1% faster

Originally committed as revision 21280 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 05:15:31 +00:00
Michael Niedermayer
7da0d82104 Make qp check for loop filter skiping also work with MBAFF.
Originally committed as revision 21276 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 00:34:28 +00:00
Michael Niedermayer
12be38ec18 Comment about a cornercase we ignore currently
Originally committed as revision 21275 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 00:21:58 +00:00
Michael Niedermayer
44a5e7b64c Move the qp check to skip the loop filter up.
Originally committed as revision 21274 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-18 00:20:44 +00:00
Michael Niedermayer
b6303e6d2a Reorganize how values are stored in h->non_zero_count.
~1% faster

Originally committed as revision 21273 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-17 23:44:23 +00:00
Michael Niedermayer
2911e13224 Disable a few things in fill_filter_caches() that arent needed.
0.1% speedup

Originally committed as revision 21272 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-17 22:05:36 +00:00
Michael Niedermayer
f432b43b08 Split fill_caches() between filter and decoder.
Originally committed as revision 21271 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-17 21:43:08 +00:00
Michael Niedermayer
c988f97566 Rearchitecturing the stiched up goose part 1
Run loop filter per row instead of per MB, this also should make it
much easier to switch to per frame filtering and also doing so in a
seperate thread in the future if some volunteer wants to try.
Overall decoding speedup of 1.7% (single thread on pentium dual / cathedral sample)
This change also allows some optimizations to be tried that would not have
been possible before.

Originally committed as revision 21270 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-17 20:35:55 +00:00
Alexander Strange
0209e1e160 Add missing Makefile dependencies to CONFIG_SNOW_ENCODER.
Fixes build with --disable-encoders --enable-encoder=snow.
This fixes MPlayer build with --disable-mencoder.

Originally committed as revision 21259 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-17 08:24:45 +00:00
Michael Niedermayer
7931bb2a0c Comment for() ; out
~200 bytes smaller ff_h264_filter_mb()
please everyone, NEVER add code with the assumtation that gcc will remove it
without checking gcc actually does. Chances are it does not.

Originally committed as revision 21251 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 17:41:40 +00:00
Michael Niedermayer
ed3d7e2f65 Mark a few functions as noinline, this makes ff_h264_filter_mb() a bit smaller
and 5% faster.
ff_h264_filter_mb_fast() stay the same size as gcc decided not to inline these
functions there in the first place.

Originally committed as revision 21250 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 17:27:17 +00:00
Michael Niedermayer
183a86c958 Apply last 2 optimizations to similar code i forgot.
Originally committed as revision 21249 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 16:21:12 +00:00
Michael Niedermayer
3f55a651c4 Another microopt, 4 cpu cycles for avoidance of FFABS().
Originally committed as revision 21248 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 16:14:32 +00:00
Måns Rullgård
1c6f46be03 Add missing guards and includes to arm/aac.h
Originally committed as revision 21247 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 15:54:01 +00:00
Michael Niedermayer
26147d368b Minor (2 cpu cycles) optimization ||->|.
Originally committed as revision 21246 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 15:19:05 +00:00
ami_stuff
8be7ac98ca Support decoding of SoftLab-NSK VideoTizer.
Patch by ami_stuff, ami_stuff o2 pl

Originally committed as revision 21245 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 13:13:49 +00:00
Michael Niedermayer
4c568cbcac Consider slice_beta_offet in qp_thresh.
Originally committed as revision 21244 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 13:12:11 +00:00
Michael Niedermayer
2e36c931f0 Avoid wasting 4 cpu cycles per MB in redundantly calculating qp_thresh.
Originally committed as revision 21243 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 11:55:35 +00:00
Carl Eugen Hoyos
864a074213 Correctly decode some Avid AV1x samples, fixes issue 1684.
Originally committed as revision 21241 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 10:46:45 +00:00
Anatoly Nenashev
e1bb0364f8 Support lowres 3 when decoding MPEG video.
Patch by Anatoliy Nenashev, nenashev_as mail ru

Originally committed as revision 21239 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 10:41:52 +00:00
Michael Niedermayer
ddd60f28d8 Replace cabac checks in inline functions from h264.h with constants.
No benchmark because its just replacing variables with litteral constants
(so no risk for slowdown outside gcc silliness) and i need sleep.

Originally committed as revision 21237 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 05:41:33 +00:00
Måns Rullgård
a482e61bd6 Add symbol versioning for shared libraries
Based on patch by Reinhard Tartler <siretart tauware de>

Originally committed as revision 21236 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 04:49:02 +00:00
Vitor Sessak
d140b02581 SIPR16k decoder
Originally committed as revision 21234 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 03:54:55 +00:00
Vitor Sessak
d79c06b2ad Allow a SIPR table to be used by the upcoming SIPR16k decoder
Originally committed as revision 21233 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 03:44:17 +00:00
Vitor Sessak
65323ed279 Split some SIPR structs to a header file for the upcoming SIPR16k commit
Originally committed as revision 21232 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 03:40:25 +00:00
ami_stuff
a4be782cbd Support 2Vuy in mov, fixes issue 1690.
Patch by ami_stuff, ami_stuff o2 pl

Originally committed as revision 21230 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-16 00:32:09 +00:00
Måns Rullgård
2b9cb7ec71 Fix out of tree build with hardcoded tables
Originally committed as revision 21228 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 20:48:34 +00:00
Måns Rullgård
d356a53f44 AAC: optimise bitstream reading in decode_spectrum_and_dequant()
Using the low-level macros directly avoids redundant open/update/close
cycles.

2-3% faster on ARM, PPC, and Core i7.

Originally committed as revision 21224 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 14:02:52 +00:00
Carl Eugen Hoyos
59ea69ef54 Support decoding of Avid uncompressed mov files, fixes issue 1685.
Originally committed as revision 21223 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 11:03:40 +00:00
Carl Eugen Hoyos
a0ae3e41f3 Support decoding Avid 1:1x codec, (partially) fixes issue1684.
Originally committed as revision 21222 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 10:55:31 +00:00
Michael Niedermayer
7c2de274e7 Add forgotten include of h264_mvpred.h to h264.h.
This could have caused the linking failure of pred_pskip_motion() missing if
a compiler included never used static functions.

Originally committed as revision 21221 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 03:42:56 +00:00
Michael Niedermayer
e2dd8586d8 Add forgotton multiple inclusion guards to h264_mvpred.h.
Originally committed as revision 21220 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 03:41:28 +00:00
Måns Rullgård
798339fb46 AAC: ARM/NEON asm for VMUL2/4 functions
Originally committed as revision 21219 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 02:58:24 +00:00
Carl Eugen Hoyos
c78dfcdaf4 Do not assign codec_tag to pix_fmt in rawdec.c, but in raw.c
Originally committed as revision 21218 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-15 00:45:47 +00:00
Reimar Döffinger
29b75f0b67 Change code so it uses 2 adds instead of one FFABS.
About 1% faster ff_ac3_bit_alloc_calc_psd on Intel Atom, overall speedup
not measurable though.
Should have a bigger effect on systems without cmov or with very slow cmov.

Originally committed as revision 21214 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-14 17:50:33 +00:00
Alexander Strange
f267d3ac75 Implement alpha channel decoding for BGR HuffYUV.
Since BGR24 is decoded as BGR32, fill its alpha channel with 255
using the appropriate predictors.

Originally committed as revision 21211 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-14 01:32:49 +00:00
Måns Rullgård
2ef21b9179 AAC: Reduce depth of vlc_spectral tables to 2
Up to 6% faster overall on i7, no change on A8.

Originally committed as revision 21191 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 16:46:39 +00:00
Måns Rullgård
95dff4aced AAC: Unswitch loop over window groups in decode_spectrum_and_dequant()
GCC should be able to do this, but doesn't.  Slightly faster code.

Originally committed as revision 21190 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 16:46:35 +00:00
Måns Rullgård
05f9d8fcaa AAC: simplify some calculations in decode_spectrum_and_dequant()
Simplify cur_band_type, group_len, and coef/offset calculations.  This
makes the code easier to read and slightly faster.

Originally committed as revision 21189 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 16:46:32 +00:00
Måns Rullgård
c816d3d042 AAC: Compress codebook tables and optimise sign bit handling
The codebooks each consist of small number of values repeated in
groups of 2 or 4.  Storing the codebooks as a packed list of 2- or
4-bit indexes into a table reduces their size substantially (from 7.5k
to 1.5k), resulting in less cache pressure.

For the band types with sign bits in the bitstream, storing the number
and position of non-zero codebook values using a few bits avoids
multiple get_bits() calls and floating-point comparisons which gcc
handles miserably.

Some float/int type punning also avoids gcc brain damage.

Overall speedup 20-35% on Cortex-A8, 20% on Core i7.

Originally committed as revision 21188 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 16:46:28 +00:00
Vitor Sessak
ef5e7fb253 Remove needless use of log2f()
Originally committed as revision 21185 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 04:35:19 +00:00
Vitor Sessak
1c3c129b8f Remove the struct SiprModeParam of the context. This will simplify splitting
the file for future 16k mode decoder code.

Originally committed as revision 21184 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 04:29:55 +00:00
Måns Rullgård
f3da24c4c3 SIPR: kill variable-length arrays
Two of these are in fact constant size, so use the constant instead of
a variable in the declarations.  The remaining one is small enough
that always using the maximum size is acceptable.

Originally committed as revision 21183 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 03:11:02 +00:00
Michael Niedermayer
0cd73b6c30 remove unused variable
Originally committed as revision 21182 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 02:44:38 +00:00
Michael Niedermayer
cc51b28299 Split cabac decoding code out of h264.c.
not slower according to benchmarks.

Originally committed as revision 21181 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 02:35:36 +00:00
Michael Niedermayer
8e71d89a7b Move golomb_to_int*cbp tables back to h264_data.h as svq3.c used them.
Yes i did compile&test, no svq3.c was not recompiled.

Originally committed as revision 21180 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 02:17:16 +00:00
Zuxy Meng
0752cd39d2 More av_cold for infrequently called functions.
Originally committed as revision 21179 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 02:16:00 +00:00
Michael Niedermayer
e1e949026e Split cavlc out of h264.c.
Seems to speed the code up a little...
The placement of many generic functions between h264.c and h264.h is still open
Currently they are a little randomly placed between them.

Originally committed as revision 21178 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-13 01:59:19 +00:00
Reimar Döffinger
1460c79097 Use MULH instead of 64x64 multiplication, around 5% overall speedup on Intel Atom.
Patch by myself and Yuriy Kaminskiy [yumkam mail ru]

Originally committed as revision 21175 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 23:02:07 +00:00
Michael Niedermayer
188d3c510d Split motion vector prediction off h264.c/h.
Originally committed as revision 21174 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 21:36:26 +00:00
Michael Niedermayer
2bedc0e854 Move check_intra4x4_pred_mode() back from h264.h to h264.c, the function is just
called once per MB in worst case and doesnt seem to benefit from static inline.
Actually the code might be a hair faster now (0.1% according to my benchmark but
this could be random noise)

Originally committed as revision 21173 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 21:17:26 +00:00
Michael Niedermayer
ea6f00c448 Split all the reference picture handling off h264.c.
Originally committed as revision 21172 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 20:59:00 +00:00
Thilo Borgmann
099809d19b Reindent after last commit.
Originally committed as revision 21171 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 20:37:56 +00:00
Thilo Borgmann
ff9ea0b7cc Replace variable length array with an allocated buffer
in the context to increase compatibility.

Originally committed as revision 21170 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 20:35:22 +00:00
Michael Niedermayer
889fce8e30 Split (picture|seq) parameter set decoding out of h264.c.
no speedloss meassured, also its really not touching anything that is speed relevant.

Originally committed as revision 21169 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 19:33:45 +00:00
Michael Niedermayer
9c09546352 Split SEI code off h264.c.
Originally committed as revision 21168 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 18:54:40 +00:00
Michael Niedermayer
943f69a6ea Split direct mode (macro)block decoding off h264.c.
No speedloss meassured (its slightly faster here but that may be random fluctuations)

Originally committed as revision 21165 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 14:32:58 +00:00
Michael Niedermayer
9514a0841a Align mb_bit_buffer and vs_bit_buffer as their alignment is checked by assert().
Originally committed as revision 21164 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 13:54:35 +00:00
Zuxy Meng
a7494872d5 Reduce stack usage in svq1_encode_plane(). Reuse context scratch buffer
instead.  Avoid a crash on MinGW.

Originally committed as revision 21162 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 09:13:32 +00:00
Michael Niedermayer
082cf97106 Split h264 loop filter off h264.c.
No meassureable speed difference on pentium dual & cathedral sample.

Originally committed as revision 21159 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 06:01:55 +00:00
Michael Niedermayer
419276c50d Move svq3.o to the correct spot.
Originally committed as revision 21158 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 05:34:10 +00:00
Michael Niedermayer
903d58f631 Get rid of #include "svq3.c"
functions called more than per mb are moved into the header, scan8 is also
as it must be known at compiletime.
The code after this patch duplicates h264data.h, this has been done to minimize
the changes in this step and allow more fine grained benchmarking.
Speedwise this is 1% faster on my pentium dual core with diegos cursed cathedral
sample.

Originally committed as revision 21157 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 05:30:31 +00:00
Michael Niedermayer
a683681336 Better title for the file.
Originally committed as revision 21156 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 04:49:18 +00:00
Carl Eugen Hoyos
0941ee0fa6 Support uncompressed ("Resolution 1:1") Avid AVI Codec, (partially) fixes issue 1474.
Originally committed as revision 21154 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-12 00:29:26 +00:00
Måns Rullgård
dc0d86face AAC: use table for cbrtf(n)*n
The maximum length of escape_sequence is 21 bits, so adjust limit in
code to match this.

Up to 10% faster on Cortex-A8.

Originally committed as revision 21153 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 20:21:26 +00:00
Måns Rullgård
7c8af53f87 AAC: escape_sequence is 21 bits max
The maximum length of escape_sequence is 21 bits, so adjust limit in
code to match this.  Also fix the comment.

Originally committed as revision 21151 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 18:02:00 +00:00
Alex Converse
c460833d76 fft-test: Add RDFT/IRDFT support.
Originally committed as revision 21141 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 16:41:03 +00:00
Alex Converse
5b37ef8e43 fft-test: Replace do_mdct with a tf_transform enum and switch on it.
Originally committed as revision 21140 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 16:40:01 +00:00