[MPlayer-dev-eng] Recommend error for bad dimensions

Michael Niedermayer michaelni at gmx.at
Wed Mar 3 02:47:51 CET 2004


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 

[...]
-- 
Michael
level[i]= get_vlc(); i+=get_vlc();		(violates patent EP0266049)
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