Commit Graph

956 Commits

Author SHA1 Message Date
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Reinhard Tartler
7ffe76e540 Merge libavcore into libavutil
Done to keep ABI compatible. Otherwise this is just silly
2011-02-16 23:00:30 +01:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Janne Grunau
154f7bb062 h264: define FF_PROFILE_H264_HIGH_444 to the correct value
It was removed in fe9a3fb since it had the wrong value. Add profile name
for it.
(cherry picked from commit 440b61691d)
2011-02-09 03:33:54 +01:00
Janne Grunau
440b61691d h264: define FF_PROFILE_H264_HIGH_444 to the correct value
It was removed in fe9a3fb since it had the wrong value. Add profile name
for it.
2011-02-08 13:20:56 +01:00
Anssi Hannula
45eaec3029 h264: add profile names for the existing defines
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 71e0bee9ea)
2011-02-02 03:40:50 +01:00
Janne Grunau
94e3e83f13 h264: Add Intra and Constrained Baseline profiles to avctx.profile
(cherry picked from commit fe9a3fbe42)
2011-02-02 03:40:50 +01:00
Anssi Hannula
71e0bee9ea h264: add profile names for the existing defines
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-02-01 20:37:02 +01:00
Janne Grunau
fe9a3fbe42 h264: Add Intra and Constrained Baseline profiles to avctx.profile 2011-02-01 20:37:02 +01:00
Ronald S. Bultje
d23e3e5fea Move ff_emulated_edge_mc() into DSPContext.
(cherry picked from commit 2e27959879)
2011-01-30 03:41:01 +01:00
Ronald S. Bultje
2e27959879 Move ff_emulated_edge_mc() into DSPContext. 2011-01-28 22:13:26 -05:00
Diego Elio Pettenò
e7e2df27f8 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit d36beb3f69)
2011-01-28 03:15:34 +01:00
Diego Elio Pettenò
d36beb3f69 Add ff_ prefix to data symbols of encoders, decoders, hwaccel, parsers, bsf.
None of these symbols should be accessed directly, so declare them as
hidden.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-26 16:08:45 +00:00
Diego Elio Pettenò
877937b382 Make ff_h264_find_frame_end static to h264.c; delete h264_parser.h
The header is empty after making the function static, so delete it and
drop its usage.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 13eb6b9097)
2011-01-26 03:43:32 +01:00
Diego Elio Pettenò
123241214c Make ff_h264_decode_rbsp_trailing static to h264.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 8529731961)
2011-01-26 03:43:31 +01:00
Diego Elio Pettenò
13eb6b9097 Make ff_h264_find_frame_end static to h264.c; delete h264_parser.h
The header is empty after making the function static, so delete it and
drop its usage.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 22:07:29 +01:00
Diego Elio Pettenò
8529731961 Make ff_h264_decode_rbsp_trailing static to h264.c
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-25 21:48:03 +01:00
Ronald S. Bultje
fb397b1a19 Reindent.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit fcb7e535dd)
2011-01-23 19:32:08 +01:00
Ronald S. Bultje
2ed0f76655 Fix crash on resolution change (issue 2393).
Don't free RBSP tables (containing decoded NAL units) on resolution
change, because we actually need this data to decode the frame after
reiniting (with new resolution). Fixed issue 2393.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
(cherry picked from commit 9107892624)
2011-01-23 19:32:08 +01:00
Alex Converse
d5ec00ba57 Remove H.264 encoder fragments
It's incomplete, no one is working on it, and when someone asks about
working on it we advise them not to.

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit ff3d43104f)
2011-01-23 19:32:08 +01:00
Ronald S. Bultje
fcb7e535dd Reindent.
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 18:22:03 +01:00
Ronald S. Bultje
9107892624 Fix crash on resolution change (issue 2393).
Don't free RBSP tables (containing decoded NAL units) on resolution
change, because we actually need this data to decode the frame after
reiniting (with new resolution). Fixed issue 2393.

Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-22 18:21:59 +01:00
Alex Converse
ff3d43104f Remove H.264 encoder fragments
It's incomplete, no one is working on it, and when someone asks about
working on it we advise them not to.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-01-22 16:15:53 +00:00
Ronald S. Bultje
772225c041 Revert 2a1f431d38, it broke H264 lossless.
(cherry picked from commit 66c6b5e2a5)
2011-01-21 20:36:01 +01:00
Ronald S. Bultje
66c6b5e2a5 Revert 2a1f431d38, it broke H264 lossless. 2011-01-20 17:24:44 -05:00
Jason Garrett-Glaser
2a1f431d38 H.264/SVQ3: make chroma DC work the same way as luma DC
No speed improvement, but necessary for some future stuff.
Also opens up the possibility of asm chroma dc idct/dequant.

