AJA NTV2 SDK  17.5.0.1242
NTV2 SDK 17.5.0.1242
ntv2transcode.cpp File Reference

Implements a number of pixel format transcoder functions. More...

#include "ntv2transcode.h"
#include "ntv2endian.h"
Include dependency graph for ntv2transcode.cpp:

Go to the source code of this file.

Functions

bool ConvertLine_2vuy_to_v210 (const UByte *pSrc2vuyLine, ULWord *pDstv210Line, const ULWord inNumPixels)
 Converts a single 8-bit YCbCr '2vuy' raster line to 10-bit YCbCr 'v210' (from NTV2_FBF_8BIT_YCBCR to NTV2_FBF_10BIT_YCBCR ). More...
 
bool ConvertLine_2vuy_to_yuy2 (const UByte *pInSrcLine_2vuy, UWord *pOutDstLine_yuy2, const ULWord inNumPixels)
 Converts a single 8-bit YCbCr '2vuy' raster line to 10-bit YCbCr 'v210' (from NTV2_FBF_8BIT_YCBCR to NTV2_FBF_8BIT_YCBCR_YUY2 ). More...
 
bool ConvertLine_v210_to_2vuy (const ULWord *pSrcv210Line, UByte *pDst2vuyLine, const ULWord inNumPixels)
 Converts a single 10-bit YCbCr 'v210' raster line to 8-bit YCbCr '2vuy'. More...
 
bool ConvertLine_v210_to_2vuy (const void *pInSrcLine_v210, std::vector< uint8_t > &outDstLine2vuy, const ULWord inNumPixels)
 Converts a single 10-bit YCbCr 'v210' raster line to 8-bit YCbCr '2vuy' vector. More...
 
bool ConvertLine_8bitABGR_to_10bitABGR (const UByte *pInSrcLine_8bitABGR, ULWord *pOutDstLine_10BitABGR, const ULWord inNumPixels)
 Converts a single 8-bit ABGR raster line to 10-bit ABGR (from NTV2_FBF_ABGR to NTV2_FBF_10BIT_RGB ). More...
 
bool ConvertLine_8bitABGR_to_10bitRGBDPX (const UByte *pInSrcLine_8bitABGR, ULWord *pOutDstLine_10BitDPX, const ULWord inNumPixels)
 Converts a single 8-bit ABGR raster line to 10-bit RGB DPX (from NTV2_FBF_ABGR to NTV2_FBF_10BIT_DPX ). More...
 
bool ConvertLine_8bitABGR_to_10bitRGBDPXLE (const UByte *pInSrcLine_8bitABGR, ULWord *pOutDstLine_10BitDPXLE, const ULWord inNumPixels)
 Converts a single 8-bit ABGR raster line to 10-bit RGB DPX (from NTV2_FBF_ABGR to NTV2_FBF_10BIT_DPX_LE ). More...
 
bool ConvertLine_8bitABGR_to_24bitRGB (const UByte *pInSrcLine_8bitABGR, UByte *pOutDstLine_24BitRGB, const ULWord inNumPixels)
 Converts a single 8-bit ABGR raster line to 24-bit RGB (from NTV2_FBF_ABGR to NTV2_FBF_24BIT_RGB ). More...
 
bool ConvertLine_8bitABGR_to_24bitBGR (const UByte *pInSrcLine_8bitABGR, UByte *pOutDstLine_24BitBGR, const ULWord inNumPixels)
 Converts a single 8-bit ABGR raster line to 24-bit BGR (from NTV2_FBF_ABGR to NTV2_FBF_24BIT_BGR ). More...
 
bool ConvertLine_8bitABGR_to_48bitRGB (const UByte *pInSrcLine_8bitABGR, ULWord *pOutDstLine_48BitRGB, const ULWord inNumPixels)
 Converts a single 8-bit ABGR raster line to 48-bit RGB (from NTV2_FBF_ABGR to NTV2_FBF_48BIT_RGB ). More...
 
void ConvertLineToYCbCr422 (RGBAlphaPixel *RGBLine, UByte *YCbCrLine, LWord numPixels, LWord startPixel, bool fUseSDMatrix)
 
void ConvertLineToYCbCr422 (RGBAlphaPixel *RGBLine, UWord *YCbCrLine, LWord numPixels, LWord startPixel, bool fUseSDMatrix)
 
void ConvertLinetoRGB (UByte *ycbcrBuffer, RGBAlphaPixel *rgbaBuffer, ULWord numPixels, bool fUseSDMatrix, bool fUseSMPTERange)
 
