This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

YUYV to UYVY formart conversion on DM8168

Other Parts Discussed in Thread: TVP5158

Hi,
  Everyone,I am using the DVRRDK package to design my DM8168 video process app.
I capture the YUYV422 formate frame by tvp5158. then send the frame to dsp to do some process.
But during my processing , I need RGB format data.
so I want to use VLIB function "VLIB_convertUYVYint_to_RGBpl()" to convert frame from YUV to RGB.
But there is the question. The captured frame format is YUYV,but the VLIB function need UYVY.
is there some good ideas to convert YUYV to UYVY?
I tried the following methods:
(1) try to use c6747 _swap() Intrinsics function to swap the data by dsp.but it cost too much time.
every 360x240 frame cost about 20ms
(2) try to swap YUYV to UYVY in M3 VPSS in the MergeLink_drvProcessFrames function swapbuffer which is As follows:

void swapbuffer(unsigned char *p_YUYV_buffer) {
int i, j;
char a;
     for (i = 0; i < 240; i++) {
            for (j = 0; j < 352 * 2; j = j + 4) {
            a = p_YUYV_buffer[352 * 2 * i + j];
            p_YUYV_buffer[352 * 2 * i + j] = p_YUYV_buffer[352 * 2 * i + j + 1];
            p_YUYV_buffer[352 * 2 * i + j + 1] = a;

            a = p_YUYV_buffer[352 * 2 * i + j + 2];
            p_YUYV_buffer[352 * 2 * i + j + 2] = p_YUYV_buffer[352 * 2 * i + j  + 2 + 1];
            p_YUYV_buffer[352 * 2 * i + j + 2 + 1] = a;

      }
}
}

But it cost much more than dsp.
every 360x240 frame cost about 40ms.
Anybody can give some suggestions?
Or is there any other method to reduce the cpu cost and time delay??such as using hardware to do this?
Thank you