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.

colour shift in DSP application on AM57xx

Hi experts,

I got colour shift (I see a green video) by trying following command from http://processors.wiki.ti.com/index.php/DRA7xx_GLSDK_Software_Developers_Guide#Running_DSP_sample_applications 

root@am57xx-evm:~# yuvcopytest -s 30:800x480 /run/media/sda1/176x144.yuv -w 176 -h 144
0x2b070: Opening Display..
using 1 connectors, 800x480 display, multiplanar: 1
width = 176, height = 144

Setting mode 800x480 on connector 30, crtc 32
Fill input buffer with yuv luma data

0x2b070: Opening Engine..
Comparing output buffer with input buffer

yuvcopytest executed successfully

root@am57xx-evm:~#

I got the same result no matter I try YV12 or NV12...

Did you know why??

Thanks.

  • By confirm the source, only size of luma data was filled...

    decoder->input_sz = width * height; ======================> only Y data
    decoder->input_bo = omap_bo_new(decoder->disp->dev,
    decoder->input_sz, OMAP_BO_WC);
    decoder->input = omap_bo_map(decoder->input_bo);
    decoder->framebuf = disp_get_fb(decoder->disp);

    {
    FILE *fd;
    fd = fopen(infile, "rb");
    fread(decoder->input, width*height, sizeof(char), fd);
    fclose(fd);
    }

  • Yuvcopy just demonstrates copying input to output copying using universal copy algorithm via VIDDEC2 interface.

    Here universal copy is copying only luma to output buffer and chroma is not copied.

    But display is interpreting some values of chroma in the buffer hence you see color mismatch.

    Ram

  • hi Ramprasad,
    Many thanks for your reply.

    I found following code as looking the source of yuvcopy,

    padded_width = width;
    padded_height= height;

    decoder->num_outBuf = 2;
    decoder->padded_width = padded_width;
    decoder->padded_height = padded_height;

    Did you know
    Q1. why num_outBuf is 2 ??
    Q2. how to decide num_outBuf in different application ?? Is there anything I need to notice ??

    Q3. In AM57xx, there're 2 DSPs. how do I know which DSP was used now ??  And how do I choose different DSP ??



    Thanks

  • 1) For yuvcopy application one output buffer is sufficient since the algorithm doesn't lock the output buffer and immediately releases after processing.

    2) num_outBuf depends on the algorithm. If the algorithm like video decoder which locks the output buffer for referenceing, releases the buffers after 3-4 frame-processing in such case need to allocate more output buffers.