void ConvertLinetoRGB (UWord *ycbcrBuffer, RGBAlphaPixel *rgbaBuffer, ULWord numPixels, bool fUseSDMatrix, bool fUseSMPTERange, bool fAlphaFromLuma)
 
void ConvertRGBALineToRGB (RGBAlphaPixel *rgbaBuffer, ULWord numPixels)
 
void ConvertRGBALineToBGR (RGBAlphaPixel *rgbaBuffer, ULWord numPixels)
 
void ConvertLineto10BitRGB (UWord *ycbcrBuffer, RGBAlpha10BitPixel *rgbaBuffer, ULWord numPixels, bool fUseSDMatrix, bool fUseSMPTERange)
 
void ConvertLineto10BitYCbCrA (const UWord *pInYCbCrBuffer, ULWord *pOutYCbCrABuffer, const ULWord inNumPixels)
 
void ConvertLineto10BitRGB (const RGBAlphaPixel *pInRGBA8Buffer, ULWord *pOutRGB10Buffer, const ULWord inNumPixels)
 
void ConvertRGBLineto10BitRGB (const RGBAlphaPixel *pInRGBA8Buffer, RGBAlpha10BitPixel *pOutRGBA10Buffer, const ULWord inNumPixels)
 
void ConvertLineto8BitYCbCr (UWord *ycbcr10BitBuffer, UByte *ycbcr8BitBuffer, ULWord numPixels)
 
void Convert8BitYCbCrToYUY2 (UByte *ycbcrBuffer, ULWord numPixels)
 
void ConvertARGBYCbCrToRGBA (UByte *rgbaBuffer, ULWord numPixels)
 
void ConvertARGBYCbCrToABGR (UByte *rgbaBuffer, ULWord numPixels)
 
void ConvertARGBToRGB (UByte *rgbaLineBuffer, UByte *rgbLineBuffer, ULWord numPixels)
 
void Convert16BitARGBTo16BitRGBEx (UWord *rgbaLineBuffer, UWord *rgbLineBuffer, ULWord numPixels)
 
void Convert16BitARGBTo16BitRGB (RGBAlpha16BitPixel *rgbaLineBuffer, UWord *rgbLineBuffer, ULWord numPixels)
 
void Convert16BitARGBTo12BitRGBPacked (RGBAlpha16BitPixel *rgbaLineBuffer, UByte *rgbLineBuffer, ULWord numPixels)
 
void ConvertARGBToBGR (const UByte *pInRGBALineBuffer, UByte *pOutRGBLineBuffer, const ULWord inNumPixels)
 
void PackRGB10BitFor10BitRGB (RGBAlpha10BitPixel *pBuffer, const ULWord inNumPixels)
 
void PackRGB10BitFor10BitDPX (RGBAlpha10BitPixel *pBuffer, const ULWord inNumPixels, const bool inBigEndian)
 
void PackRGB10BitFor10BitRGBPacked (RGBAlpha10BitPixel *pBuffer, const ULWord inNumPixels)
 
void ConvertLineto16BitRGB (UWord *ycbcrBuffer, RGBAlpha16BitPixel *rgbaBuffer, ULWord numPixels, bool fUseSDMatrix, bool fUseSMPTERange)
 

Detailed Description

Implements a number of pixel format transcoder functions.

Definition in file ntv2transcode.cpp.

Function Documentation

◆ Convert16BitARGBTo12BitRGBPacked()

void Convert16BitARGBTo12BitRGBPacked ( RGBAlpha16BitPixel rgbaLineBuffer,
UByte rgbLineBuffer,
ULWord  numPixels 
)

Definition at line 705 of file ntv2transcode.cpp.

◆ Convert16BitARGBTo16BitRGB()

void Convert16BitARGBTo16BitRGB ( RGBAlpha16BitPixel rgbaLineBuffer,
UWord rgbLineBuffer,
ULWord  numPixels 
)

Definition at line 692 of file ntv2transcode.cpp.

◆ Convert16BitARGBTo16BitRGBEx()

void Convert16BitARGBTo16BitRGBEx ( UWord rgbaLineBuffer,
UWord rgbLineBuffer,
ULWord  numPixels 
)

Definition at line 677 of file ntv2transcode.cpp.

◆ Convert8BitYCbCrToYUY2()

void Convert8BitYCbCrToYUY2 ( UByte ycbcrBuffer,
ULWord  numPixels 
)

Definition at line 613 of file ntv2transcode.cpp.

◆ ConvertARGBToBGR()

void ConvertARGBToBGR ( const UByte pInRGBALineBuffer,
UByte pOutRGBLineBuffer,
const ULWord  inNumPixels 
)

Definition at line 731 of file ntv2transcode.cpp.

◆ ConvertARGBToRGB()

