[MPlayer-dev-eng] aspect, panscan & co..

Andrea Palmatè andrea at aspitalia.com
Wed Feb 22 23:59:32 CET 2006


Hello,

i'm trying to implement the rescalin in my vo 
driver. i've seen that the others driver use 
aspect() function to rescale the image. i've seen 
that there isn't a doc in DOCS nor an example that use aspect functions..

ok, i've tried myself and i've put this..:

static int config(uint32_t width, uint32_t height, uint32_t d_width,
                      uint32_t d_height, uint32_t flags, char *title,
                      uint32_t format)
....

                 image_width = width;
                 image_height = height;
                 if (!vo_fs)
                 {
                         d_image_width = d_width;
                         d_image_height = d_height;
                 }
                 panscan_init();
                 aspect_save_orig(image_width,image_height);
                 aspect_save_prescale(d_image_width,d_image_height);
                 aspect_save_screenres(vo_screenwidth,vo_screenheight);
                 //aspect_save_screenres(d_image_width,d_image_height);
                 if (!vo_fs)
                 {
                         d_image_width = d_width;
                         d_image_height = d_height;
                         aspect(&d_image_width, &d_image_height, A_NOZOOM);
                         window_width = d_image_width;
                         window_height = d_image_height;
                 }
                 else
                 {
                         aspect(&d_image_width, &d_image_height, A_ZOOM);
                         panscan_calc();
                         d_image_width  += vo_panscan_x;
                         d_image_height += vo_panscan_y;
                         window_width = vo_screenwidth;
                         window_height = vo_screenheight;
                 }
                 internal_offset_x=(vo_screenwidth-d_image_width)/2;
                 internal_offset_y=(vo_screenheight-d_image_height)/2;
                 vo_dx= (( vo_screenwidth  - d_image_width  ) / 2);
                 vo_dy= (( vo_screenheight - d_image_height ) / 2);
                 geometry(&vo_dx, &vo_dy, 
&d_image_width, &d_image_height, vo_screenwidth, vo_screenheight);


now the result is that if i run mplayer in a 
window it scale the image correctly. if i use 
fullscreen it rescale the image correctly but if 
the video is 16:9 the rescale is wrong because it 
fill all screen with movie (not the 16:9 format effect). what's wrong?
Sometime i receive (this in fullscreen) the message:

swScaler: slices start in the middle

What is the exactly operation to do for scale image always well?
Thank you!


Andrea Palmatè
http://www.amigasoft.net







More information about the MPlayer-dev-eng mailing list