Originally committed as revision 26349 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 01:10:46 +00:00
Jason Garrett-Glaser
290fabc684 Port SVQ3 to use the new mb_luma_dc method of storing luma DC coefficients.
Doesn't help speed as there isn't an asm implementation yet, but consistency
is a good thing.

Originally committed as revision 26348 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-15 00:41:18 +00:00
Jason Garrett-Glaser
65344775b8 H.264: Remove useless arg to chroma_dc_dequant_idct_c
Originally committed as revision 26345 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 23:46:55 +00:00
Jason Garrett-Glaser
2e18660115 Fix SVQ3
Regression in r26336-7.

Originally committed as revision 26341 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 22:23:42 +00:00
Jason Garrett-Glaser
0d1d01cf70 Reindent after r26337.
Originally committed as revision 26338 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 21:36:45 +00:00
Jason Garrett-Glaser
5657d14094 H.264: switch to x264-style tracking of luma/chroma DC NNZ
Useful so that we don't have to run the hierarchical DC iDCT if there aren't
any coefficients.  Opens up some future opportunities for optimization as well.

Originally committed as revision 26337 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 21:36:16 +00:00
Jason Garrett-Glaser
19fb234e4a H.264: split luma dc idct out and implement MMX/SSE2 versions
About 2.5x the speed.

NOTE: the way that the asm code handles large qmuls is a bit suboptimal.
If x264-style dequant was used (separate shift and qmul values), it might
be possible to get some extra speed.

Originally committed as revision 26336 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 21:34:25 +00:00
Jason Garrett-Glaser
ca32f7f208 H.264: eliminate non-transposed scantable support.
It was an ugly hack to begin with and didn't give any performance.

NOTE: this patch opens up some future simplifications to be made (such as
removing some of the scantables from H264Context) but doesn't take advantage
of them yet.

Originally committed as revision 26329 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-14 19:04:59 +00:00
Jason Garrett-Glaser
09fffe9bd4 H.264: fix grayscale decoding with explicit wpred
Originally committed as revision 26306 to svn://svn.ffmpeg.org/ffmpeg/trunk
2011-01-10 23:42:45 +00:00
Alexander Strange
0f01602362 SVQ3: Allow decoding if thread_count is > 1
svq3 still doesn't support multithreading, but it's simpler for clients if
they can enable threading for all codecs by default.

Originally committed as revision 26015 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-12-15 00:22:47 +00:00
Baptiste Coudurier
9d252137e5 In h264 decoder, fix decoding when nal end sequence is present
Originally committed as revision 25809 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-23 01:16:37 +00:00
Reimar Döffinger
00d1e96bf4 H.264 decode: support cropping up to 28 pixels in interlaced mode.
Contrary to progressive, just being able to crop up to 14/15 pixels
is not enough to encode all supported resolutions, and the new
behaviour is also consistent with e.g. MPEG-2 etc.

Originally committed as revision 25669 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-11-03 20:52:28 +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
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
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
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
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
Michael Niedermayer
3d5421201b Perform sliding window operation during frame gap handling.
This avoids some warnings about too many reference frames.

