[FFmpeg-user] Decode to BGR24 avi

Timo S timo.infradex at gmail.com
Wed Apr 1 15:47:24 CEST 2015


Carl Eugen Hoyos wrote
> In your original email, you wrote that PSNR was ok 
> if the first (duplicated) frame was removed iirc.

Actually, this got confused with another problem with encoding to mpeg2
which I already figured out. The real problem was not here. Sorry. :)

The real issue with avi decoding was found out by dissecting the avi headers
and comparing them side by side with the one VirtualDub generated.

Here is part of the header that VirtualDub generated:

offset=0xAC
header_size: 40
image_width: 512
image_height: 512
number_of_planes: 1
bits_per_pixel: 24
compression_type: 0

And here the same part that FFmpeg generated:

offset=0xAC
header_size: 40
image_width: 512
image_height: -512
number_of_planes: 1
bits_per_pixel: 24
compression_type: 0

The crucial difference is a negative image_height, indicating that the image
content is upside down. The PSNR calculator did not notice this and so,
because the original avi had a positive height and the comparison avi had a
negative height, bad PSNRs would result.


Carl Eugen Hoyos wrote
> Could you elaborate on "different version"?

I hope the above was sufficient. :) "Different version" means that the two
AVIs that were compared with the PSNR calculator had their contents in
different order. Both were BGR24 uncompressed AVIs. Frame accurately the
same, just their byte content was not in the same order.

Bottom line, the fault was in the PSNR calculator that should have alerted
me.






--
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Decode-to-BGR24-avi-tp4656854p4669771.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.


More information about the ffmpeg-user mailing list