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.

how to rotate the video by using edma



Dear All:

           I am using DM368 and trying to rotate the video by using edma, it is working for flip the video, with the following codes, the video will be upside down.

                dm365mmap_params.src      = Buffer_getPhysicalPtr(hSrcBuf) + srcOffset;
dm365mmap_params.srcmode = 0;

dm365mmap_params.dst = Buffer_getPhysicalPtr(hDstBuf) + dstOffset + dstDim.lineLength * (srcDim.height -1 );
dm365mmap_params.dstmode = 0;
dm365mmap_params.srcbidx = srcDim.lineLength;

dm365mmap_params.dstbidx = -1 *dstDim.lineLength;
dm365mmap_params.acnt = width * (bpp >> 3);
dm365mmap_params.bcnt = height;
dm365mmap_params.ccnt = 1;
dm365mmap_params.bcntrld = dm365mmap_params.bcnt;
dm365mmap_params.syncmode = 1;
                ioctl(mm_fd, DM365MMAP_IOCMEMCPY, &dm365mmap_params)

         I know there is an easier way to do that, which is via IPIPE, it can rotate the video 180 degree.

            But what I want is to the rotate the image by 90 degree, I found some references from SPRUF10 section 3.3 and the following links:

                 

                   http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/99/t/95567.aspx

                    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/100/t/7598.aspx

            If I am using the settings from the 1st link, there is no edma interrupt generated, and the program is hanged. 

                dm365mmap_params.src      = Buffer_getPhysicalPtr(hSrcBuf) + srcOffset;
dm365mmap_params.srcmode = 0;
dm365mmap_params.dst = Buffer_getPhysicalPtr(hDstBuf) + dstOffset + (dstDim.width - 1 ) * dstDim.height;
dm365mmap_params.dstmode = 0;
dm365mmap_params.srcbidx = 1;
dm365mmap_params.srccidx = srcDim.width;
dm365mmap_params.dstbidx = -1 * srcDim.height;
dm365mmap_params.dstcidx = 1;
dm365mmap_params.acnt = 1;
dm365mmap_params.bcnt = srcDim.width2;
dm365mmap_params.ccnt = srcDim.height;
dm365mmap_params.bcntrld = 0;
dm365mmap_params.syncmode = 1;

          Does anybody know why?  Any thing that it is missing? Can anybody give me some hits?

        Thanks in advance.

Patrick