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.

dm365: LCD竖屏和图像旋转的问题



专家好,

遇到的问题是这样的:  dm365平台,  LCD是竖屏的时候, 比如 240x320,但是图像采集出来是横的(1280x720),  采用缩放功能可以达到 320x240 ,但是怎么调整为屏幕能够使用的图像?  dm365应该没有硬件做 Rotate的功能, 是否要用软件完成旋转功能? 

谢谢了!

  • 可以使用DM365的DVSDK,其中LCD部分的驱动,提供的有这个 Rotate功能。

  • Hi Titan, 请问你说的是哪个版本的DVSDK?  我的驱动代码里面仅有:

    davincifb.c --> .fb_rotate = NULL,

    davinci_display.c ---> 没有rotate相关函数.

    能否给个详细些的建议?  谢谢了!

  • 最后,我用软件旋转的方式暂时解决这个问题, 附上旋转的代码,希望有人可以用上.

    void rotateYUV240SP(Uint8 * src, Uint8 * des,int width,int height)
    {
    int i, j;
    int wh = width * height;
    int k = 0;
    for(i=0;i<width;i++) {
    for(j=0;j<height;j++)
    {
    des[k] = src[width*j + i];
    k++;
    }
    }

    for(i=0;i<width;i+=2)
    {
    for(j=0;j<height/2;j++)
    {
    des[k] = src[wh+ width*j + i];
    des[k+1]=src[wh + width*j + i+1];
    k+=2;
    }
    }
    }