Commit Graph

12510 Commits

Author SHA1 Message Date
Ramiro Polla ac19f4a3e8 indent
Originally committed as revision 25598 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 18:31:30 +00:00
Ramiro Polla cae05859e1 h264dsp: merge some more asm blocks
Originally committed as revision 25597 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 18:22:21 +00:00
Michael Niedermayer a0e7079a20 Fix 10l leak in ffv1.
Originally committed as revision 25595 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 12:15:50 +00:00
Michael Niedermayer 73cbf86830 Try to find a bit better initial states in ffv1 2pass.
Difference in filesizes to foreman ffv1 version=2, context=1 coder=1
18637016 adv-pass2-g300.avi
18638806 adv-pass1-g300.avi
18640534 ref-pass2-g300.avi
18918214 adv-pass2-g1.avi
18982048 ref-pass2-g1.avi
21516230 adv-pass1-g1.avi

Originally committed as revision 25594 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 12:15:47 +00:00
Michael Niedermayer 0ae0faa7c0 Keep track of how many slices*gops where encoded in ffv1 2 pass.
Originally committed as revision 25593 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 12:15:44 +00:00
Michael Niedermayer 3f0671a2d3 factorize variable declaration in ffv1.
Originally committed as revision 25592 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-28 12:15:40 +00:00
Jason Garrett-Glaser 3dde66752d Fix crashes in vorbis decoding found by zzuf
Fixes issue 2322.

Originally committed as revision 25591 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-27 16:30:01 +00:00
Nathan Caldwell c8dcb9dee1 aacenc: Remove energy 'normalization' modification from the 3GPP psymodel
This greatly improves bitrate handling. You will now get within a few
kbps of your requested bitrate instead of 20-40kbps higher.

There is absolutely no analog to this line in the 3GPP spec, that I
can find.

patch by Nathan Caldwell saintdev (at) gmail

Originally committed as revision 25589 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-27 06:36:47 +00:00
Nathan Caldwell 4df5aebb81 aacenc: Fix threshold-in-quiet calculation in the 3GPP psymodel.
Removing the modification vastly improves quality (at a slight bitrate
cost) for some samples. castanets.wav is a good example. The closest
equivalent I see to the modification in the 3GPP spec is a similar
modification (over a specific frequency range) when TNS is used.

This also changes the threshold-in-quiet calculation to match the
3GPP spec.

patch by Nathan Caldwell saintdev (at) gmail

Originally committed as revision 25588 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-27 05:54:44 +00:00
Nathan Caldwell eafadadaf5 aacenc: Fix the conditions under which 3GPP pre-echo control is run.
According to the 3GPP spec:
"Thus the pre-echo control is inactive for the first short window (but
not all short windows in a short frame) after a start block and for
all frames with a stop window sequence."

Currently, pre-echo control is only run when the current frame is not
a short frame, and the previous frame is not a short frame.

patch by Nathan Caldwell saintdev (at) gmail

Originally committed as revision 25587 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-27 05:54:41 +00:00
Michael Niedermayer b7b5bccb8d FFV1 initial state 2pass code.
Originally committed as revision 25584 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:01:17 +00:00
Michael Niedermayer 28a3f525c9 Read & write initial_states for ffv1
Originally committed as revision 25583 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:01:14 +00:00
Michael Niedermayer 99a5e93526 Add initial_states array to ffv1.
Originally committed as revision 25582 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:01:11 +00:00
Michael Niedermayer 672e7e391a Add rc_stat2 to ffv1 this will be needed for finding good initial contexts in 2 pass mode.
Originally committed as revision 25581 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:01:07 +00:00
Michael Niedermayer 19721b23e3 Optimize state initialization in ffv1 clear_state().
Originally committed as revision 25580 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:01:04 +00:00
Michael Niedermayer c42c1007c7 Only allocate stats_out when needed in ffv1
Originally committed as revision 25579 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:01:00 +00:00
Michael Niedermayer 2a317c6be4 Factorize litteral constents in ffv1 into STATS_OUT_SIZE.
Originally committed as revision 25578 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:00:57 +00:00
Michael Niedermayer 349d72870f Make 1pass statistic collection in ffv1 put_symbol_inline() conditional to avoid slowdown when more statistic collection code is added.
Originally committed as revision 25577 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 23:00:49 +00:00
Jason Garrett-Glaser 9d777508fa Remove dead code in theora_decode_tables
Reading 7 bits as an unsigned int can't result in a value exceeding 127.
Accordingly, remove error message (as it'll never be reached).

Originally committed as revision 25575 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 07:37:51 +00:00
Jason Garrett-Glaser 10f6915814 Reindent after r25573
Originally committed as revision 25574 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 07:30:01 +00:00
Jason Garrett-Glaser 1a48a57071 Fix Theora decoding bug if loopfilter is completely disabled
Bug caused by the fact that get_bits(gb, 0) is undefined.
Doesn't affect any streams generated by the official Theora encoder, but such
streams are nevertheless valid.

Fixes decoding of CELT-933dd833-nmr-bandt.ogv.

Originally committed as revision 25573 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 07:29:00 +00:00
Jason Garrett-Glaser 313b52fbff Clean up ALACdec
Do decode init in the init function instead of at the first frame.
Fix some possible crash cases.

Originally committed as revision 25572 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 07:20:51 +00:00
Michael Niedermayer fc3128c9d5 Increase ffv1 encoding speed from 65 to 80 fps by forcing some inlining.
Originally committed as revision 25571 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 01:59:14 +00:00
Michael Niedermayer e1f51b8821 Add quant_table_index to ffv1 PlaneContext and use it instead of duplicating the currents implementation of calculating it.
Originally committed as revision 25570 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-26 01:59:03 +00:00
Ramiro Polla c6a908be58 dct32: mark xmm registers in clobber list in ff_dct32_float_sse()
Originally committed as revision 25569 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-25 20:29:29 +00:00
Ramiro Polla b32c9ca9a3 h264dsp: merge some asm blocks
Some code was initializing some xmm registers in one asm block and using them
in the following block, assuming they wouldn't be changed in between blocks.

Originally committed as revision 25568 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-25 18:02:02 +00:00
Nicolas George 3ab354d777 Make libx264 take the pict_type input parameter into account,
thus making forced key frames work.

Patch by Nicolas George, nicolas d george a normalesup d org

Originally committed as revision 25567 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-25 14:40:00 +00:00
Nathan Caldwell 276df9d821 aacenc: Fix bug in LAME windowing where only one channel got initalized
I used the same loop counter for the inner and outer initalization loops.
This caused initalization to only run for the first channel. This in turn lead
to any channel other than the first using only short blocks.

Patch by Nathan Caldwell, saintdev at gmail

Originally committed as revision 25566 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-25 06:15:21 +00:00
Michael Niedermayer ce3716bf05 Move ffv1 state transition table sorting to its own function.
Originally committed as revision 25563 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-24 16:55:42 +00:00
Michael Niedermayer 19591033f7 Fix the case with swaping states 127 and 129 in ffv1
Originally committed as revision 25562 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-24 12:35:42 +00:00
Michael Niedermayer 98d2f7a47f Optimize state transition table sorting in ffv1
Originally committed as revision 25561 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-10-24 12:31:12 +00:00
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