[MPlayer-dev-eng] aspect ratio: container vs vd_ffmpeg
Michael Niedermayer
michaelni at gmx.at
Tue May 6 15:41:53 CEST 2003
Hi
On Tuesday 06 May 2003 14:09, Moritz Bunkus wrote:
> Hi.
>
> While implementing aspect ratio support for the Matroska demuxer I
> noticed that vd_ffmpeg.c overrides sh_v->aspect with whatever is stored
> in the MPEG4 stream - even if there is NO special AR stored:
>
> [ffmpeg] aspect_ratio: 0.000000
>
> This way aspect ratio settings from the container will never be taken
> into account. Wouldn't it be better only to override sh_v->aspect if the
> aspect ratio stored in the MPEG4 stream is != 0.0 ? Someone (Rich? I
> think I remember you working on that code) obviously already thought
> about it but uncommented that if:
>
> // if(ctx->last_aspect>=0.01 && ctx->last_aspect<100)
> sh->aspect = ctx->last_aspect;
>
> (in libmpcodecs/vd_ffmpeg.c, line 349)
>
> If I remove those comments then at least the container AR is taken into
> account correctly, but I don't have any test files which have AR info
> stored in the MPEG4 stream, so I cannot test those.
btw, note that mpeg4 doesnt contain a "unknown" aspect ratio value so u cant
distinguish 1:1 pixel aspect (square pixels) from undefinied (IIRC most use
1:1 pixel aspect if its unknown ...)
--
Michael
screen[y][x] ^= cursor[cy][cx]; (violates patent #4,197,590)
median(mv[y-1][x], mv[y][x-1], mv[y+1][x+1]); (violates patent #5,905,535)
buf[i]= qp - buf[i-1]; (violates patent #?)
for more examples, see http://mplayerhq.hu/~michael/patent.html
stop it, see http://petition.eurolinux.org & http://petition.ffii.org/eubsa/en
More information about the MPlayer-dev-eng
mailing list