Video Converter: FAQ

From AVObjects Knowledge Base
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
This is the FAQ page for the [[Video Converter]] DirectShow filter.
 
This is the FAQ page for the [[Video Converter]] DirectShow filter.
  
'''Q:''' What CPU extensions are used?
+
'''What CPU extensions are used?'''
  
:'''A:''' We use MMX, SSE and SSE2 extensions with auto detection of supported features.
+
We use MMX, SSE and SSE2 extensions with auto detection of supported features.
  
'''Q:''' What is precision used?
+
'''What is precision used?'''
  
:'''A:''' Integer base algorithm.
+
Integer base algorithm.
  
'''Q:''' What is the technique implemented in each resize method?
+
'''What is the technique implemented in each resize method?'''
  
:'''A:''' As follows:
+
As follows:
  
 
eVCR_Nearest,                // Neighbours neirborn <br>
 
eVCR_Nearest,                // Neighbours neirborn <br>
Line 24: Line 24:
 
eVCR_MPHamming        // Weight-based algorithm with hamming distribution<br>
 
eVCR_MPHamming        // Weight-based algorithm with hamming distribution<br>
  
'''Q:''' How to use programmatically only those resize methods that I need?
+
'''How to use programmatically only those resize methods that I need?'''
  
:'''A:''' You can set them via via IVideoConverter2::SetConversionProps2().
+
You can set them via via IVideoConverter2::SetConversionProps2().
 +
 
 +
'''How do I use the Video Converter to downscale HD material to SD?'''
 +
 
 +
For this purpose you need to specify the CONVERTER_PROPS2 structure:
 +
 
 +
<code lang="cpp">
 +
CONVERTER_PROPS2 cnvProps2;
 +
::ZeroMemory( &cnvProps2, sizeof(cnvProps2) );
 +
cnvProps.eInterlaceIn = eVCI_Auto; // or eVCI_Field1First, eVCI_Field2First, eVCI_Progressive for manual set interlace
 +
cnvProps.nAspectIn = 0; // For use VideoInfoHeader2 flags or e.g. MAKELPARAM( 16, 9 ) for 16:9 AR
 +
cnvProps.eInterlaceIn = eVCI_Auto; // or eVCI_Field1First, eVCI_Field2First, eVCI_Progressive for manual set interlace
 +
cnvProps.szOutput.cx = 720;
 +
cnvProps.szOutput.cy = 576;
 +
cnvProps.nAspectOut = MAKELPARAM( 4, 3 );
 +
cnvProps.eKeepAspect2 = eVCKA_LetterBox; // or eVCKA_Crop for crop or eVCKA_None for not maintain AR
 +
cnvProps.eResize = eVCR_CubicWithMP; // See eVCResize for other interplation algorithms
 +
cnvProps.eFieldProcess = eVCFP_Auto; // See eVCFieldProcess for other options
 +
cnvProps.optimization = eThreadPerProc; // Or eOneThread - for work in 'sync' mode
 +
cnvProps.dwUseCPUMask = -1; // Use all available cores/CPUs
 +
 
 +
int nMask = VC_ALL_MASK;
 +
cpVideConverter->SetConversionProps2( &cnvProps, &nMask );
 +
</code>
  
 
[[Category:FAQs]]
 
[[Category:FAQs]]

Revision as of 13:23, 9 July 2008

This is the FAQ page for the Video Converter DirectShow filter.

What CPU extensions are used?

We use MMX, SSE and SSE2 extensions with auto detection of supported features.

What is precision used?

Integer base algorithm.

What is the technique implemented in each resize method?

As follows:

eVCR_Nearest, // Neighbours neirborn
eVCR_Linear, // Linear interpolation (bilinear)
eVCR_Cubic, // Cubic interpolation (bicubic)
eVCR_Super, // Super sampling interpolation (bicubic in enlarge case)
eVCR_Lanczos, // Lanczos interpolation
eVCR_CubicWithMP, // Cubic interpolation for horizontal and weight-based with gauss distribution for vertical; useful for resize interlaced video
eVCR_MPLinear, // Weight-based algorithm with linear distribution
eVCR_MPGauss, // Weight-based algorithm with gauss distribution
eVCR_MPBlackman, // Weight-based algorithm with blackman distribution
eVCR_MPHamming // Weight-based algorithm with hamming distribution

How to use programmatically only those resize methods that I need?

You can set them via via IVideoConverter2::SetConversionProps2().

How do I use the Video Converter to downscale HD material to SD?

For this purpose you need to specify the CONVERTER_PROPS2 structure:

CONVERTER_PROPS2 cnvProps2;

ZeroMemory( &cnvProps2, sizeof(cnvProps2) );

cnvProps.eInterlaceIn = eVCI_Auto; // or eVCI_Field1First, eVCI_Field2First, eVCI_Progressive for manual set interlace cnvProps.nAspectIn = 0; // For use VideoInfoHeader2 flags or e.g. MAKELPARAM( 16, 9 ) for 16:9 AR cnvProps.eInterlaceIn = eVCI_Auto; // or eVCI_Field1First, eVCI_Field2First, eVCI_Progressive for manual set interlace cnvProps.szOutput.cx = 720; cnvProps.szOutput.cy = 576; cnvProps.nAspectOut = MAKELPARAM( 4, 3 ); cnvProps.eKeepAspect2 = eVCKA_LetterBox; // or eVCKA_Crop for crop or eVCKA_None for not maintain AR cnvProps.eResize = eVCR_CubicWithMP; // See eVCResize for other interplation algorithms cnvProps.eFieldProcess = eVCFP_Auto; // See eVCFieldProcess for other options cnvProps.optimization = eThreadPerProc; // Or eOneThread - for work in 'sync' mode cnvProps.dwUseCPUMask = -1; // Use all available cores/CPUs

int nMask = VC_ALL_MASK; cpVideConverter->SetConversionProps2( &cnvProps, &nMask );

Personal tools