void ConvertARGBToRGB ( UByte rgbaLineBuffer,
UByte rgbLineBuffer,
ULWord  numPixels 
)

Definition at line 662 of file ntv2transcode.cpp.

◆ ConvertARGBYCbCrToABGR()

void ConvertARGBYCbCrToABGR ( UByte rgbaBuffer,
ULWord  numPixels 
)

Definition at line 646 of file ntv2transcode.cpp.

◆ ConvertARGBYCbCrToRGBA()

void ConvertARGBYCbCrToRGBA ( UByte rgbaBuffer,
ULWord  numPixels 
)

Definition at line 630 of file ntv2transcode.cpp.

◆ ConvertLine_2vuy_to_v210()

bool ConvertLine_2vuy_to_v210 ( const UByte pInSrcLine_2vuy,
ULWord pOutDstLine_v210,
const ULWord  inNumPixels 
)

Converts a single 8-bit YCbCr '2vuy' raster line to 10-bit YCbCr 'v210' (from NTV2_FBF_8BIT_YCBCR to NTV2_FBF_10BIT_YCBCR ).

Parameters
[in]pInSrcLine_2vuySpecifies a valid, non-NULL address of the first byte of the '2vuy' raster line to be converted.
[out]pOutDstLine_v210Specifies a valid, non-NULL address of the first byte of the 'v210' raster line to receive the converted data.
[in]inNumPixelsThe number of pixels to be converted.
Returns
True if successful; otherwise false.

Definition at line 14 of file ntv2transcode.cpp.

◆ ConvertLine_2vuy_to_yuy2()

bool ConvertLine_2vuy_to_yuy2 ( const UByte pInSrcLine_2vuy,
UWord pOutDstLine_yuy2,
const ULWord  inNumPixels 
)

Converts a single 8-bit YCbCr '2vuy' raster line to 10-bit YCbCr 'v210' (from NTV2_FBF_8BIT_YCBCR to NTV2_FBF_8BIT_YCBCR_YUY2 ).

Parameters
[in]pInSrcLine_2vuySpecifies a valid, non-NULL address of the first byte of the '2vuy' raster line to be converted.
[out]pOutDstLine_yuy2Specifies a valid, non-NULL address of the first byte of the 'YUY2' raster line to receive the converted data.
[in]inNumPixelsThe number of pixels to be converted.
Returns
True if successful; otherwise false.

Definition at line 32 of file ntv2transcode.cpp.

◆ ConvertLine_8bitABGR_to_10bitABGR()

bool ConvertLine_8bitABGR_to_10bitABGR ( const UByte pInSrcLine_8bitABGR,
ULWord pOutDstLine_10BitABGR,
const ULWord  inNumPixels 
)

Converts a single 8-bit ABGR raster line to 10-bit ABGR (from NTV2_FBF_ABGR to NTV2_FBF_10BIT_RGB ).

Parameters
[in]pInSrcLine_8bitABGRSpecifies a valid, non-NULL address of the first byte of the 8-bit ABGR raster line to be converted.
[out]pOutDstLine_10BitABGRSpecifies a valid, non-NULL address of the first byte of the 10-bit ABGR raster line to receive the converted data.
[in]inNumPixelsThe number of pixels to be converted.
Returns
True if successful; otherwise false.

Definition at line 90 of file ntv2transcode.cpp.

◆ ConvertLine_8bitABGR_to_10bitRGBDPX()

bool ConvertLine_8bitABGR_to_10bitRGBDPX ( const UByte pInSrcLine_8bitABGR,
ULWord pOutDstLine_10BitDPX,
const ULWord  inNumPixels 
)

Converts a single 8-bit ABGR raster line to 10-bit RGB DPX (from NTV2_FBF_ABGR to NTV2_FBF_10BIT_DPX ).

Parameters
[in]pInSrcLine_8bitABGRSpecifies a valid, non-NULL address of the first byte of the 8-bit ABGR raster line to be converted.
[out]pOutDstLine_10BitDPXSpecifies a valid, non-NULL address of the first byte of the 10-bit RGB DPX raster line to receive the converted data.
[in]inNumPixelsThe number of pixels to be converted.
Returns
True if successful; otherwise false.

Definition at line 110 of file ntv2transcode.cpp.

◆ ConvertLine_8bitABGR_to_10bitRGBDPXLE()

bool ConvertLine_8bitABGR_to_10bitRGBDPXLE ( const UByte pInSrcLine_8bitABGR,
ULWord pOutDstLine_10BitDPXLE,
const ULWord  inNumPixels 
)

