Log in

View Full Version : ffdshow XviD vs libavcodec MP4: Why different Q at same quality ?


www.ADream.de
12th September 2005, 09:37
Hi, group just 2 small questions for the experts:


1)

Encoding with ffdshow 09-Sep-05 at 92% quality:

XviD uses quantizer 4,6
libavcodec MPEG4 uses quantizer 3,0

Why are so different quantizers used to achieve same
92% quality ?




2)
I currently prefer libavcodec MP4 over XviD as it got the "loopback filter" feature which I only knew from H264 implementations so far)while preserving full compatibility whith may DivX Standalone Players.

But anyone compared libavcodec MP4 to XviD in other aspects ? I heard a lot of code was shared between the two but their options in ffdshow look completely different, so I want to go for the best but am still unsure.



Thanx a lot and greetz to all from Germany

Gerry

stephanV
12th September 2005, 10:14
If you are using bframes with xvid that would certainly bring the quant number up since b-frames naturally get a higher quant.

www.ADream.de
12th September 2005, 10:45
If you are using bframes with xvid that would certainly bring the quant number up since b-frames naturally get a higher quant.

Yes that's right but they are both allowed to use 2 consecutive bframes, maybe libavcodec does not use a quantizer offset for it's b-frames ? That would explain..

Anyway I'm currently having them encode the same footage, at 92% quality (libavcodec with rate distorsion, rest set to SATD also loopback filter and data partitioning) and XviD set to 6/1 preset. Let's see who's the "winner" here, will post PSNR and bitrate once they are finished.

stephanV
12th September 2005, 10:54
Yes that's right but they are both allowed to use 2 consecutive bframes, maybe libavcodec does not use a quantizer offset for it's b-frames ? That would explain..
That would be very easy to check using the OSD feature of the ffdshow decoder. :)

www.ADream.de
12th September 2005, 11:11
That would be very easy to check using the OSD feature of the ffdshow decoder. :)

Yes that's where I looked and these are the results

ffdshow build 09-Sep-05 (XviD DLL build 03-Aug-05)
frames encoded: 78878 / ffdshow quality = 92%

libavcodec MPEG4: Q=3 / 509kb/sec / PSNR 49,53 dB
XViD : Q=4,6 / 380kb/sec / PSNR 48,50 dB


No decision this way..

Higher Q means lower bitrate and PSNR, that's what we knew before, so need another test without B-Frames or better without Q offset for B frames..

But what can be said is that same ffdshow q-level (92% here) does not mean same PSNR.

Mug Funky
13th September 2005, 09:23
IIRC, the "loop filter" is currently disabled in libavcodec, and is only really active for h.263+.

but i could be wrong there.