Picture Ratio/Position/AudioVisualisation bug
#1
Lightbulb 
here is a list of xbmc problems that i had in 10 minutes of manipulation
i’m a photographer and i would love to use the picture viewer.
unfortunately, i often found some problem in that section (especially ratio)

i have installed the new xbmc-2003-11-12 over an old version and here what a got:
- first i tried to display a 3:2 ratio picture and i got a picture that occupies my full 4:3 tv screen. ok i assumed that i have to calibrate my screen since i would expect some black bar up and down the screen.
- i cannot calibrate my screen using a picture (i would be so happy to display a calibration screen) so i use a 4:3 movie to set my viewing area…
- after that i go back to the picture section and try again the picture… on my screen the picture is completely shift to the right (corresponding to my screen correction since i moved the upper left corner a few pixels to the right)

with that version i’m not able to see properly a simple picture on my tv screen ;(


here another little test:
- launch an mp3
- go back to the picture section for an audio & video presentation (that’s a good feature).
- if you zoom in (a key) then if i try to zoom out (x key) then you’re entering the audio visualization (of course this is not what i expect in the picture section of xbmc)


big feature still lacking:
- the a key zoom in the small resolution screen and we could expect to zoom in the hi resolution picture. which mean that if i have a pal screen (720x576) and a 3000x2000 picture, i would expect to zoom in this hi resolution picture and see the detail contain in the file. with the actual xbmc you’re zooming in the screen so you get big pixel very quick.


i hope one day i will be able to look at my hires pic properly.
good luck

fred
#2
how to get a good ratio:

correct me if i'am wrong:

i_  means image_
s_  means screen_
sp_ means screenpreference_

s_aspectratio = 4/3  if using an old 4:3 tv
s_aspectratio = 16/9 if using a new 16:9 tv


case of a panorama picture: (i_sizex > i_sizey)

ratio = sp_sizex / (sp_sizex * s_aspectratio)
i_sizey = i_sizex / (ratio * s_aspectratio)



case of portrait picture: (i_sizex < i_sizey)

ratio = sp_sizex / (sp_sizex * s_aspectratio)
i_sizex = i_sizey * ratio * s_aspectratio



afterthat display the image with the preference offset: sp_upperleftx, sp_upperlefty


hope it helps Smile

fred
#3
hi fred,

1. picture aspect ratio should be fine now - it uses the movie calibration, as you correctly point out. it also uses the exact same aspect ratio code as movies do, so if your movies display correctly, so will your pictures. note that it assumes that the picture has a 1:1 pixel ratio (ie a 640x480 picture is 4:3 in aspect ratio).

2. i know that used to happen, it may still happen (switches to visz on x even if in zoomed pictures). i'll look at fixing it when i get some time, although iirc it is basically due to the way the code is organized, so may not be trivial.

3. currently xbmc limits the picture size to 1024x1024. it used to limit it by the screen size. this 1024x1024 is simply a define in the source, and can be increased if necessary. we probably should keep a limit there, though i think, as the xbox does not have much memory, at 64mb.

as for your aspect ratio calculations, that is similar to what is being used. the difference is that the screen ratio uses the screen pixel ratio (defined via the pal standards as 128x117 for instance) and the screen calibration size to determine the calibration frame ratio. (ie it does not assume that the calibrated rectangle is a 4:3 or 16:9 frame). the calibrated rectangle simply takes care of overscan. i may in the future allow add an additional control to the calibration to allow users to set the pixel ratio of their tv, in case it differs from the standards.

if you are still having problems with your pictures, please upload an example to:

http://www.xboxmediaplayer.it/upload

or point to an example pic on the web that does not display correctly, and i'll take a look at it on my tv.

thanks,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
#4
Quote:hi fred,
hi jonathan Smile good to see that my post interest someone Smile

Quote:1.  picture aspect ratio should be fine now - it uses the movie calibration, as you correctly point out.  it also uses the exact same aspect ratio code as movies do, so if your movies display correctly, so will your pictures.  note that it assumes that the picture has a 1:1 pixel ratio (ie a 640x480 picture is 4:3 in aspect ratio).
as far as i know picture from digital camera use this 1:1 pixel ratio. i had 4 cameras that work that way (from sony small camera to canon slr). it could be problematic for those who want to look at pictures grabbed from video signal.

Quote:2.  i know that used to happen, it may still happen (switches to visz on x even if in zoomed pictures).  i'll look at fixing it when i get some time, although iirc it is basically due to the way the code is organized, so may not be trivial."
this is not a very important bug anyway. i don't know why but i was not able to stop the audio file that is playing. i had to reset my xbox.

Quote:"3.  currently xbmc limits the picture size to 1024x1024.  it used to limit it by the screen size.  this 1024x1024 is simply a define in the source, and can be increased if necessary.  we probably should keep a limit there, though i think, as the xbox does not have much memory, at 64mb.
i think there is some fact:
   a/ i think that the biggest display resolution of the xbox is hdtv 1080i that must be 1920x1080 resolution
   b/ i don't know if the 1024x1024 define also limit the hdtv 720p since resolution is 1200x720
   c/ if you don't want to waste to much memory with picture perhaps this define should be set dynamically according to the current screen resolution (best solution according to me) or by a settings in the setup.
   d/ i think a 6m pixels (resolution 3072x2048) only takes 18mo from the xbox 64mo of (rgb 8bit (no alpha)). is it a big problem?
   e/ if memory is a big issue then perhaps limit the allocation according to the screen resolution, and when the user zoom in a big picture then reload from the file the information you don't have (i know it could be a slow process to reload the file each time you zoom but this feature seems very important to me (digital camera do that) so if it's too slow you could: add a specific key to reload the detail (best solution according to me) or add a flag in the preference of xbmc that tell auto reload on zoom : yes or no)