Originally committed as revision 24057 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-05 14:36:03 +00:00
Baptiste Coudurier
bb943bb8fc Give context to av_log
Originally committed as revision 24018 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-03 04:40:12 +00:00
Diego Biurrun
6da88bd389 Fix typo in Doxygen function parameter name.
Originally committed as revision 23983 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-02 11:54:34 +00:00
Måns Rullgård
49bd8e4b84 Fix grammar errors in documentation
Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-30 15:38:06 +00:00
Baptiste Coudurier
9ad7dfc110 Pass codec pixel format list to get_format, if present, fix vdpau decoding
Originally committed as revision 23396 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-31 22:01:31 +00:00
Baptiste Coudurier
0435fb16d7 In h264 decoder, use jpeg yuv pixel format when full range is set in vui
Originally committed as revision 23369 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-28 23:15:30 +00:00
Howard Chu
05e953193d Factorize ff_h264_decode_extradata().
Patch by Howard Chu, hyc highlandsun com

Originally committed as revision 23340 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-05-26 19:00:59 +00:00
Diego Biurrun
ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Gwenole Beauchesne
6752a3cc6c H.264: cosmetics (vertical align).
Originally committed as revision 22885 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-15 13:16:37 +00:00
Gwenole Beauchesne
fa37cf0db3 H.264: move avctx->{profile,level} init before AVCodecContext.get_format().
Originally committed as revision 22884 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-15 08:30:48 +00:00
Gwenole Beauchesne
b08e38e8c3 H.264: move avctx->refs init before AVCodecContext.get_format().
Originally committed as revision 22883 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-15 08:27:06 +00:00
Diego Biurrun
d02bb3ecf1 Move static function fill_filter_caches() from h264.h to h264.c.
The function is only used within that file, so it makes sense to place
it there. This fixes many warnings of the type:
h264.h:1170: warning: ‘fill_filter_caches’ defined but not used

Originally committed as revision 22876 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-13 22:15:49 +00:00
Alexander Strange
7a5c850be9 H264: Copy h264dsp when creating new slice threads
Fixes slice multithreading (broken in r22565)
Fixes issue1815

Originally committed as revision 22740 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-31 03:55:42 +00:00
Stefano Sabatini
72415b2adb Define AVMediaType enum, and use it instead of enum CodecType, which
is deprecated and will be dropped at the next major bump.

Originally committed as revision 22735 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 23:30:55 +00:00
Michael Niedermayer
1052b76f0f Fix implicit weight for b frames in mbaff.
Originally committed as revision 22733 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 21:05:11 +00:00
Stephen Warren
3bccd93ac0 Set VDPAU H264 picture parameter field_order_cnt and frame_num at the
start of decoding a picture instead of at the end.
Fixes mmco01.264

Patch by Stephen Warren

