Commit 2816ce4c authored by Cédric Schieli's avatar Cédric Schieli

Split YUV2RGB operands declaration into a separate macro

Originally committed as revision 28972 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
parent f05783c2
...@@ -162,7 +162,8 @@ ...@@ -162,7 +162,8 @@
"add $"AV_STRINGIFY(depth*8)", %1 \n\t" \ "add $"AV_STRINGIFY(depth*8)", %1 \n\t" \
"add $4, %0 \n\t" \ "add $4, %0 \n\t" \
" js 1b \n\t" \ " js 1b \n\t" \
\
#define YUV2RGB_OPERANDS \
: "+r" (index), "+r" (image) \ : "+r" (index), "+r" (image) \
: "r" (pu - index), "r" (pv - index), "r"(&c->redDither), "r" (py - 2*index) \ : "r" (pu - index), "r" (pv - index), "r"(&c->redDither), "r" (py - 2*index) \
); \ ); \
...@@ -223,6 +224,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr ...@@ -223,6 +224,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr
MOVNTQ " %%mm5, 8 (%1);" /* store pixel 4-7 */ MOVNTQ " %%mm5, 8 (%1);" /* store pixel 4-7 */
YUV2RGB_ENDLOOP(2) YUV2RGB_ENDLOOP(2)
YUV2RGB_OPERANDS
} }
static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
...@@ -280,6 +282,7 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr ...@@ -280,6 +282,7 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr
MOVNTQ " %%mm5, 8 (%1);" /* store pixel 4-7 */ MOVNTQ " %%mm5, 8 (%1);" /* store pixel 4-7 */
YUV2RGB_ENDLOOP(2) YUV2RGB_ENDLOOP(2)
YUV2RGB_OPERANDS
} }
static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
...@@ -394,6 +397,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr ...@@ -394,6 +397,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr
#endif #endif
YUV2RGB_ENDLOOP(3) YUV2RGB_ENDLOOP(3)
YUV2RGB_OPERANDS
} }
#define RGB_PLANAR2PACKED32 \ #define RGB_PLANAR2PACKED32 \
...@@ -450,4 +454,5 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr ...@@ -450,4 +454,5 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr
RGB_PLANAR2PACKED32 RGB_PLANAR2PACKED32
YUV2RGB_ENDLOOP(4) YUV2RGB_ENDLOOP(4)
YUV2RGB_OPERANDS
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment