summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Courtier-Dutton <jcdutton@users.sourceforge.net>2002-03-30 02:34:37 +0000
committerJames Courtier-Dutton <jcdutton@users.sourceforge.net>2002-03-30 02:34:37 +0000
commite2e5026d22f1bf8d8d882ce2b9d81ae61397442d (patch)
treefeb654a7ec0b45fb9769b74c48b3269f8f1ad819 /src
parentbf056ecebb101e3be4f3a08a42e74870a57d1654 (diff)
downloadxine-lib-e2e5026d22f1bf8d8d882ce2b9d81ae61397442d.tar.gz
xine-lib-e2e5026d22f1bf8d8d882ce2b9d81ae61397442d.tar.bz2
Changed get_frame_duration function to produce correct duration values for dvd films (24fps) to display on a NTSC TV (29.97 fps).
Added comment, to explain what we should aim to do, in order to improve things further. CVS patchset: 1646 CVS date: 2002/03/30 02:34:37
Diffstat (limited to 'src')
-rw-r--r--src/libmpeg2/decode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c
index 4778fe55a..f5fdab2b0 100644
--- a/src/libmpeg2/decode.c
+++ b/src/libmpeg2/decode.c
@@ -117,8 +117,10 @@ static inline void get_frame_duration (mpeg2dec_t * mpeg2dec, vo_frame_t *frame)
frame->frame_rate_code); */
frame->duration = 3000;
}
-
- if( mpeg2dec->picture->repeat_first_field ) {
+ /* FIXME: We should try to recognise patterns in the repeat first field(rff)
+ values. In NTSC mpeg2 streams, a trick is used to convert a 24 fps film into 29.97 fps for NTSC TV. The rff flag is used to make some of the 24 fps fields last for two fields on the TV screen. This is because the TV screen has a fixed frame rate, and cannot be varied. On a computer screen, we can have almost any frame rate we wish, so to get a much smoother picture, we should not repeat any frames, but in fact just play them back at 24 fps instead of playing some frames longer than others. So the comments below tell us how we are currently doing it for both computer screen and any TV out device, but not how we SHOULD try to do it for a computer screen.
+ */
+ if( frame->repeat_first_field ) {
if( !mpeg2dec->picture->progressive_sequence &&
mpeg2dec->picture->progressive_frame ) {
/* decoder should output 3 fields, so adjust duration to