Converts a single 8-bit ABGR raster line to 10-bit RGB DPX (from NTV2_FBF_ABGR to NTV2_FBF_10BIT_DPX_LE ).

Parameters
[in]pInSrcLine_8bitABGRSpecifies a valid, non-NULL address of the first byte of the 8-bit ABGR raster line to be converted.
[out]pOutDstLine_10BitDPXLESpecifies a valid, non-NULL address of the first byte of the 10-bit RGB DPX LE raster line to receive the converted data.
[in]inNumPixelsThe number of pixels to be converted.
Returns
True if successful; otherwise false.

Definition at line 129 of file ntv2transcode.cpp.

◆ ConvertLine_8bitABGR_to_24bitBGR()

bool ConvertLine_8bitABGR_to_24bitBGR ( const UByte pInSrcLine_8bitABGR,
UByte pOutDstLine_24BitBGR,
const ULWord  inNumPixels 
)

Converts a single 8-bit ABGR raster line to 24-bit BGR (from NTV2_FBF_ABGR to NTV2_FBF_24BIT_BGR ).

Parameters
[in]pInSrcLine_8bitABGRSpecifies a valid, non-NULL address of the first byte of the 8-bit ABGR raster line to be converted.
[out]pOutDstLine_24BitBGRSpecifies a valid, non-NULL address of the first byte of the 24-bit BGR raster line to receive the converted data.
[in]inNumPixelsThe number of pixels to be converted.
Returns
True if successful; otherwise false.

Definition at line 167 of file ntv2transcode.cpp.

◆ ConvertLine_8bitABGR_to_24bitRGB()

bool ConvertLine_8bitABGR_to_24bitRGB ( const UByte pInSrcLine_8bitABGR,
UByte pOutDstLine_24BitRGB,
const ULWord  inNumPixels 
)

Converts a single 8-bit ABGR raster line to 24-bit RGB (from NTV2_FBF_ABGR to NTV2_FBF_24BIT_RGB ).

Parameters
[in]pInSrcLine_8bitABGRSpecifies a valid, non-NULL address of the first byte of the 8-bit ABGR raster line to be converted.
[out]pOutDstLine_24BitRGBSpecifies a valid, non-NULL address of the first byte of the 24-bit RGB raster line to receive the converted data.
[in]inNumPixelsThe number of pixels to be converted.
Returns
True if successful; otherwise false.

Definition at line 148 of file ntv2transcode.cpp.

◆ ConvertLine_8bitABGR_to_48bitRGB()

bool ConvertLine_8bitABGR_to_48bitRGB ( const UByte pInSrcLine_8bitABGR,
ULWord pOutDstLine_48BitRGB,
const ULWord  inNumPixels 
)

Converts a single 8-bit ABGR raster line to 48-bit RGB (from NTV2_FBF_ABGR to NTV2_FBF_48BIT_RGB ).

Parameters
[in]pInSrcLine_8bitABGRSpecifies a valid, non-NULL address of the first byte of the 8-bit ABGR raster line to be converted.
[out]pOutDstLine_48BitRGBSpecifies a valid, non-NULL address of the first byte of the 48-bit RGB raster line to receive the converted data.
[in]inNumPixelsThe number of pixels to be converted.
Returns
True if successful; otherwise false.

Definition at line 187 of file ntv2transcode.cpp.

◆ ConvertLine_v210_to_2vuy() [1/2]

bool ConvertLine_v210_to_2vuy ( const ULWord pInSrcLine_v210,
UByte pOutDstLine_2vuy,
const ULWord  inNumPixels 
)

Converts a single 10-bit YCbCr 'v210' raster line to 8-bit YCbCr '2vuy'.

Parameters
[in]pInSrcLine_v210Specifies a valid, non-NULL address of the first byte of the 'v210' raster line to be converted.
[out]pOutDstLine_2vuySpecifies a valid, non-NULL address of the first byte of the '2vuy' raster line to receive the converted data.
[in]inNumPixelsThe number of pixels to be converted.
Returns
True if successful; otherwise false.

Definition at line 49 of file ntv2transcode.cpp.

◆ ConvertLine_v210_to_2vuy() [2/2]

bool ConvertLine_v210_to_2vuy ( const void *  pInSrcLine_v210,
std::vector< uint8_t > &  outDstLine2vuy,
const ULWord  inNumPixels 
)

Converts a single 10-bit YCbCr 'v210' raster line to 8-bit YCbCr '2vuy' vector.

Parameters
[in]pInSrcLine_v210Specifies a valid, non-NULL address of the first byte of the 'v210' raster line to be converted.
[out]outDstLine2vuyReceives the 8-bit '2vuy' vector. Will be cleared upon entry and filled upon exit.
[in]inNumPixelsThe number of pixels to be converted.
Returns
True if successful; otherwise false.

