}
}
- for( int i=0; ntsc_zones[i]; ++i ) {
- if( !strcmp(ntsc_zones[i], p) )
- return "NTSC";
+ if( p ) {
+ for( int i=0; ntsc_zones[i]; ++i ) {
+ if( !strcmp(ntsc_zones[i], p) )
+ return "NTSC";
+ }
+ }
+
+ p = getenv("TZ");
+ if( p ) {
+ for( int i=0; ntsc_zones[i]; ++i ) {
+ if( !strcmp(ntsc_zones[i], p) )
+ return "NTSC";
+ }
}
//__timezone: Seconds west of UTC. 240sec/deg
- double tz_deg = __timezone / 240.;
+ double tz_deg = -__timezone / 240.;
// from Honolulu = -10, to New York = -5, 15deg/hr lat -150..-75
return tz_deg >= -10*15 && tz_deg <= -5*15 ? "NTSC" : "PAL";
}
{
w = 1; h = 1;
if(!width || !height) return 1;
+ if( width == 720 && (height == 480 || height == 576) ) {
+ w = 4; h = 3; return 0; // for NTSC and PAL
+ }
double ar = (double)width / height;
// square-ish pixels
if( EQUIV(ar, 1.0000) ) return 0;