AVIFile output emulation

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(restore a page ref'd by Internal_functions#OPT_AVIPadScanlines)
 
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
= AVIFile output emulation =
 
 
 
OPT_AVIPadScanlines controls the memory alignment used in the AVIFile output emulation, class CAVIFileSynth::, Avisynth input filters should have nothing to do with this output option. Programs that use direct Avisynth API input, e.g x264, will be unaffected by this option, but may choose to support it if appropriate.
 
OPT_AVIPadScanlines controls the memory alignment used in the AVIFile output emulation, class CAVIFileSynth::, Avisynth input filters should have nothing to do with this output option. Programs that use direct Avisynth API input, e.g x264, will be unaffected by this option, but may choose to support it if appropriate.
  
Line 18: Line 16:
  
 
This page has been [http://web.archive.org/web/20130402222933/http://avisynth.org/mediawiki/AVIFile_output_emulation restored] from the  Internet Archive, access date April 2nd, 2013.
 
This page has been [http://web.archive.org/web/20130402222933/http://avisynth.org/mediawiki/AVIFile_output_emulation restored] from the  Internet Archive, access date April 2nd, 2013.
 +
 +
[[Category:Advanced_topics]]

Latest revision as of 04:48, 19 September 2014

OPT_AVIPadScanlines controls the memory alignment used in the AVIFile output emulation, class CAVIFileSynth::, Avisynth input filters should have nothing to do with this output option. Programs that use direct Avisynth API input, e.g x264, will be unaffected by this option, but may choose to support it if appropriate.

Microsoft specify 4 byte, DWORD, alignment for the simple DIB compatible formats, RGB24, RGB32, YUY2 and Y8. They make no specification for other formats, i.e. it is format specific.

Avery Lee in VirtualDub assumes all planar YUV formats are packed, i.e. pitch = rowsize, and all DIB compatible formats are DWORD aligned, i.e. pitch = (rowsize+3)/4 * 4.

By default Avisynth conforms to VirtualDub's alignment and packing expectations. For other software using AVIFile input that may assume DWORD alignment of a planar format the user can set OPT_AVIPadScanlines=True. With VirtualDub's direct stream copy mode the Avisynth AVIFile emulation packing is copied through, so DWORD aligned planar AVI files can be created by this method.

Both DirectShowSource (257) and AviSource (260b3) test for and support both packed and DWORD aligned planar memory layouts.

For image widths such that the chroma rowsize is mod4 there is never an issue, i.e YV24 is mod4, YV16 and YV12 are mod8, YV411 is mod16. But for other widths the assumptions made by the software in use becomes relevant.

If the result of processing a planar output Avisynth script, via the AVIFile interface, shows row skewing then OPT_AVIPadScanlines=True may help.

Source: doom9 thread.

This page has been restored from the Internet Archive, access date April 2nd, 2013.

Personal tools