Revision 7889f528

View differences:

libswscale/swscale_bfin.c
39 39
                               long width, long height,
40 40
                               long lumStride, long chromStride, long srcStride) __attribute__ ((l1_text));
41 41

  
42
extern int ff_bfin_yuyvtoyv12 (const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst,
43
                               long width, long height,
44
                               long lumStride, long chromStride, long srcStride) __attribute__ ((l1_text));
45

  
42 46
static int uyvytoyv12_unscaled (SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
43 47
                                int srcSliceH, uint8_t* dst[], int dstStride[])
44 48
{
......
53 57
    return srcSliceH;
54 58
}
55 59

  
60
static int yuyvtoyv12_unscaled (SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
61
                                int srcSliceH, uint8_t* dst[], int dstStride[])
62
{
63
    uint8_t *dsty = dst[0] + dstStride[0]*srcSliceY;
64
    uint8_t *dstu = dst[1] + dstStride[1]*srcSliceY/2;
65
    uint8_t *dstv = dst[2] + dstStride[2]*srcSliceY/2;
66
    uint8_t *ip   = src[0] + srcStride[0]*srcSliceY;
67
    int w         = dstStride[0];
68

  
69
    ff_bfin_yuyvtoyv12 (ip, dsty, dstu, dstv, w, srcSliceH, dstStride[0], dstStride[1], srcStride[0]);
70

  
71
    return srcSliceH;
72
}
73

  
56 74

  
57 75
void ff_bfin_get_unscaled_swscale (SwsContext *c)
58 76
{
......
63 81
                av_log (NULL, AV_LOG_VERBOSE, "selecting Blackfin optimized uyvytoyv12_unscaled\n");
64 82
                c->swScale = uyvytoyv12_unscaled;
65 83
            }
84
        if (c->dstFormat == PIX_FMT_YUV420P)
85
            if (c->srcFormat == PIX_FMT_YUYV422) {
86
                av_log (NULL, AV_LOG_VERBOSE, "selecting Blackfin optimized yuyvtoyv12_unscaled\n");
87
                c->swScale = yuyvtoyv12_unscaled;
88
            }
66 89
}

Also available in: Unified diff