MPEG-1 aspect ratio constants fix
Linards Ticmanis <[email protected]> Thu, 11 Feb 2010 15:12:44 +0100
| Newsgroups | gmane.comp.video.mjpeg.devel |
|---|---|
| Message-ID | <[email protected]> |
There seem to be two wrong values in the MPEG-1 aspect ratio constants used by mjpeg_play; i'm attaching a diff with these ones changed. The majority of sources I found on-line agree on a set of values not completely alike to the one used in mjpeg_play. This includes the source of mplayer and a lot of web pages (a few have the values currently in the source). Unfortunately I don't have access to the original MPEG standard documents. If you have, could you check this? Mathematically the values given here make more sense than the ones currently in the source; with these new values, 352x240 becomes 321x240 on playback, which is much closer to 4:3 than the 313x240 you get with the values currently in the source. Thanks for checking this out. -- Linards Ticmanis ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ Mjpeg-developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mjpeg-developer
mjpeg_mpeg1.diff
(text/x-patch, 1.5 KB)
diff -du --recursive mjpeg_play_orig/utils/mpegconsts.c mjpeg_play/utils/mpegconsts.c
--- mjpeg_play_orig/utils/mpegconsts.c 2010-02-11 15:03:47.000000000 +0100
+++ mjpeg_play/utils/mpegconsts.c 2010-02-08 23:13:16.000000000 +0100
@@ -69,11 +69,11 @@
"1:0.8055",
"1:0.8437 (16:9 Anamorphic NTSC for 720x480/352x240 images)",
"1:0.8935",
- "1:0.9375 (4:3 PAL/SECAM for 720x578/352x288 images)",
+ "1:0.9157 (4:3 PAL/SECAM for 720x578/352x288 images)",
"1:0.9815",
"1:1.0255",
"1:1:0695",
- "1:1.1250 (4:3 NTSC for 720x480/352x240 images)",
+ "1:1.0950 (4:3 NTSC for 720x480/352x240 images)",
"1:1.1575",
"1:1.2015"
};
diff -du --recursive mjpeg_play_orig/utils/yuv4mpeg_intern.h mjpeg_play/utils/yuv4mpeg_intern.h
--- mjpeg_play_orig/utils/yuv4mpeg_intern.h 2010-02-11 15:03:47.000000000 +0100
+++ mjpeg_play/utils/yuv4mpeg_intern.h 2010-02-08 23:12:01.000000000 +0100
@@ -63,11 +63,11 @@
#define Y4M_SAR_MPEG1_5 { 10000, 8055 }
#define Y4M_SAR_MPEG1_6 { 10000, 8437 } /* Anamorphic 16:9 NTSC */
#define Y4M_SAR_MPEG1_7 { 10000, 8935 }
-#define Y4M_SAR_MPEG1_8 { 10000, 9375 } /* PAL/SECAM 4:3 */
+#define Y4M_SAR_MPEG1_8 { 10000, 9157 } /* PAL/SECAM 4:3 */
#define Y4M_SAR_MPEG1_9 { 10000, 9815 }
#define Y4M_SAR_MPEG1_10 { 10000, 10255 }
#define Y4M_SAR_MPEG1_11 { 10000, 10695 }
-#define Y4M_SAR_MPEG1_12 { 10000, 11250 } /* NTSC 4:3 */
+#define Y4M_SAR_MPEG1_12 { 10000, 10950 } /* NTSC 4:3 */
#define Y4M_SAR_MPEG1_13 { 10000, 11575 }
#define Y4M_SAR_MPEG1_14 { 10000, 12015 }