Definition at line 69 of file ntv2transcode.cpp.

◆ ConvertLineto10BitRGB() [1/2]

void ConvertLineto10BitRGB ( const RGBAlphaPixel pInRGBA8Buffer,
ULWord pOutRGB10Buffer,
const ULWord  inNumPixels 
)

Definition at line 566 of file ntv2transcode.cpp.

◆ ConvertLineto10BitRGB() [2/2]

void ConvertLineto10BitRGB ( UWord ycbcrBuffer,
RGBAlpha10BitPixel rgbaBuffer,
ULWord  numPixels,
bool  fUseSDMatrix,
bool  fUseSMPTERange 
)

Definition at line 475 of file ntv2transcode.cpp.

◆ ConvertLineto10BitYCbCrA()

void ConvertLineto10BitYCbCrA ( const UWord pInYCbCrBuffer,
ULWord pOutYCbCrABuffer,
const ULWord  inNumPixels 
)

Definition at line 551 of file ntv2transcode.cpp.

◆ ConvertLineto16BitRGB()

void ConvertLineto16BitRGB ( UWord ycbcrBuffer,
RGBAlpha16BitPixel rgbaBuffer,
ULWord  numPixels,
bool  fUseSDMatrix,
bool  fUseSMPTERange 
)

Definition at line 850 of file ntv2transcode.cpp.

◆ ConvertLineto8BitYCbCr()

void ConvertLineto8BitYCbCr ( UWord ycbcr10BitBuffer,
UByte ycbcr8BitBuffer,
ULWord  numPixels 
)

Definition at line 601 of file ntv2transcode.cpp.

◆ ConvertLinetoRGB() [1/2]

void ConvertLinetoRGB ( UByte ycbcrBuffer,
RGBAlphaPixel rgbaBuffer,
ULWord  numPixels,
bool  fUseSDMatrix,
bool  fUseSMPTERange 
)

Definition at line 280 of file ntv2transcode.cpp.

◆ ConvertLinetoRGB() [2/2]

void ConvertLinetoRGB ( UWord ycbcrBuffer,
RGBAlphaPixel rgbaBuffer,
ULWord  numPixels,
bool  fUseSDMatrix,
bool  fUseSMPTERange,
bool  fAlphaFromLuma 
)

Definition at line 348 of file ntv2transcode.cpp.

◆ ConvertLineToYCbCr422() [1/2]

void ConvertLineToYCbCr422 ( RGBAlphaPixel RGBLine,
UByte YCbCrLine,
LWord  numPixels,
LWord  startPixel,
bool  fUseSDMatrix 
)

Definition at line 209 of file ntv2transcode.cpp.

◆ ConvertLineToYCbCr422() [2/2]

void ConvertLineToYCbCr422 ( RGBAlphaPixel RGBLine,
UWord YCbCrLine,
LWord  numPixels,
LWord  startPixel,
bool  fUseSDMatrix 
)

Definition at line 243 of file ntv2transcode.cpp.

◆ ConvertRGBALineToBGR()

void ConvertRGBALineToBGR ( RGBAlphaPixel rgbaBuffer,
ULWord  numPixels 
)

Definition at line 453 of file ntv2transcode.cpp.

◆ ConvertRGBALineToRGB()

void ConvertRGBALineToRGB ( RGBAlphaPixel rgbaBuffer,
ULWord  numPixels 
)

Definition at line 429 of file ntv2transcode.cpp.

◆ ConvertRGBLineto10BitRGB()

void ConvertRGBLineto10BitRGB ( const RGBAlphaPixel pInRGBA8Buffer,
RGBAlpha10BitPixel pOutRGBA10Buffer,
const ULWord  inNumPixels 
)

Definition at line 583 of file ntv2transcode.cpp.

◆ PackRGB10BitFor10BitDPX()

void PackRGB10BitFor10BitDPX ( RGBAlpha10BitPixel pBuffer,
const ULWord  inNumPixels,
const bool  inBigEndian 
)

Definition at line 761 of file ntv2transcode.cpp.

◆ PackRGB10BitFor10BitRGB()

void PackRGB10BitFor10BitRGB ( RGBAlpha10BitPixel pBuffer,
const ULWord  inNumPixels 
)

Definition at line 746 of file ntv2transcode.cpp.

◆ PackRGB10BitFor10BitRGBPacked()

void PackRGB10BitFor10BitRGBPacked ( RGBAlpha10BitPixel pBuffer,
const ULWord  inNumPixels 
)

Definition at line 780 of file ntv2transcode.cpp.