Quote:as for your aspect ratio calculations, that is similar to what is being used.  the difference is that the screen ratio uses the screen pixel ratio (defined via the pal standards as 128x117 for instance) and the screen calibration size to determine the calibration frame ratio.  (ie it does not assume that the calibrated rectangle is a 4:3 or 16:9 frame).  the calibrated rectangle simply takes care of overscan.  i may in the future allow add an additional control to the calibration to allow users to set the pixel ratio of their tv, in case it differs from the standards.
i don't know that and it seems strange to me Smile for sure, if you are using the video calibration for the picture which is the good solution i think that you must admit that the defined screen area use the ratio 1.33 for a 4:3 tv or 1.77 for 16:9 tv. otherwise you will not have a perfect ratio. (this is my point of view)

i would be so happy to help since programming is my job but it's hard to find time at home Wink
also i must install a debug bios, visual, change the location of my xbox near to my pc since it is located in another room Wink

Quote:if you are still having problems with your pictures, please upload an example to:
http://www.xboxmediaplayer.it/upload
or point to an example pic on the web that does not display correctly, and i'll take a look at it on my tv.
ok i'll test the new version asap and let you know!


Quote:thanks,
jonathan
regards
fred
#5
the frame that you see on your tv probably is not in a 4:3 or 16:9 ratio (get a ruler out and see). it certainly is not the 4:3 frame defined by the pal tv standards, which on 99.9% of tvs contains at least some of the overscan area (in order to make up for timing inaccuracies). thus, using the calibration frame as the 4:3 frame would be wrong.

the correct solution is to use the correct pixel aspect ratio and simply use the calibrated frame to limit the image from drawing in the overscan region. this is what is current done. the additional ability to define the pixel ratio for your particular tv (via a large square that you alter so it measures perfectly square) will be added when i get time.

btw: the "press x whilst playing music and zoomed into a picture" bug is now fixed.

cheers,
jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image

Logout Mark Read Team Forum Stats Members Help
Picture Ratio/Position/AudioVisualisation bug0