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

elupus elupus
Fri Jul 25 14:59:56 CEST 2008


Reimar D?ffinger <Reimar.Doeffinger <at> stud.uni-karlsruhe.de> writes:

> 
> 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
> 

Just files from back in the day, and the likely hood of keeping nuv files 
around that long is probably quite small. Saw you commited the second part. 
Thanx

The less patches I need to maintain for xbmc the better :)

Joakim






More information about the ffmpeg-devel mailing list