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.

resultion problem to display the video CIF .DM6446

Hi Guys

 I am facing resultion problem to display the video.

We are running Demo example project for CIF resolution with our Mpeg4 Codec.But our Codec return a frame of resolution 352x288 where TI Mpeg4 Codec we are getting  frame of resolution 704x288.Because of this Demo with our codec is not Displaying properly in LCD Monitor.We are getting Duplicate video image at same time on the display.

Can anyone plz tell me why TI codec is returning frame with resolution 704x288 and how we can fix diaplay problem with our  Mpeg4 Decoder(Which give 352*288 resolution output frame)

Note:

  •        We tried with Line length 704 &352 but still dispaly is to perfect.
  •       But the height and width returing form codec (Ti and ours is same only linelength.
  •        We are using dvsdk_2_00_00_22.

 

Thank you

Mahesh V kalmeshwar

 

  • mahesh kalmeshwar said:
    We are running Demo example project for CIF resolution with our Mpeg4 Codec.But our Codec return a frame of resolution 352x288 where TI Mpeg4 Codec we are getting  frame of resolution 704x288.

    Looking at the DVSDK 2.00.00.22 demo I don't see any mention of CIF being 704 wide or even the value 704 being used in any of the C code, where are you seeing that the TI codec uses 704?

    My first thought on this would be confusion of units somewhere in the code, a 352 wide CIF image would contain 704 bytes per line if you are providing 16 bits per pixel, such as with YCbCr 4:2:2.

  • Thank you Thompson.You are right the resolution in TI DEMO code for CIF is 352x288
    but the line length is 704.
    But we have written the frame return by Vdec2 process into a file and we tried to
    play using YUV player.But for TI Codec YUV file the YUV player setting should be lke this
    Width:704
    height:352
    If we do this setting we are able to play the YUV.If we are setting width as 352 we are not able
    to play the YUV properly(means picture is not proper).
    But with our codec the frame output after Vdec2process we are getting frame of resolution 352*288
    This is the Issue we are facing.
    Can you please guide us on this.

    Thanks,
    Mahesh

  • mahesh kalmeshwar said:
    But for TI Codec YUV file the YUV player setting should be lke this
    Width:704
    height:352

    Does this mean that you are seeing the image stretched wide to 704 pixels or that there are blank vertical bars on either side of the actual image? What configuration are you using for the TI codec? Perhaps the TI codec has been configured to be wider so it will fit in the standard SDTV display easier, I would think either this or a color format confusion would be going on.

  • Resolution is set to 352*288 and line length is 704.But the Issues is
    the vdec2 process of TI Codec Demo will return a frame size of 704*288.
    Please let us know why its like that?What we should do to get 352*288
    resolution frame from TI codec.
    As we mention before our codec is returning 352*288 resolution frame.
    Because of this if we replace our codec with TI in Demo example,We are getting
    multiple Image in the LCD display and its not clear.

    Note:We are trying to use Demo examples to run our codecs with out changing other things.

    Thanks,
    Mahesh

  • Hi Bernie, Now we are getting Image on LCD Display.But chroma part still its not coming properly.Our Codec will give only 4:2:0 format output. I have following doughts 1)Davanci Display driver support 4:2:0 format? 2)How We can convert 4:2:0 planar to 4:2:2 format? Please help us on this. Thanks, Mahesh
  • mahesh kalmeshwar said:
    Davanci Display driver support 4:2:0 format?

    Unfortunately it does not, the display only supports 4:2:2 format, primarily due to the hardware only supporting 4:2:2 format.

    mahesh kalmeshwar said:
    How We can convert 4:2:0 planar to 4:2:2 format?

    On DM6446 this would probably be done in software which could either be integrated into your codec or done as a post codec processing operation. One option for post codec processing would be to use DMAI, as it has a color conversion module (Ccv) that contains this sort of functionality.

  • Hi Bernie, Thank you so much.As I mention in previous mail We are getting picture in LCD display but colour component is not coming properly. As per your advice we tried with Ccv code in Dmai for 4:2:0 to 4:2:2 conversion. But ist not working. Then We tried with i=0; for (y=0;y
  • The following App Note may be helpful; in essense you will need to do the inverse of what the app note suggests

    http://focus.ti.com/general/docs/litabsmultiplefilelist.tsp?literatureNumber=spraak3b

     

  • Hi Bernie,
    Still we stuck up with same issue.Your 4:2:0 TO 4:2:2 Code is working
    but we are getting display with small horizontal lines.
    A you mention we tried CCv functionality for conversion but it was
    not helping us.

    1)Is this Issue because of not doing interlace properly?
    Note:In your code you are doing only 4:2:0 YUV to UYVY format.
    2)Can i Use Resizer for 4:2:0 to 4:2:2 interlace format?
    3)Can you please provide us with some other solution to fix this Issue?
    We really stuck on this Issue.

    Your code which we used is mention below please have a look.

    memcpy( ycharinput, (unsigned char *)dstPtr, outBufDesc.bufSizes[0]);
    memcpy( cbcharinput, ((unsigned char *)dstPtr + outBufDesc.bufSizes[0]),outBufDesc.bufSizes[0]/4);
    memcpy(crcharinput, ((unsigned char *)dstPtr+ outBufDesc.bufSizes[0] + outBufDesc.bufSizes[0]/4), outBufDesc.bufSizes[0]/4);

    for (y=0;y<LNT_HEIGHT;y++){
            for (x=0;x<LNT_WIDTH/2;x++)

    {

            outputbuffer[cn++] = crcharinput[(int)(x+ ((int)(ceil(y/2) ) * (LNT_WIDTH/2)))]; //grab the Cr value (the ceil(y/2) should increment every other line so we scale vertically)
                                     //increment the buffer
           outputbuffer[cn++] = ycharinput[i_cnt*2];        //grab the Y value (i*2 because we get two Y per loop)
                            //increment the buffer

     

           outputbuffer[cn++] = cbcharinput[(int)(x + ((int)ceil(y/2 ) * (LNT_WIDTH/2)))]; //grab the Cb value
                                     //increment the buffer
            outputbuffer[cn++] = ycharinput[(i_cnt*2)+1];    //grab the next Y value


    i_cnt++;
    }

    }


    Thanks,
    Mahesh.

  • I had forgotten I had written something like that, for future readers that code was in this post.

    To get into the issue at hand, could you post a picture of the output with these small horizontal lines? Without seeing the sort of lines you have it is hard to say what could really be happening, the first two issues that come to mind are interlacing as you suggest or a cache coherency issue.

    mahesh kalmeshwar said:
    1)Is this Issue because of not doing interlace properly?
    Note:In your code you are doing only 4:2:0 YUV to UYVY format.

    This could be an interlacing artifact but I could not really say without seeing the output, if it is interlacing than you would only see the lines when there is motion on the incoming frames. UYVY interleaved is 4:2:2, so I am not sure what you are getting at by your note.

    mahesh kalmeshwar said:
    2)Can i Use Resizer for 4:2:0 to 4:2:2 interlace format?

    I don't believe the resizer gives you the level of granularity you would need on a data sorting basis to do this, at least not for interleaved. For planar you could individually resize the two chroma buffers to get the proper ratio of 4:2:2.

    mahesh kalmeshwar said:
    3)Can you please provide us with some other solution to fix this Issue?

    The most typical fix today would be to use the CCv module, though if that is not working than using another software sorting method is a possibility, I think you have already considered the solutions available, we just need to get one of them working for you.

  •  

    Hi Bourie,

     

    Now in LCD video is displaying with narrow lines on it.

    In Arm side after Video process we added 4:2:0 to 4:2:2 algo.In between these we tried to write the videc2_process output to a file.When we play this file in YUV reader this also giving lines on the picture.

    Then we removed conversion algo and tried to write vdec2process o/p to a file(arm side).This YUV file (352x288)is very clear without any lines.

     

    1)Can yo please tell me what will be the problem?

    2)Is it because of some wrong buffer management?

    3)Is it corrupting the the dstPtr ?

    4)How we can fix this?

    Please help us on this.

    Thank you

    Mahesh  v k