Originally committed as revision 22728 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-30 08:10:29 +00:00
Diego Biurrun
6f2c72c126 Remove unused variable, fixes the warning:
libavcodec/h264.c:1562: warning: unused variable `s'

Originally committed as revision 22647 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-23 17:55:08 +00:00
Janusz Krzysztofik
5388f0b479 Reinitialize the h264 decoder context on every valid aspect ratio
change, not only size changes.

Patch by Janusz Krzysztofik foo=zyszt <jkr$foo@tis.icnet.pl>.

Originally committed as revision 22597 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-18 23:36:54 +00:00
Måns Rullgård
4693b031a3 Move H264 dsputil functions into their own struct
This moves the H264-specific functions from DSPContext to the new
H264DSPContext.  The code is made conditional on CONFIG_H264DSP
which is set by the codecs requiring it.

The qpel and chroma MC functions are not moved as these are used by
non-h264 code.

Originally committed as revision 22565 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-16 01:17:00 +00:00
Michael Niedermayer
5820b90da0 Fix indention
Originally committed as revision 22484 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-12 15:23:26 +00:00
Michael Niedermayer
2ce1c2e063 Always reset slice_table.
Previously, the area of a lost slice would be left at the slice number of the previous
frame which could occasionally match the number of the next slice and thus a non existing
slice could have been used for prediction leading to additional decoding errors in otherwise
undamaged slices.

Originally committed as revision 22483 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-12 15:21:45 +00:00
Michael Niedermayer
3d9137c883 Reorder indexes in weight tables.
5 cpu cycles faster.

Originally committed as revision 22183 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-03 21:10:08 +00:00
Michael Niedermayer
1a29c6a0bb cosmetic addition of {}
Originally committed as revision 22178 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-03 19:32:50 +00:00
Michael Niedermayer
70118abd68 Merge weight & offset tables, 15 cpu cycles faster.
Originally committed as revision 22169 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-03 14:41:43 +00:00
Michael Niedermayer
72f86ec013 Simplify implicit_weight table init.
Originally committed as revision 22168 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-03 10:57:38 +00:00
Michael Niedermayer
145061a176 Fix a bunch of bugs ive introduced recently that broke threaded decoding.
might also fix issue1788

Originally committed as revision 22141 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-02 02:24:37 +00:00
Aurelien Jacobs
bc99737689 revert r22112 which broke playback of cathedral-beta2-400extra-crop-avc.mp4
Originally committed as revision 22125 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-01 00:22:43 +00:00
Janusz Krzysztofik
7c994c366c Process picture aspect ratio changes in H.264.
This fixes playback of such streams with ffplay (but does not affect
current ffmpeg).

Patch by Janusz Krzysztofik, jkrzyszt A tis D icnet D pl

Originally committed as revision 22112 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-28 18:33:33 +00:00
Michael Niedermayer
747db4e31a Move init of right side of ref_cache from fill_caches() to init_the_darn_decoder().
Originally committed as revision 22071 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-26 03:27:52 +00:00
Michael Niedermayer
358b5b1a59 Get rid of mb2b8_xy and b8_stride, change arrays organized based on b8_stride to
ones based on mb_stride in h264.
about 20 cpu cycles faster overall per MB

Originally committed as revision 22065 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-25 23:44:42 +00:00
Michael Niedermayer
36b54927fd Dont allocate direct_table 8 times too large.
Originally committed as revision 22056 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-25 15:29:12 +00:00
Michael Niedermayer
662a5b2370 Reorder intra4x4_pred_mode so that we can read/write 4 values at once.
3-7 cpu cycles faster

Originally committed as revision 22053 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-25 14:26:12 +00:00
Michael Niedermayer
5b0fb5244d Store intra4x4_pred_mode per row only.
about 5 cpu cycles slower in the local code but should be overall faster
due to reduced cache use. (my sample though has too few intra4x4 blocks
for this to be meassureable easily either way)

Originally committed as revision 22052 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-25 14:02:39 +00:00
Michael Niedermayer
e1c88a2138 Cut the size of mvd_table by yet another factor of 2.
The code read/write code itself was 1 cycle faster, overall its
likely more due to cache effects

Originally committed as revision 22048 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-25 04:11:33 +00:00
Michael Niedermayer
d43c192236 Keep mvd_table values of only 2 mb rows.
Originally committed as revision 22047 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-25 02:42:25 +00:00
Michael Niedermayer
b5bd070029 Change mvd_cache & mvd_table to 8bit, this is overall a bit faster
for high resolution videos.
about 20cycles faster per MB for cathederal.

Originally committed as revision 22038 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-24 20:43:06 +00:00
Michael Niedermayer
db8cb47d15 Try to set has_b_frames in codec init if we know everything alraedy.
This fixes some issues with the first few timestamps.

Originally committed as revision 21976 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-23 01:08:54 +00:00
Michael Niedermayer
9855b2e3c8 Move extradata reading code into codec init instead of doing it
in read frame.

Originally committed as revision 21975 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-23 01:07:39 +00:00
avcoder
0cb17649d8 Remove unused variable mb_xy.
Patch by avcoder, ffmpeg gmail

Originally committed as revision 21945 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-21 19:32:47 +00:00
Måns Rullgård
19769ece3b H264: use alias-safe macros
This eliminates all aliasing violation warnings in h264 code.
No measurable speed difference with gcc-4.4.3 on i7.

Originally committed as revision 21881 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-18 16:24:31 +00:00
Michael Niedermayer
024bf79fe0 Simplify deblock_left/top condition for deblocking_filter=2
Originally committed as revision 21876 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-18 12:37:43 +00:00
Michael Niedermayer
69a28f3e2b Move predict_field_decoding_flag() from h264.h to .c as its only used there and belongs
there as well.

Originally committed as revision 21861 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-17 02:25:05 +00:00
Michael Niedermayer
69cc31832f Move check for and call of predict_field_decoding_flag() from the mb code to
the row code. This function would only be needed on a MB basis for MBAFF+FMO

Originally committed as revision 21860 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-17 02:14:02 +00:00
Michael Niedermayer
f4b8b82514 Merge decode_cabac_mb_dqp() with surronding code.
~20 cpu cycles faster

Originally committed as revision 21826 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-14 23:06:25 +00:00
Michael Niedermayer
94cb599443 Drop if(0) code.
Originally committed as revision 21825 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-14 22:59:19 +00:00
Alexander Strange
78998bf217 h264: Remove unused variables.
Originally committed as revision 21815 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-13 21:09:38 +00:00
Michael Niedermayer
02e8c5f0a5 Dont drop B frames without last_picture.
Fixes issue1722

Originally committed as revision 21783 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-12 23:28:33 +00:00
Michael Niedermayer
3566042a0d Try to support truncated h264 frames mixed with mpeg pes headers in mkv.
Fixes issue1585

Originally committed as revision 21772 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-12 19:25:23 +00:00
Michael Niedermayer
055a6aa76a Set x264_build so that checks are simpler.
Originally committed as revision 21681 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-02-08 00:08:05 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
David Conrad
c4dffe7e36 Export fullrange flag and color information for h.264
Originally committed as revision 21126 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-11 00:31:39 +00:00
Laurent Aimar
75dd693840 Export get_slice_type() as ff_h264_get_slice_type().
Patch by Laurent Aimar <fenrir at videolan dot org>.

Originally committed as revision 21110 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-09 16:20:41 +00:00
Laurent Aimar
b090930d43 Always initialize bit_depth_luma and bit_depth_chroma in the H264
decoder which allows their usage without checking profile_idc.

Patch by Laurent Aimar (fenrir (AT) videolan org)

Originally committed as revision 21107 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-09 07:57:26 +00:00
Andreas Öman
4ad04da214 Log unknown NAL code from correct context
Originally committed as revision 21090 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-08 15:50:26 +00:00
Michael Niedermayer
52255d1746 End startcode prefix search at the end of a AVC unit.
Fixes issue1550.

Originally committed as revision 20784 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-09 12:49:59 +00:00
Michael Niedermayer
e262365d7c Reduce warnings about too few consumed bytes to debug level.
Fixes issue1061.

Originally committed as revision 20772 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-08 17:38:02 +00:00
Reimar Döffinger
f3bdc3da15 Call ff_find_hwaccel() after calling avcodec_set_dimensions().
Patch by Reimar

Originally committed as revision 20599 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-24 15:13:47 +00:00
Michael Niedermayer
4c66e8849b Use avcodec_set_dimensions()
Originally committed as revision 20591 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-23 19:45:40 +00:00
Ronald S. Bultje
6e44ba1550 Use get_bits_left() instead of size_in_bits - get_bits_count().
Originally committed as revision 20543 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-16 17:42:43 +00:00
Mike Scheutzow
eda4ea4e2e Reset rbsp buffer size when freeing its data buffer.
Patch by Mike Scheutzow $(name) AT alcatel 'minus' lucent com

Originally committed as revision 20531 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-13 18:33:28 +00:00
Michael Niedermayer
67e362ca45 indent
Originally committed as revision 20507 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-10 21:00:46 +00:00
Carl Eugen Hoyos
de9bc64df4 Cosmetics: Fix indentation after r20505.
Originally committed as revision 20506 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-10 20:55:45 +00:00
Carl Eugen Hoyos
602dd2d359 Add .pix_fmts to H264 VDPAU decoder declaration and remove obsolete test
for codec->capabilities.

Originally committed as revision 20505 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-10 20:55:00 +00:00
Michael Niedermayer
44be1d6478 Try to fix has_b_frame calculation for open gop files.
Fixes issue1523

Originally committed as revision 20504 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-11-10 20:24:41 +00:00
Reimar Döffinger
01418506a2 Remove casts that are useless since the argument is void *.
Originally committed as revision 20177 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-10-06 06:33:18 +00:00
Carl Eugen Hoyos
14600807bb Cosmetics: Fix typo.
Originally committed as revision 19980 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 10:07:29 +00:00
Michael Niedermayer
7bf3d0c44e Check num_units_in_tick/time_scale to be valid and within the range we support.
based on a patch by chrome

Originally committed as revision 19979 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-23 09:58:44 +00:00
Ramiro Polla
d31dbec374 Rename CHECKED_ALLOC(Z) to FF_ALLOC(Z)_OR_GOTO and add context and label
parameters.

Originally committed as revision 19776 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-06 00:08:19 +00:00
Måns Rullgård
63613fe615 Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN
Originally committed as revision 19508 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-26 12:20:04 +00:00
Alexander Strange
e5f61b94a1 H.264: Check the return value of decode_vui_parameters()
Files with invalid VUI are now rejected like
other invalid SPS are.

Fixes issue1231.

Originally committed as revision 19335 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-04 07:46:58 +00:00
Alexander Strange
0410ee8f86 H.264: Don't set data_partitioning for invalid NAL_DPA.
Before, the decoder could interpret a corrupt frame
as a NAL_DPA and NAL_DPC, and then start decoding
even if decode_slice_header() returned an error.
This frequently caused crashes.

Fixes issue1228, issue1229, and partially issue1238.

Originally committed as revision 19328 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-03 05:52:00 +00:00
Reimar Döffinger
8d8409ca9f Fix nalsize check to avoid an integer overflow that made the check
incorrect for nalsize > INT_MAX - buf_index

Originally committed as revision 19307 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-30 12:11:29 +00:00
Haruhiko Yamagata
c173a0881f Improve wording: s/reseted/reset
Patch by Haruhiko Yamagata, h D yamagata A nifty D com

Originally committed as revision 19266 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-24 12:10:20 +00:00
Haruhiko Yamagata
2722c3a30d Fix H.264 picture reordering, 2nd try.
First, reverted one was r19239.

Patch by Haruhiko Yamagata, h D yamagata A nifty D com

Originally committed as revision 19258 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-23 21:03:35 +00:00
Carl Eugen Hoyos
df028e8c6a Revert r19239: It broke four conformance tests.
Originally committed as revision 19241 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-20 14:47:38 +00:00
Haruhiko Yamagata
6ee0eb38c0 Fix H.264 picture reordering.
Patch by Haruhiko Yamagata, h D yamagata A nifty D com

Originally committed as revision 19239 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-20 13:16:07 +00:00
Alexander Strange
d2d5e06735 H.264: Fix memory leaks with multithreading.
The threads' contexts and rbsp_buffers were not freed at the end
of decoding.

Fixes issue 1581

Originally committed as revision 19207 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-16 21:50:36 +00:00
Haruhiko Yamagata
b19d493f2b Add field prev_interlaced_frame to H264Context to be able to flag soft telecine
progressive.

Patch by Haruhiko Yamagata, h D yamagata A nifty D com

Originally committed as revision 19141 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-09 21:16:40 +00:00
Michael Niedermayer
f4ebb334be Fix sei_ct_type check so it does not mistreat ct_type= unknown.
Originally committed as revision 19082 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-06-03 19:24:51 +00:00