summaryrefslogtreecommitdiff
path: root/src/libmpeg2/decode.c
AgeCommit message (Collapse)Author
2008-03-02Push out current frame when seeing the sequence end code 0xb7.Reinhard Nißl
2007-09-19Convert the "AFD changed" message into a LOG message.Darren Salt
2007-04-12Speed up start code scanning.Reinhard Nißl
The current code implements hardware (a shift register) in software just to find the byte pattern 00 00 01 xx, which causes remarkable CPU load on less powerful machines. The new approach uses memchr() to find the 01 in the buffer, which most often hits a start code. memchr() seems to be even faster then implementing a real pattern search (i. e. by just looking at every third byte to find 01). The new implementation causes significantly fewer CPU load on less powerful machines.
2007-04-11Special handling of sequence end code to improve still frames.Reinhard Nißl
The current code emits a frame when a non slice start code is seen. For still frames, this is typically a sequence end code. But the current code doesn't call parse_chunk() immediately because it waits for a further start code to determine the chunk of data to pass to parse_chunk(). But there isn't such a further start code for still frames after the sequence end code and thus, the still frame will not be emitted. As sequence end code is the only start code which has no data according to the MPEG specification, let's use this information to call parse_chunk() immediately.
2007-04-11Detect absence of AFD and report only changes.Reinhard Nißl
The current code cannot detect the absence of AFD once it has been seen in the stream. As AFD can appear in user data after sequence, group or picture start codes, the idea is to reset the stored AFD value when processing the sequence start code. In the case where AFD is seen in user data, it is stored internally, to have it ready when the first slice is processed. At least at that time, AFD data has been seen and can be analyzed for changes. At any change, the AFD value will then be stored into a stream property. Doing this only for changes avoids locks while writing the same value over and over to the stream's property.
2007-04-11Improve MPEG2 detection to have it ready for correct aspect ratioReinhard Nißl
determination. The current code detects MPEG2 when parsing the sequence extention which appears only in MPEG2 streams. But this is to late for correct aspect ratio determination which happens earlier and therefore assumes MPEG1. The result is a totally wrong aspect ratio. To fix this issue, the next start code (which is already available at that time) is passed to parse_chunk() too, which can then be used to detect a MPEG2 extension start code early enough before the aspect ratio is determined.
2007-01-28fix integer/double mistake.Miguel Freitas
funny because the "more accurate" frame duration calculation actually broke a/v sync for ntsc dvds. tsc tsc ;-) fixes #1544349, #1589644 CVS patchset: 8574 CVS date: 2007/01/28 22:46:07
2006-06-23Frame duration calculation cleanups; more accurate calculation.Darren Salt
CVS patchset: 8072 CVS date: 2006/06/23 18:22:19
2006-06-17Fix strict aliasing rules breakages where possible, enable ↵Diego 'Flameeyes' Pettenò
-fno-strict-aliasing where the breakage is unresolvable, and not enable it globally (decreases performances). CVS patchset: 8048 CVS date: 2006/06/17 15:20:56
2006-02-19fix playing SIF DVDsMiguel Freitas
case where display_height (240) is less than coded_picture_height (256) CVS patchset: 7903 CVS date: 2006/02/19 15:05:07
2006-02-06PATCH: detect aspect ratio changes in MPEG2 videoMiguel Freitas
CVS patchset: 7883 CVS date: 2006/02/06 12:54:17
2005-06-17Detect AFD information in MPEG2 streams and make the information availableDarren Salt
to front-ends. (Reinhard Nissl) gxine (CVS HEAD) is aware of this information. CVS patchset: 7628 CVS date: 2005/06/17 22:33:01
2005-05-06**BUGFIX**Thomas Hellström
improve xxmc cpu-usage for IDCT / MOCOMP acceleration through better locking [bug #1195282] CVS patchset: 7524 CVS date: 2005/05/06 07:42:20
2005-05-03**BUGFIX**Thomas Hellström
Fixed xvmc plugin segfault when it tried software blending on nonexistant xv image. Cleaned up libmpeg2 behaviour on xxmc plugin abrupt software fallback. CVS patchset: 7516 CVS date: 2005/05/03 19:25:10
2005-04-09**BUGFIX**Thomas Hellström
Multiple slice-per-rows (HDTV) fixes in the libmpeg2 code, particularly regarding VLD XvMC. Cleaned up hardware acceleration hooks in libmpeg2. Fixed X include path searching while configure detects XvMC support. CVS patchset: 7449 CVS date: 2005/04/09 11:22:14
2005-02-22XvMC update largely courtesy of Kendall Bennet, Scitechsoft:Thomas Hellström
* Fix surface flushing and syncing (xxmc / xvmc) * Fix clearing of macro block lists (xxmc / xvmc) * Remove floating point operations from mpeg demuxer. Degrades performance on non-fp capable hardware. * Remove unnecessary software MC step * Fix Quantization matrix ordering which caused bad picture quality (KB/TH) * Minor optimizations in the libmpeg2 code * Fix VLD flushing at video discontinuity (TH) CVS patchset: 7424 CVS date: 2005/02/22 18:31:33
2005-01-30**BUGFIX**Thomas Hellström
Bug 1092411 Makes XvMC handle cases where each slice is split into more than two parts. This got broken on IDCT / MOCOMP with a previous commit to fix a search segfault. Has never worked before with VLD. Still IDCT / MOCOMP exhibit bad picture quality in this case but not worse than before it got broken. CVS patchset: 7375 CVS date: 2005/01/30 18:01:25
2004-12-16use UTF-8 meta info setting, where we know the string is ASCIIMichael Roitzsch
(costly conversion is not necessary, because ASCII is a subset of UTF-8) CVS patchset: 7264 CVS date: 2004/12/16 13:58:57
2004-11-13Fixed segfault when seeking with the "xvmc" and "xxmc" plugins playingThomas Hellström
files with IDCT / mocomp XvMC acceleration. Cleaned up some ugly xvmc / xxmc naming. CVS patchset: 7122 CVS date: 2004/11/13 19:32:51
2004-10-27old commentMiguel Freitas
CVS patchset: 7078 CVS date: 2004/10/27 14:14:20
2004-10-12xxmc driver updates:Thomas Hellström
Updated software fallback mechanism to be compatible with post plugin deinterlacing. A decoder using the plugin can now request a software fallback format to be used if acceleration fails. Removed the software deinterlacer that was inherited from the xv plugin. Made idct/mocomp fall back to software decoding for interlaced streams, since these are not rendered correctly either with the xvmc or the xxmc plugin. CVS patchset: 7029 CVS date: 2004/10/12 07:40:07
2004-09-28xxmc patch by Thomas Hellstrom (with some changes)Miguel Freitas
there is still some work to do, please report any breakages. note: new xxmc driver tested with both nvidia and via libraries. CVS patchset: 7007 CVS date: 2004/09/28 18:49:38
2004-09-22- added cropping capability (thanks James Stembridge)Miguel Freitas
- some vo drivers support cropping natively. (only xv and xvmc have been tested) - add software crop fallback to video_out.c - skip yuv2rgb processing at xshm for not yet cropped frames (these frames are never shown) - libmpeg2 and ffmpeg now may use crop support - bump vo api. (changes to xvmc/xxmc will follow) CVS patchset: 6991 CVS date: 2004/09/22 20:29:13
2004-07-14use correct frame flags for adjusting duration.Miguel Freitas
fixes sailor_moon_op_frag.mpg duration problem (wrong duration for frames marked as progressive) CVS patchset: 6794 CVS date: 2004/07/14 22:27:10
2004-03-14hey, I've always wondered who was in charge of all that MPEG decodingMike Melanson
CVS patchset: 6251 CVS date: 2004/03/14 20:40:39
2004-01-19Make sure INFO is accurate.James Courtier-Dutton
CVS patchset: 6055 CVS date: 2004/01/19 19:23:18
2003-12-24stupid me... mpeg1 is always progressive.Miguel Freitas
CVS patchset: 5942 CVS date: 2003/12/24 13:34:17
2003-11-26lprintf cleanup, pass I.Daniel Caujolle-Bert
CVS patchset: 5796 CVS date: 2003/11/26 19:43:26
2003-11-16New stream/meta info (safe) stuff.Daniel Caujolle-Bert
BIG NOTE: use helpers to access to these informations (get/set/reset): _x_{stream,meta}_info_{get,set,reset}() are for internal use, don't use *_public() ones from inside the beast ;-) Some wrongly names "xine_" fonction renaming. CVS patchset: 5757 CVS date: 2003/11/16 23:33:42
2003-11-15start xine_stream_t separation (public/private).Miguel Freitas
(we should finish this before rc3.) - stream_info and meta_info variables are private now. obs: everything must be recompiled due xine_stream_t changes CVS patchset: 5733 CVS date: 2003/11/15 14:54:30
2003-11-15more helper functions cleanup (stream info, meta info)Miguel Freitas
CVS patchset: 5731 CVS date: 2003/11/15 13:01:00
2003-11-11rename internal API function (_x_<function>).Daniel Caujolle-Bert
CVS patchset: 5721 CVS date: 2003/11/11 18:44:50
2003-10-06- add XvMC supportMiguel Freitas
- bump vo and post interface versions obs: video_out_xvmc.c needs some more work, see todo. CVS patchset: 5459 CVS date: 2003/10/06 21:52:42
2003-09-01that should fix mpeg1 aspect ratio as reported by Gert VervoortMiguel Freitas
CVS patchset: 5328 CVS date: 2003/09/01 20:12:36
2003-08-05handle dvdnav aspect force hints correctly with pan&scanMichael Roitzsch
CVS patchset: 5250 CVS date: 2003/08/05 15:09:23
2003-08-04support for arbitrary aspect ratiosMiguel Freitas
patch by Philip Jgenstedt CVS patchset: 5243 CVS date: 2003/08/04 03:47:09
2003-06-11- add VO_INTERLACED_FLAG to get_frameMiguel Freitas
- do not trust progressive_frame for detecting NTSC 3:2, quote: 'the alternating progressive_frame encoding problem. This is a problem where the progressive_frame flag alternates between true and false every frame, when it really should have been set to "true" all the time.' 'There is a lot of content that is affected by this issue, because it's caused by a dumb decision by a very big company that made a very popular MPEG encoder. They've since fixed the encoder, but there are apparently still authoring companies that use it, because the problem is on a lot of high-profile current discs, like Disney's "Monsters Inc." and "Beauty and the Beast".' http://www.hometheaterhifi.com/volume_8_2/dvd-benchmark-special-report-chroma-bug-4-2001.html CVS patchset: 5025 CVS date: 2003/06/11 23:08:54
2003-06-03progressive_frame flag may be used to select how to convert yv12->yuy2Miguel Freitas
CVS patchset: 5003 CVS date: 2003/06/03 03:33:15
2003-05-23fix the miscalculates and then copy'n'pasted durations we discovered some ↵Michael Roitzsch
time ago CVS patchset: 4904 CVS date: 2003/05/23 10:52:40
2003-05-04- width and height metainfo in mpeg streamsBastien Nocera
CVS patchset: 4759 CVS date: 2003/05/04 00:56:51
2003-04-29sometimes old frames are displayed after a seek (reset)Miguel Freitas
mark them as bad so that doesn't happen obs: i'm aware this is a delicate code, please report if this change causes any problems (like with dvd menus). i hope it won't. CVS patchset: 4706 CVS date: 2003/04/29 13:47:48
2003-04-06OGM subtitles by andreas heinchen, cosmeticsGuenter Bartsch
CVS patchset: 4543 CVS date: 2003/04/06 01:17:10
2003-03-23is_frame_needed seems to drop too much: we should still parse the complete ↵Michael Roitzsch
stream but just do not output any frames some DVD menus, where is_frame_needed seems to skip something important for decoding should work now, while we should still see no artifacts on seeking CVS patchset: 4470 CVS date: 2003/03/23 14:58:33
2003-03-17fix decoder reset: when waiting for I and P frames, to get the necessary ↵Michael Roitzsch
reference frames, we have to evaluate the frame types earlier, because on some DVDs with interlaced NTSC material, the fields of the frames are interwoven in a way that would overwrite the frame type with a new value before we evaluate it, this leads to xine endlessly waiting for I or P frames. enabling seek_mode on decoder reset also fixes some seeking artifacts CVS patchset: 4437 CVS date: 2003/03/17 15:25:10
2003-02-26Fix blockiness after seeking MPEG-2 streamsEwald Snel
CVS patchset: 4287 CVS date: 2003/02/26 06:49:23
2003-01-08fixes/cleanups of the handled/unhandled codecsMiguel Freitas
for more information see message on xine-devel CVS patchset: 3818 CVS date: 2003/01/08 01:02:27
2003-01-07oops, wrong _infoDaniel Caujolle-Bert
CVS patchset: 3811 CVS date: 2003/01/07 16:48:57
2003-01-07meta info HANDLED was missedDaniel Caujolle-Bert
CVS patchset: 3809 CVS date: 2003/01/07 16:27:26
2003-01-05fix decoding of dolbydigitaltemple streamMiguel Freitas
CVS patchset: 3794 CVS date: 2003/01/05 21:40:37
2002-12-26- cleanup internal interfaces for rewiringMiguel Freitas
- fix UI_PLAYBACK_FINISHED rifle CVS patchset: 3686 CVS date: 2002/12/26 21:53:41