[FFmpeg-devel] [PATCH/RFC] honor DAR aspect ratio in nuv files.

Reimar Döffinger Reimar.Doeffinger
Fri Jul 25 06:14:12 CEST 2008


On Thu, Jul 24, 2008 at 10:52:24PM +0200, elupus wrote:
> On Thu, 24 Jul 2008 20:46:33 +0200, Reimar D?ffinger wrote:
> >> @@ -156,7 +158,7 @@ static int nuv_header(AVFormatContext *s, AVFormatParameters *ap) {
> >>          vst->codec->width = width;
> >>          vst->codec->height = height;
> >>          vst->codec->bits_per_sample = 10;
> >> -        vst->codec->sample_aspect_ratio = av_d2q(aspect, 10000);
> >> +        vst->codec->sample_aspect_ratio = av_d2q(aspect*height/width, 10000);
> > 
> > I applied that part.
> 
> Heh, and in doing that you broke all old nuv files :). Without the first
> part, they break.

I was aware of that, though I did not consider it "break", since if the
code now is correct, they were already wrong before, it just was not so obvious
(with the exception of files where the width/height ratio was indeed
4/3, but those sure aren't all of them, if even the majority).

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list