Commit 8a6341cd authored by mhoffman's avatar mhoffman

integrating blackfin optimized yuyvtoyv12 converter

git-svn-id: file:///var/local/repositories/mplayer/trunk/libswscale@23833 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 3f2cc2dc
...@@ -39,6 +39,10 @@ extern int ff_bfin_uyvytoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, ...@@ -39,6 +39,10 @@ extern int ff_bfin_uyvytoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst,
long width, long height, long width, long height,
long lumStride, long chromStride, long srcStride) __attribute__ ((l1_text)); long lumStride, long chromStride, long srcStride) __attribute__ ((l1_text));
extern int ff_bfin_yuyvtoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
long width, long height,
long lumStride, long chromStride, long srcStride) __attribute__ ((l1_text));
static int uyvytoyv12_unscaled (SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, static int uyvytoyv12_unscaled (SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[]) int srcSliceH, uint8_t* dst[], int dstStride[])
{ {
...@@ -53,6 +57,20 @@ static int uyvytoyv12_unscaled (SwsContext *c, uint8_t* src[], int srcStride[], ...@@ -53,6 +57,20 @@ static int uyvytoyv12_unscaled (SwsContext *c, uint8_t* src[], int srcStride[],
return srcSliceH; return srcSliceH;
} }
static int yuyvtoyv12_unscaled (SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
int srcSliceH, uint8_t* dst[], int dstStride[])
{
uint8_t *dsty = dst[0] + dstStride[0]*srcSliceY;
uint8_t *dstu = dst[1] + dstStride[1]*srcSliceY/2;
uint8_t *dstv = dst[2] + dstStride[2]*srcSliceY/2;
uint8_t *ip = src[0] + srcStride[0]*srcSliceY;
int w = dstStride[0];
ff_bfin_yuyvtoyv12 (ip, dsty, dstu, dstv, w, srcSliceH, dstStride[0], dstStride[1], srcStride[0]);
return srcSliceH;
}
void ff_bfin_get_unscaled_swscale (SwsContext *c) void ff_bfin_get_unscaled_swscale (SwsContext *c)
{ {
...@@ -63,4 +81,9 @@ void ff_bfin_get_unscaled_swscale (SwsContext *c) ...@@ -63,4 +81,9 @@ void ff_bfin_get_unscaled_swscale (SwsContext *c)
av_log (NULL, AV_LOG_VERBOSE, "selecting Blackfin optimized uyvytoyv12_unscaled\n"); av_log (NULL, AV_LOG_VERBOSE, "selecting Blackfin optimized uyvytoyv12_unscaled\n");
c->swScale = uyvytoyv12_unscaled; c->swScale = uyvytoyv12_unscaled;
} }
if (c->dstFormat == PIX_FMT_YUV420P)
if (c->srcFormat == PIX_FMT_YUYV422) {
av_log (NULL, AV_LOG_VERBOSE, "selecting Blackfin optimized yuyvtoyv12_unscaled\n");
c->swScale = yuyvtoyv12_unscaled;
}
} }
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