GNOME Bugzilla – Bug 339408
setting aspect ratio is not working
Last modified: 2006-05-26 14:50:19 UTC
trying to manualy set the aspect ratio to something like 4:3 or 16:9 the image is scaled the wrong way. checking it with PAL resolution, setting it to 4:3 it is about 16:9, which could indicate that pixel aspect ratio and frame aspect ratio are mixed up. on the gui level nobody wants to set a 4:3 pixel aspect ratio...
Created attachment 64112 [details] [review] make 4:3, 16:9 and DVB what the lable says make 4:3, 16:9 and DVB what the lable says; i did not change Square from being square pixels to being a square image.
Just want to double check some points with you. What totem does is : 1) Get the pixel aspect ratio of your monitor from the X API. Sometimes X can get that wrong so you can adjust it in xorg.conf if that's the case pretty rare (though). In most case your pixels are square. 2) Get the pixel aspect ratio of the movie you are playing. This can be wrong as well because of a badly muxed format or a poor container format that doesn't handle this right. 3) Calculate the scaling required to display the movie with its PAR correctly on your screen with its PAR. What the pixel aspect ratio in Totem's menu does is enforce the parameter from 2). Indeed getting X to report your screen geometry correctly is your job in xorg.conf because it's rare, but being able to force the PAR of the movie you are playing is indeed usefull for a lot of movies. So basically if you play a movie and the aspect ratio looks wrong and you believe this is a 4:3 PAR video but the format reports square you can force it to 4:3 and it should look right on your screen no matter if the screen's pixels are square or not. Now that we have a common understanding of what this is feature does can you confirm you are still seeing a bug? Thanks and regards. Julien,
just to clear that up totem does not list 4:3 pixel aspect ratio but 4:3, 16:9 and DVB image aspect ratios. now the current code in totem does set it to 4:3 pixel aspect ratio. my argument is: the only thing one would want with menu entries labled 4:3 and 16:9, is image aspect ratio. (4:3 and 16:9 beeing the most common image aspect ratios of screens, tv and dvds) with that understanding i think its a bug. ps: note i dont use PAR since its confusing, could be pixel or picture, have seend both uses.
Fixed in CVS head of Totem. (Patch applied)
Created attachment 64215 [details] [review] patching the patch ok, totaly fucked that up. the old patch used width and height the wrong way around. PAR = pixel aspect ratio / DAR = display aspect ratio DAR_n = PAR_n * width // i.e. 4 = PAR_n * 720 DAR_d = PAR_d * height // 3 = PAR_d * 576 transforming this to calculate PAR: PAR_n = DAR_n * height // i.e. PAR_n = 4 * 576 PAR_d = DAR_d * width // PAR_n = 3 * 720
I've just committed this to totem HEAD, would be great if you could check that I didn't break anything. 2006-05-26 Tim-Philipp Müller <tim at centricular dot net> * src/backend/bacon-video-widget-gst-0.10.c: (get_media_size): Avoid integer overflows when doing aspect ratio calculations. * configure.in: Require gst-plugins-base >= 0.10.7 for the GStreamer backend for the recently added gst_video_calculate_display_ratio() function used above.