[FFmpeg-devel] [PATCH]VDPAU support for MPEG-4 ASP
Reimar Döffinger
Reimar.Doeffinger
Sat Sep 5 10:17:08 CEST 2009
On Sat, Sep 05, 2009 at 01:08:46AM +0200, Carl Eugen Hoyos wrote:
> Attached patch adds support for decoding MPEG-4 ASP on Nvidia's latest
> VDPAU hardware.
This brings again up the same question: why do we have an extra codec
for these formats when the acceleration could just be selected via
pixfmt?
> +// greatest common divisor
> +static int gcd(int u, int v)
av_gcd.
> + int d = gcd(s->pp_time, s->pb_time);
> + render->info.mpeg4.trd[0] = s->pp_time / d;
> + render->info.mpeg4.trb[0] = s->pb_time / d;
av_reduce?
> + render->info.mpeg4.trd[1] = (s->time - s->pb_time + s->pp_time
> + + (s->pb_time >> 1))/s->pb_time
> + - (s->time - s->pb_time + (s->pb_time >> 1))/s->pb_time;
> + render->info.mpeg4.trb[1] = (s->time + (s->pb_time >> 1))/s->pb_time
> + - (s->time - s->pb_time + (s->pb_time >> 1))/s->pb_time;
Is it really necessary to round and divide twice?
At least this needs an explaining comment.
> + render->info.mpeg4.vop_coding_type = s->pict_type - FF_I_TYPE;
Hm, not sure if that doesn't assume a bit too much.
More information about the ffmpeg-devel
mailing list