QUOTE(kornchild2002)
QUOTE(Firon @ Mar 31 2006, 07:39 PM)
2-pass (or more) encoding CAN give higher quality (for video), by allowing it to figure out which scenes/areas need more or less bitrate for optimal quality. It is not necessarily for keeping at a target bitrate.
100% correct. A 2-pass encoded video file will definately have higher quality than a single pass encoded video yet the 2-pass video will have a slightly smaller file size (kinda like comparing CBR and VBR encoded audio files).
No, IMO this is not correct.
(I only know the details when it comes to the XVID codec, but I assume that other codecs are similar in this respect.)
XVID has 3 different encoding modes:
1. single pass: target bitrate (constant bitrate, similar to LAME's CBR mode)
2. single pass: target quantizer (constant quality, similar to LAME's VBR mode)3. two-pass: target size or target bitrate (constant quality with additional size/bitrate limit)
Two-pass mode is in some way similar to LAME's ABR mode: the encoder tries to achieve the best quality while enforcing the bitrate limit given by the user. (yes, I know that LAME's ABR mode does a single pass only)
@
kornchild2002You compared encoding modes 1 (single pass: target bitrate) and 3 (two-pass: target bitrate).
I know that two-pass mode will give a higher quality result than single pass CBR mode. But mode 2 (single pass: target quantizer) would have achieved this, too.QUOTE(Firon)
I do recall people asking about this before, the only 2-pass thing that could've been done for LAME was to go through and re-optimize the huffman codes, which would bring a drop of maybe a few (single-digit) kbps...
No, LAME can optimize the Huffman codes in a single pass, because it can to an exhaustive search on the entire set of Huffman tables that are specified in the MPEG standard.
(you might have confused this with Ogg Vorbis, which could benefit from a second "Huffman optimizing" pass)
edit: added emphasis