Hi,

Morfsta schrieb:

> I have managed to get xine to now detect the H264 video size prior to
> starting up the CoreAVC decoder and set the size within the
> initialisation function: -
> 
>       memset(&bih, 0x00, sizeof(bih));
>       bih.biWidth = sps.width;
>       bih.biHeight = sps.height;
>       bih.biPlanes = 1;
>       bih.biBitCount = 24;
>       bih.biCompression = 0x34363248; //31435641; //AVC1
>       bih.biSizeImage = 0;
>       bih.biXPelsPerMeter=10000;
>       bih.biYPelsPerMeter=10000;
>       bih.biClrUsed=0;
>       bih.biClrImportant=0;
>       bih.biSize = sizeof(bih);
>       buf->content = malloc(sizeof(bih));
> 
> It detects BBC HD as the right video size, i.e. 1440 x 1080 - however
> this now results in a squased image on the display with black bars
> down the left and right sides. Any idea how you tell CoreAVC what the
> video size is and to scale it to the size that xine is using? It
> detects other video sizes such as 1920x1088 and displays them all
> correctly on the screen so I know that we are now very close!

Looks like you/CoreAVC miss setting the aspect ratio of the
frame. If you replay a BBC HD recording with xine (using FFmpeg)
and open a VDR menu, you should see messages like that which tell
you the frame aspect ratio after the @:

vdr_video: osd: (0, 0)-(1440, 1080)@1,81818
ratio: 18182

Just a guess: maybe the above bih.biXPelsPerMeter and
bih.biYPelsPerMeter can be used to set the pixel aspect ratio
which will then in turn yield the frame aspect ratio when applied
to the coded frame size. So pixel aspect for the above sample
should yield:

        pa = 1.81818 * 1080 / 1440 = 1.363635

and most likely:

        bih.biXPelsPerMeter=13636

BTW: the above ratio of 1.81818 is different from 16:9 which is
1.77778. I've no idea why BBC uses this "strange" ratio. And
1920x1088 doesn't yield 16:9 either, but 1.76471.

Bye.
-- 
Dipl.-Inform. (FH) Reinhard Nissl
mailto:[EMAIL PROTECTED]

_______________________________________________
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

Reply via email to