[MPlayer-dev-eng] Recommend error for bad dimensions
D Richard Felker III
dalias at aerifal.cx
Wed Mar 3 05:43:52 CET 2004
On Wed, Mar 03, 2004 at 02:47:51AM +0100, Michael Niedermayer wrote:
> Hi
>
> On Wednesday 03 March 2004 01:13, Zoltan Hidvegi wrote:
> > > Quoting D Richard Felker III (dalias at aerifal.cx):
> > > > No, this is completely idiotic. Normally you should SCALE after crop,
> > > > in which case any even dimensions are valid for crop. On the other
> > > > hand, it should also be an error if you _scale_ to invalid dimensions.
> > >
> > > But if you round the dimensions you scale to to multiples of 16, you're
> > > liable to screw up the aspect ratio. Maybe you don't care about aspect
> > > ratio, but I've seen quite enough Paula Abdul videos for one lifetime.
> >
> > So instead of flaming, why do not we all just run some test to see
> > exactly what are the effects of non-multiple of 16 encoding. If as
> > Rich claims, it is bad for quality, than we should be able to measure
> > that. So I've encoded the Acacemy Award HDTV broadcast like this:
> >
> > mencoder -cache 8192 The_76th_Annual_Academy_Awards.ts -vop
> > hqdn3d=4:3:3,scale=960:540,field,crop=1912:1076:0:0 -tsprog 1 -sws 7
> > -tskeepbroken -oac copy -ovc lavc -lavcopts
> > vcodec=mpeg4:psnr:mbd=2:v4mv:aspect=16/9:vmax_b_frames=1:trell:cbp:cmp=2:pr
> >ecmp=2:subcmp=2:vpass=1:vqcomp=0.7:vqscale=4 -passlogfile
> > The_76th_Annual_Academy_Awards.log -o The_76th_Annual_Academy_Awards.avi
> >
> > The result:
> >
> > Video stream: 1538.929 kbit/s (192366 bps) size: 2077779380 bytes
> > 10801.168 secs 323692 frames
> >
> > Audio stream: 384.000 kbit/s (48000 bps) size: 518441408 bytes
> > 10800.862 secs PSNR: Y:44.52, Cb:46.88, Cr:47.59, All:45.25
> >
> > As you see, this is 540p, and 540 is not even a multiple os 8. So I've
> > rerun the encoder changing the y dimension to 544:
> it would be interresting to do several encodes at differnt resolutions and
> print the height vs. PSNR graph
IMO it would be even more interesting to restrict the PSNR computation
to just the 8 pixels closest to the borders (so you see gibbs in
action :).
Rich
More information about the MPlayer-dev-eng
mailing list