Merge pull request #5722 from akallabeth/primitives_const_source

Modified primitives function pointer to take const pointer to const data
This commit is contained in:
David Fort 2019-11-14 11:30:40 +01:00 committed by GitHub
commit dc44f9ed5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 73 additions and 67 deletions

View File

@ -91,13 +91,15 @@ typedef pstatus_t (*__rShiftC_16u_t)(const UINT16* pSrc, UINT32 val, UINT16* pSr
typedef pstatus_t (*__shiftC_16s_t)(const INT16* pSrc, INT32 val, INT16* pSrcDst, UINT32 len); typedef pstatus_t (*__shiftC_16s_t)(const INT16* pSrc, INT32 val, INT16* pSrcDst, UINT32 len);
typedef pstatus_t (*__shiftC_16u_t)(const UINT16* pSrc, INT32 val, UINT16* pSrcDst, UINT32 len); typedef pstatus_t (*__shiftC_16u_t)(const UINT16* pSrc, INT32 val, UINT16* pSrcDst, UINT32 len);
typedef pstatus_t (*__sign_16s_t)(const INT16* pSrc, INT16* pDst, UINT32 len); typedef pstatus_t (*__sign_16s_t)(const INT16* pSrc, INT16* pDst, UINT32 len);
typedef pstatus_t (*__yCbCrToRGB_16s8u_P3AC4R_t)(const INT16* pSrc[3], UINT32 srcStep, BYTE* pDst, typedef pstatus_t (*__yCbCrToRGB_16s8u_P3AC4R_t)(const INT16* const pSrc[3], UINT32 srcStep,
UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi); const prim_size_t* roi);
typedef pstatus_t (*__yCbCrToRGB_16s16s_P3P3_t)(const INT16* pSrc[3], INT32 srcStep, INT16* pDst[3], typedef pstatus_t (*__yCbCrToRGB_16s16s_P3P3_t)(const INT16* const pSrc[3], INT32 srcStep,
INT32 dstStep, const prim_size_t* roi); INT16* pDst[3], INT32 dstStep,
typedef pstatus_t (*__RGBToYCbCr_16s16s_P3P3_t)(const INT16* pSrc[3], INT32 srcStep, INT16* pDst[3], const prim_size_t* roi);
INT32 dstStep, const prim_size_t* roi); typedef pstatus_t (*__RGBToYCbCr_16s16s_P3P3_t)(const INT16* const pSrc[3], INT32 srcStep,
INT16* pDst[3], INT32 dstStep,
const prim_size_t* roi);
typedef pstatus_t (*__RGBToRGB_16s8u_P3AC4R_t)(const INT16* const pSrc[3], UINT32 srcStep, typedef pstatus_t (*__RGBToRGB_16s8u_P3AC4R_t)(const INT16* const pSrc[3], UINT32 srcStep,
BYTE* pDst, UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi); const prim_size_t* roi);
@ -107,10 +109,10 @@ typedef pstatus_t (*__YCoCgToRGB_8u_AC4R_t)(const BYTE* pSrc, INT32 srcStep, BYT
typedef pstatus_t (*__RGB565ToARGB_16u32u_C3C4_t)(const UINT16* pSrc, INT32 srcStep, UINT32* pDst, typedef pstatus_t (*__RGB565ToARGB_16u32u_C3C4_t)(const UINT16* pSrc, INT32 srcStep, UINT32* pDst,
INT32 dstStep, UINT32 width, UINT32 height, INT32 dstStep, UINT32 width, UINT32 height,
UINT32 format); UINT32 format);
typedef pstatus_t (*__YUV420ToRGB_8u_P3AC4R_t)(const BYTE* pSrc[3], const UINT32 srcStep[3], typedef pstatus_t (*__YUV420ToRGB_8u_P3AC4R_t)(const BYTE* const pSrc[3], const UINT32 srcStep[3],
BYTE* pDst, UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi); const prim_size_t* roi);
typedef pstatus_t (*__YUV444ToRGB_8u_P3AC4R_t)(const BYTE* pSrc[3], const UINT32 srcStep[3], typedef pstatus_t (*__YUV444ToRGB_8u_P3AC4R_t)(const BYTE* const pSrc[3], const UINT32 srcStep[3],
BYTE* pDst, UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi); const prim_size_t* roi);
typedef pstatus_t (*__RGBToYUV420_8u_P3AC4R_t)(const BYTE* pSrc, UINT32 SrcFormat, UINT32 srcStep, typedef pstatus_t (*__RGBToYUV420_8u_P3AC4R_t)(const BYTE* pSrc, UINT32 SrcFormat, UINT32 srcStep,
@ -119,11 +121,11 @@ typedef pstatus_t (*__RGBToYUV420_8u_P3AC4R_t)(const BYTE* pSrc, UINT32 SrcForma
typedef pstatus_t (*__RGBToYUV444_8u_P3AC4R_t)(const BYTE* pSrc, UINT32 SrcFormat, UINT32 srcStep, typedef pstatus_t (*__RGBToYUV444_8u_P3AC4R_t)(const BYTE* pSrc, UINT32 SrcFormat, UINT32 srcStep,
BYTE* pDst[3], UINT32 dstStep[3], BYTE* pDst[3], UINT32 dstStep[3],
const prim_size_t* roi); const prim_size_t* roi);
typedef pstatus_t (*__YUV420CombineToYUV444_t)(avc444_frame_type type, const BYTE* pSrc[3], typedef pstatus_t (*__YUV420CombineToYUV444_t)(avc444_frame_type type, const BYTE* const pSrc[3],
const UINT32 srcStep[3], UINT32 nWidth, const UINT32 srcStep[3], UINT32 nWidth,
UINT32 nHeight, BYTE* pDst[3], UINT32 nHeight, BYTE* pDst[3],
const UINT32 dstStep[3], const RECTANGLE_16* roi); const UINT32 dstStep[3], const RECTANGLE_16* roi);
typedef pstatus_t (*__YUV444SplitToYUV420_t)(const BYTE* pSrc[3], const UINT32 srcStep[3], typedef pstatus_t (*__YUV444SplitToYUV420_t)(const BYTE* const pSrc[3], const UINT32 srcStep[3],
BYTE* pMainDst[3], const UINT32 dstMainStep[3], BYTE* pMainDst[3], const UINT32 dstMainStep[3],
BYTE* pAuxDst[3], const UINT32 srcAuxStep[3], BYTE* pAuxDst[3], const UINT32 srcAuxStep[3],
const prim_size_t* roi); const prim_size_t* roi);

View File

@ -354,7 +354,7 @@ static BOOL avc444_process_rects(H264_CONTEXT* h264, const BYTE* pSrcData, UINT3
UINT32* piDstStride = h264->iYUV444Stride; UINT32* piDstStride = h264->iYUV444Stride;
BYTE** ppYUVDstData = h264->pYUV444Data; BYTE** ppYUVDstData = h264->pYUV444Data;
const UINT32* piStride = h264->iStride; const UINT32* piStride = h264->iStride;
const BYTE** ppYUVData = (const BYTE**)h264->pYUVData; const BYTE* const* ppYUVData = (const BYTE* const*)h264->pYUVData;
if (h264->subsystem->Decompress(h264, pSrcData, SrcSize) < 0) if (h264->subsystem->Decompress(h264, pSrcData, SrcSize) < 0)
return FALSE; return FALSE;

View File

@ -30,7 +30,7 @@
#include <freerdp/codec/color.h> #include <freerdp/codec/color.h>
#include "prim_internal.h" #include "prim_internal.h"
static pstatus_t general_LumaToYUV444(const BYTE* pSrcRaw[3], const UINT32 srcStep[3], static pstatus_t general_LumaToYUV444(const BYTE* const pSrcRaw[3], const UINT32 srcStep[3],
BYTE* pDstRaw[3], const UINT32 dstStep[3], BYTE* pDstRaw[3], const UINT32 dstStep[3],
const RECTANGLE_16* roi) const RECTANGLE_16* roi)
{ {
@ -136,7 +136,7 @@ static pstatus_t general_ChromaFilter(BYTE* pDst[3], const UINT32 dstStep[3],
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t general_ChromaV1ToYUV444(const BYTE* pSrcRaw[3], const UINT32 srcStep[3], static pstatus_t general_ChromaV1ToYUV444(const BYTE* const pSrcRaw[3], const UINT32 srcStep[3],
BYTE* pDstRaw[3], const UINT32 dstStep[3], BYTE* pDstRaw[3], const UINT32 dstStep[3],
const RECTANGLE_16* roi) const RECTANGLE_16* roi)
{ {
@ -211,7 +211,7 @@ static pstatus_t general_ChromaV1ToYUV444(const BYTE* pSrcRaw[3], const UINT32 s
return general_ChromaFilter(pDst, dstStep, roi); return general_ChromaFilter(pDst, dstStep, roi);
} }
static pstatus_t general_ChromaV2ToYUV444(const BYTE* pSrc[3], const UINT32 srcStep[3], static pstatus_t general_ChromaV2ToYUV444(const BYTE* const pSrc[3], const UINT32 srcStep[3],
UINT32 nTotalWidth, UINT32 nTotalHeight, BYTE* pDst[3], UINT32 nTotalWidth, UINT32 nTotalHeight, BYTE* pDst[3],
const UINT32 dstStep[3], const RECTANGLE_16* roi) const UINT32 dstStep[3], const RECTANGLE_16* roi)
{ {
@ -261,7 +261,7 @@ static pstatus_t general_ChromaV2ToYUV444(const BYTE* pSrc[3], const UINT32 srcS
return general_ChromaFilter(pDst, dstStep, roi); return general_ChromaFilter(pDst, dstStep, roi);
} }
static pstatus_t general_YUV420CombineToYUV444(avc444_frame_type type, const BYTE* pSrc[3], static pstatus_t general_YUV420CombineToYUV444(avc444_frame_type type, const BYTE* const pSrc[3],
const UINT32 srcStep[3], UINT32 nWidth, const UINT32 srcStep[3], UINT32 nWidth,
UINT32 nHeight, BYTE* pDst[3], UINT32 nHeight, BYTE* pDst[3],
const UINT32 dstStep[3], const RECTANGLE_16* roi) const UINT32 dstStep[3], const RECTANGLE_16* roi)
@ -291,7 +291,7 @@ static pstatus_t general_YUV420CombineToYUV444(avc444_frame_type type, const BYT
} }
} }
static pstatus_t general_YUV444SplitToYUV420(const BYTE* pSrc[3], const UINT32 srcStep[3], static pstatus_t general_YUV444SplitToYUV420(const BYTE* const pSrc[3], const UINT32 srcStep[3],
BYTE* pMainDst[3], const UINT32 dstMainStep[3], BYTE* pMainDst[3], const UINT32 dstMainStep[3],
BYTE* pAuxDst[3], const UINT32 dstAuxStep[3], BYTE* pAuxDst[3], const UINT32 dstAuxStep[3],
const prim_size_t* roi) const prim_size_t* roi)
@ -377,8 +377,9 @@ static pstatus_t general_YUV444SplitToYUV420(const BYTE* pSrc[3], const UINT32 s
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t general_YUV444ToRGB_8u_P3AC4R_general(const BYTE* pSrc[3], const UINT32 srcStep[3], static pstatus_t general_YUV444ToRGB_8u_P3AC4R_general(const BYTE* const pSrc[3],
BYTE* pDst, UINT32 dstStep, UINT32 DstFormat, const UINT32 srcStep[3], BYTE* pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) const prim_size_t* roi)
{ {
UINT32 x, y; UINT32 x, y;
@ -410,8 +411,9 @@ static pstatus_t general_YUV444ToRGB_8u_P3AC4R_general(const BYTE* pSrc[3], cons
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t general_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE* pSrc[3], const UINT32 srcStep[3], static pstatus_t general_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE* const pSrc[3],
BYTE* pDst, UINT32 dstStep, UINT32 DstFormat, const UINT32 srcStep[3], BYTE* pDst,
UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) const prim_size_t* roi)
{ {
UINT32 x, y; UINT32 x, y;
@ -442,7 +444,7 @@ static pstatus_t general_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE* pSrc[3], const U
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t general_YUV444ToRGB_8u_P3AC4R(const BYTE* pSrc[3], const UINT32 srcStep[3], static pstatus_t general_YUV444ToRGB_8u_P3AC4R(const BYTE* const pSrc[3], const UINT32 srcStep[3],
BYTE* pDst, UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) const prim_size_t* roi)
{ {
@ -462,7 +464,7 @@ static pstatus_t general_YUV444ToRGB_8u_P3AC4R(const BYTE* pSrc[3], const UINT32
* | G | = ( | 256 -48 -120 | | U - 128 | ) >> 8 * | G | = ( | 256 -48 -120 | | U - 128 | ) >> 8
* | B | ( | 256 475 0 | | V - 128 | ) * | B | ( | 256 475 0 | | V - 128 | )
*/ */
static pstatus_t general_YUV420ToRGB_8u_P3AC4R(const BYTE* pSrc[3], const UINT32 srcStep[3], static pstatus_t general_YUV420ToRGB_8u_P3AC4R(const BYTE* const pSrc[3], const UINT32 srcStep[3],
BYTE* pDst, UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) const prim_size_t* roi)
{ {

View File

@ -134,9 +134,10 @@ static INLINE BYTE* neon_YuvToRgbPixel(BYTE* pRGB, int16x8_t Y, int16x8_t D, int
return pRGB; return pRGB;
} }
static INLINE pstatus_t neon_YUV420ToX(const BYTE* pSrc[3], const UINT32 srcStep[3], BYTE* pDst, static INLINE pstatus_t neon_YUV420ToX(const BYTE* const pSrc[3], const UINT32 srcStep[3],
UINT32 dstStep, const prim_size_t* roi, const uint8_t rPos, BYTE* pDst, UINT32 dstStep, const prim_size_t* roi,
const uint8_t gPos, const uint8_t bPos, const uint8_t aPos) const uint8_t rPos, const uint8_t gPos, const uint8_t bPos,
const uint8_t aPos)
{ {
UINT32 y; UINT32 y;
const UINT32 nWidth = roi->width; const UINT32 nWidth = roi->width;
@ -255,7 +256,7 @@ static INLINE pstatus_t neon_YUV420ToX(const BYTE* pSrc[3], const UINT32 srcStep
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t neon_YUV420ToRGB_8u_P3AC4R(const BYTE* pSrc[3], const UINT32 srcStep[3], static pstatus_t neon_YUV420ToRGB_8u_P3AC4R(const BYTE* const pSrc[3], const UINT32 srcStep[3],
BYTE* pDst, UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) const prim_size_t* roi)
{ {
@ -282,9 +283,10 @@ static pstatus_t neon_YUV420ToRGB_8u_P3AC4R(const BYTE* pSrc[3], const UINT32 sr
} }
} }
static INLINE pstatus_t neon_YUV444ToX(const BYTE* pSrc[3], const UINT32 srcStep[3], BYTE* pDst, static INLINE pstatus_t neon_YUV444ToX(const BYTE* const pSrc[3], const UINT32 srcStep[3],
UINT32 dstStep, const prim_size_t* roi, const uint8_t rPos, BYTE* pDst, UINT32 dstStep, const prim_size_t* roi,
const uint8_t gPos, const uint8_t bPos, const uint8_t aPos) const uint8_t rPos, const uint8_t gPos, const uint8_t bPos,
const uint8_t aPos)
{ {
UINT32 y; UINT32 y;
const UINT32 nWidth = roi->width; const UINT32 nWidth = roi->width;
@ -346,7 +348,7 @@ static INLINE pstatus_t neon_YUV444ToX(const BYTE* pSrc[3], const UINT32 srcStep
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t neon_YUV444ToRGB_8u_P3AC4R(const BYTE* pSrc[3], const UINT32 srcStep[3], static pstatus_t neon_YUV444ToRGB_8u_P3AC4R(const BYTE* const pSrc[3], const UINT32 srcStep[3],
BYTE* pDst, UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) const prim_size_t* roi)
{ {
@ -373,7 +375,7 @@ static pstatus_t neon_YUV444ToRGB_8u_P3AC4R(const BYTE* pSrc[3], const UINT32 sr
} }
} }
static pstatus_t neon_LumaToYUV444(const BYTE* pSrcRaw[3], const UINT32 srcStep[3], static pstatus_t neon_LumaToYUV444(const BYTE* const pSrcRaw[3], const UINT32 srcStep[3],
BYTE* pDstRaw[3], const UINT32 dstStep[3], BYTE* pDstRaw[3], const UINT32 dstStep[3],
const RECTANGLE_16* roi) const RECTANGLE_16* roi)
{ {
@ -533,7 +535,7 @@ static pstatus_t neon_ChromaFilter(BYTE* pDst[3], const UINT32 dstStep[3], const
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t neon_ChromaV1ToYUV444(const BYTE* pSrcRaw[3], const UINT32 srcStep[3], static pstatus_t neon_ChromaV1ToYUV444(const BYTE* const pSrcRaw[3], const UINT32 srcStep[3],
BYTE* pDstRaw[3], const UINT32 dstStep[3], BYTE* pDstRaw[3], const UINT32 dstStep[3],
const RECTANGLE_16* roi) const RECTANGLE_16* roi)
{ {
@ -623,7 +625,7 @@ static pstatus_t neon_ChromaV1ToYUV444(const BYTE* pSrcRaw[3], const UINT32 srcS
return neon_ChromaFilter(pDst, dstStep, roi); return neon_ChromaFilter(pDst, dstStep, roi);
} }
static pstatus_t neon_ChromaV2ToYUV444(const BYTE* pSrc[3], const UINT32 srcStep[3], static pstatus_t neon_ChromaV2ToYUV444(const BYTE* const pSrc[3], const UINT32 srcStep[3],
UINT32 nTotalWidth, UINT32 nTotalHeight, BYTE* pDst[3], UINT32 nTotalWidth, UINT32 nTotalHeight, BYTE* pDst[3],
const UINT32 dstStep[3], const RECTANGLE_16* roi) const UINT32 dstStep[3], const RECTANGLE_16* roi)
{ {
@ -705,7 +707,7 @@ static pstatus_t neon_ChromaV2ToYUV444(const BYTE* pSrc[3], const UINT32 srcStep
return neon_ChromaFilter(pDst, dstStep, roi); return neon_ChromaFilter(pDst, dstStep, roi);
} }
static pstatus_t neon_YUV420CombineToYUV444(avc444_frame_type type, const BYTE* pSrc[3], static pstatus_t neon_YUV420CombineToYUV444(avc444_frame_type type, const BYTE* const pSrc[3],
const UINT32 srcStep[3], UINT32 nWidth, UINT32 nHeight, const UINT32 srcStep[3], UINT32 nWidth, UINT32 nHeight,
BYTE* pDst[3], const UINT32 dstStep[3], BYTE* pDst[3], const UINT32 dstStep[3],
const RECTANGLE_16* roi) const RECTANGLE_16* roi)

View File

@ -149,7 +149,7 @@ static __m128i* ssse3_YUV444Pixel(__m128i* dst, __m128i Yraw, __m128i Uraw, __m1
return dst; return dst;
} }
static pstatus_t ssse3_YUV420ToRGB_BGRX(const BYTE** pSrc, const UINT32* srcStep, BYTE* pDst, static pstatus_t ssse3_YUV420ToRGB_BGRX(const BYTE* const* pSrc, const UINT32* srcStep, BYTE* pDst,
UINT32 dstStep, const prim_size_t* roi) UINT32 dstStep, const prim_size_t* roi)
{ {
const UINT32 nWidth = roi->width; const UINT32 nWidth = roi->width;
@ -203,7 +203,7 @@ static pstatus_t ssse3_YUV420ToRGB_BGRX(const BYTE** pSrc, const UINT32* srcStep
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t ssse3_YUV420ToRGB(const BYTE** pSrc, const UINT32* srcStep, BYTE* pDst, static pstatus_t ssse3_YUV420ToRGB(const BYTE* const* pSrc, const UINT32* srcStep, BYTE* pDst,
UINT32 dstStep, UINT32 DstFormat, const prim_size_t* roi) UINT32 dstStep, UINT32 DstFormat, const prim_size_t* roi)
{ {
switch (DstFormat) switch (DstFormat)
@ -217,7 +217,7 @@ static pstatus_t ssse3_YUV420ToRGB(const BYTE** pSrc, const UINT32* srcStep, BYT
} }
} }
static pstatus_t ssse3_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE** pSrc, const UINT32* srcStep, static pstatus_t ssse3_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE* const* pSrc, const UINT32* srcStep,
BYTE* pDst, UINT32 dstStep, BYTE* pDst, UINT32 dstStep,
const prim_size_t* roi) const prim_size_t* roi)
{ {
@ -263,8 +263,8 @@ static pstatus_t ssse3_YUV444ToRGB_8u_P3AC4R_BGRX(const BYTE** pSrc, const UINT3
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t ssse3_YUV444ToRGB_8u_P3AC4R(const BYTE** pSrc, const UINT32* srcStep, BYTE* pDst, static pstatus_t ssse3_YUV444ToRGB_8u_P3AC4R(const BYTE* const* pSrc, const UINT32* srcStep,
UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) const prim_size_t* roi)
{ {
if ((unsigned long)pSrc[0] % 16 || (unsigned long)pSrc[1] % 16 || (unsigned long)pSrc[2] % 16 || if ((unsigned long)pSrc[0] % 16 || (unsigned long)pSrc[1] % 16 || (unsigned long)pSrc[2] % 16 ||
@ -1050,7 +1050,7 @@ static pstatus_t ssse3_RGBToAVC444YUVv2(const BYTE* pSrc, UINT32 srcFormat, UINT
} }
} }
static pstatus_t ssse3_LumaToYUV444(const BYTE* pSrcRaw[3], const UINT32 srcStep[3], static pstatus_t ssse3_LumaToYUV444(const BYTE* const pSrcRaw[3], const UINT32 srcStep[3],
BYTE* pDstRaw[3], const UINT32 dstStep[3], BYTE* pDstRaw[3], const UINT32 dstStep[3],
const RECTANGLE_16* roi) const RECTANGLE_16* roi)
{ {
@ -1210,7 +1210,7 @@ static pstatus_t ssse3_ChromaFilter(BYTE* pDst[3], const UINT32 dstStep[3], cons
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t ssse3_ChromaV1ToYUV444(const BYTE* pSrcRaw[3], const UINT32 srcStep[3], static pstatus_t ssse3_ChromaV1ToYUV444(const BYTE* const pSrcRaw[3], const UINT32 srcStep[3],
BYTE* pDstRaw[3], const UINT32 dstStep[3], BYTE* pDstRaw[3], const UINT32 dstStep[3],
const RECTANGLE_16* roi) const RECTANGLE_16* roi)
{ {
@ -1307,7 +1307,7 @@ static pstatus_t ssse3_ChromaV1ToYUV444(const BYTE* pSrcRaw[3], const UINT32 src
return ssse3_ChromaFilter(pDst, dstStep, roi); return ssse3_ChromaFilter(pDst, dstStep, roi);
} }
static pstatus_t ssse3_ChromaV2ToYUV444(const BYTE* pSrc[3], const UINT32 srcStep[3], static pstatus_t ssse3_ChromaV2ToYUV444(const BYTE* const pSrc[3], const UINT32 srcStep[3],
UINT32 nTotalWidth, UINT32 nTotalHeight, BYTE* pDst[3], UINT32 nTotalWidth, UINT32 nTotalHeight, BYTE* pDst[3],
const UINT32 dstStep[3], const RECTANGLE_16* roi) const UINT32 dstStep[3], const RECTANGLE_16* roi)
{ {
@ -1418,7 +1418,7 @@ static pstatus_t ssse3_ChromaV2ToYUV444(const BYTE* pSrc[3], const UINT32 srcSte
return ssse3_ChromaFilter(pDst, dstStep, roi); return ssse3_ChromaFilter(pDst, dstStep, roi);
} }
static pstatus_t ssse3_YUV420CombineToYUV444(avc444_frame_type type, const BYTE* pSrc[3], static pstatus_t ssse3_YUV420CombineToYUV444(avc444_frame_type type, const BYTE* const pSrc[3],
const UINT32 srcStep[3], UINT32 nWidth, UINT32 nHeight, const UINT32 srcStep[3], UINT32 nWidth, UINT32 nHeight,
BYTE* pDst[3], const UINT32 dstStep[3], BYTE* pDst[3], const UINT32 dstStep[3],
const RECTANGLE_16* roi) const RECTANGLE_16* roi)

View File

@ -31,7 +31,7 @@
#define MINMAX(_v_, _l_, _h_) ((_v_) < (_l_) ? (_l_) : ((_v_) > (_h_) ? (_h_) : (_v_))) #define MINMAX(_v_, _l_, _h_) ((_v_) < (_l_) ? (_l_) : ((_v_) > (_h_) ? (_h_) : (_v_)))
#endif /* !MINMAX */ #endif /* !MINMAX */
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* pSrc[3], UINT32 srcStep, static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* const pSrc[3], UINT32 srcStep,
BYTE* pDst, UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) const prim_size_t* roi)
{ {
@ -72,7 +72,7 @@ static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* pSrc[3], UINT
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_general(const INT16* pSrc[3], UINT32 srcStep, static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_general(const INT16* const pSrc[3], UINT32 srcStep,
BYTE* pDst, UINT32 dstStep, BYTE* pDst, UINT32 dstStep,
UINT32 DstFormat, const prim_size_t* roi) UINT32 DstFormat, const prim_size_t* roi)
{ {
@ -114,8 +114,8 @@ static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R_general(const INT16* pSrc[3], U
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R(const INT16* pSrc[3], UINT32 srcStep, BYTE* pDst, static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R(const INT16* const pSrc[3], UINT32 srcStep,
UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) const prim_size_t* roi)
{ {
switch (DstFormat) switch (DstFormat)
@ -133,8 +133,8 @@ static pstatus_t general_yCbCrToRGB_16s8u_P3AC4R(const INT16* pSrc[3], UINT32 sr
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
static pstatus_t general_yCbCrToRGB_16s16s_P3P3(const INT16* pSrc[3], INT32 srcStep, INT16* pDst[3], static pstatus_t general_yCbCrToRGB_16s16s_P3P3(const INT16* const pSrc[3], INT32 srcStep,
INT32 dstStep, INT16* pDst[3], INT32 dstStep,
const prim_size_t* roi) /* region of interest */ const prim_size_t* roi) /* region of interest */
{ {
/** /**
@ -212,8 +212,8 @@ static pstatus_t general_yCbCrToRGB_16s16s_P3P3(const INT16* pSrc[3], INT32 srcS
} }
/* ------------------------------------------------------------------------- */ /* ------------------------------------------------------------------------- */
static pstatus_t general_RGBToYCbCr_16s16s_P3P3(const INT16* pSrc[3], INT32 srcStep, INT16* pDst[3], static pstatus_t general_RGBToYCbCr_16s16s_P3P3(const INT16* const pSrc[3], INT32 srcStep,
INT32 dstStep, INT16* pDst[3], INT32 dstStep,
const prim_size_t* roi) /* region of interest */ const prim_size_t* roi) /* region of interest */
{ {
/* The encoded YCbCr coefficients are represented as 11.5 fixed-point /* The encoded YCbCr coefficients are represented as 11.5 fixed-point

View File

@ -67,8 +67,8 @@ static inline void GNU_INLINE _mm_prefetch_buffer(char* buffer, int num_bytes)
#endif /* DO_PREFETCH */ #endif /* DO_PREFETCH */
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static pstatus_t sse2_yCbCrToRGB_16s16s_P3P3(const INT16* pSrc[3], int srcStep, INT16* pDst[3], static pstatus_t sse2_yCbCrToRGB_16s16s_P3P3(const INT16* const pSrc[3], int srcStep,
int dstStep, INT16* pDst[3], int dstStep,
const prim_size_t* roi) /* region of interest */ const prim_size_t* roi) /* region of interest */
{ {
__m128i zero, max, r_cr, g_cb, g_cr, b_cb, c4096; __m128i zero, max, r_cr, g_cb, g_cr, b_cb, c4096;
@ -193,8 +193,8 @@ static pstatus_t sse2_yCbCrToRGB_16s16s_P3P3(const INT16* pSrc[3], int srcStep,
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* pSrc[3], UINT32 srcStep, BYTE* pDst, static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* const pSrc[3], UINT32 srcStep,
UINT32 dstStep, BYTE* pDst, UINT32 dstStep,
const prim_size_t* roi) /* region of interest */ const prim_size_t* roi) /* region of interest */
{ {
const __m128i zero = _mm_setzero_si128(); const __m128i zero = _mm_setzero_si128();
@ -380,8 +380,8 @@ static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R_BGRX(const INT16* pSrc[3], UINT32
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R_RGBX(const INT16* pSrc[3], UINT32 srcStep, BYTE* pDst, static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R_RGBX(const INT16* const pSrc[3], UINT32 srcStep,
UINT32 dstStep, BYTE* pDst, UINT32 dstStep,
const prim_size_t* roi) /* region of interest */ const prim_size_t* roi) /* region of interest */
{ {
const __m128i zero = _mm_setzero_si128(); const __m128i zero = _mm_setzero_si128();
@ -566,8 +566,8 @@ static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R_RGBX(const INT16* pSrc[3], UINT32
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R(const INT16* pSrc[3], UINT32 srcStep, BYTE* pDst, static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R(const INT16* const pSrc[3], UINT32 srcStep,
UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) /* region of interest */ const prim_size_t* roi) /* region of interest */
{ {
if (((ULONG_PTR)(pSrc[0]) & 0x0f) || ((ULONG_PTR)(pSrc[1]) & 0x0f) || if (((ULONG_PTR)(pSrc[0]) & 0x0f) || ((ULONG_PTR)(pSrc[1]) & 0x0f) ||
@ -595,8 +595,8 @@ static pstatus_t sse2_yCbCrToRGB_16s8u_P3AC4R(const INT16* pSrc[3], UINT32 srcSt
/* The encodec YCbCr coeffectients are represented as 11.5 fixed-point /* The encodec YCbCr coeffectients are represented as 11.5 fixed-point
* numbers. See the general code above. * numbers. See the general code above.
*/ */
static pstatus_t sse2_RGBToYCbCr_16s16s_P3P3(const INT16* pSrc[3], int srcStep, INT16* pDst[3], static pstatus_t sse2_RGBToYCbCr_16s16s_P3P3(const INT16* const pSrc[3], int srcStep,
int dstStep, INT16* pDst[3], int dstStep,
const prim_size_t* roi) /* region of interest */ const prim_size_t* roi) /* region of interest */
{ {
__m128i min, max, y_r, y_g, y_b, cb_r, cb_g, cb_b, cr_r, cr_g, cr_b; __m128i min, max, y_r, y_g, y_b, cb_r, cb_g, cb_b, cr_r, cr_g, cr_b;
@ -1172,8 +1172,8 @@ sse2_RGBToRGB_16s8u_P3AC4R(const INT16* const pSrc[3], /* 16-bit R,G, and B arra
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#ifdef WITH_NEON #ifdef WITH_NEON
static pstatus_t neon_yCbCrToRGB_16s16s_P3P3(const INT16* pSrc[3], INT32 srcStep, INT16* pDst[3], static pstatus_t neon_yCbCrToRGB_16s16s_P3P3(const INT16* const pSrc[3], INT32 srcStep,
INT32 dstStep, INT16* pDst[3], INT32 dstStep,
const prim_size_t* roi) /* region of interest */ const prim_size_t* roi) /* region of interest */
{ {
/* TODO: If necessary, check alignments and call the general version. */ /* TODO: If necessary, check alignments and call the general version. */
@ -1258,8 +1258,8 @@ static pstatus_t neon_yCbCrToRGB_16s16s_P3P3(const INT16* pSrc[3], INT32 srcStep
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R_X(const INT16* pSrc[3], UINT32 srcStep, BYTE* pDst, static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R_X(const INT16* const pSrc[3], UINT32 srcStep,
UINT32 dstStep, const prim_size_t* roi, BYTE* pDst, UINT32 dstStep, const prim_size_t* roi,
uint8_t rPos, uint8_t gPos, uint8_t bPos, uint8_t rPos, uint8_t gPos, uint8_t bPos,
uint8_t aPos) uint8_t aPos)
{ {
@ -1374,8 +1374,8 @@ static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R_X(const INT16* pSrc[3], UINT32 src
return PRIMITIVES_SUCCESS; return PRIMITIVES_SUCCESS;
} }
static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R(const INT16* pSrc[3], UINT32 srcStep, BYTE* pDst, static pstatus_t neon_yCbCrToRGB_16s8u_P3AC4R(const INT16* const pSrc[3], UINT32 srcStep,
UINT32 dstStep, UINT32 DstFormat, BYTE* pDst, UINT32 dstStep, UINT32 DstFormat,
const prim_size_t* roi) const prim_size_t* roi)
{ {
switch (DstFormat) switch (DstFormat)