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.

mpeg encode & decode problem

Hi, I need some help on the following:

I'm trying to do encode and decoding a video from the composite input, I able to encode and decode it correctly when the resolution is 720x480.
When I change the resolution to 800x480 or 384x400, I not able to display it correctly on the display. is the mpeg4 encoder doing the scaling at the same time while encoding the raw NTSC/PAL data so that I don't have to pass the buffer to the IPIPE for resizing?
I have no idea if the video encoded correctly, but I believe it was encoded correctly since decoding 720x480 was correct,  and the decoded width & height(de.width, de.height) showing the correct resolution as well (etc: 720x480, 800x400, 384x400).

what's the problem for the video encoded with resolution other than 720x480?? could it be the display problem on the display thread? It uses rszcopy_execute to copy the decoded buffer to display buffer.
( FYI, I'm using the encode / decode in the dvsdk_1_30_00_40/demos/dm355 with some slight changes to output it to LCD )

 

  • Please note that decode demo included in DVSDK assumes video file is either NTSC or PAL resolution (the only resolutions our DM355 EVM could support without any additional daughter cards).  It does not know how to handle other resolutions and hence you will need to write your own demo (and buy or build your own daughter card) if you wish to support other resolutions. 

    Encode demo does appear to support other resolutions, but not decode demo.  This could explain why you are experiencing problems.

  • Hi Juan, thanks for the reply. I think there's some misunderstand about the problem I had (sorry for my poor english)

    I had rewrote the encode/decode app to support other resolutions other than NTSC or PAL resolution by using the IPIPE for doing the resize job, but I'm not sure if this is the correct way to do so, because I noticed that the videoEncode/DecodeAlgCreate() takes in the width/height parameter which I wondering if the encoder / decoder does the resizing as well.

    However, I have encode / decode the video correctly by now, but the video played after decoded is not at the same speed (framerate) as the original NTSC/PAL input, the video played like in fast forwade mode. Is there some parameters I should be take special care of in the videoEn/DecodeAlgCreate() ?

     

  • Our video encoder and decoder algorithms deal with elementary streams; there is not time-stamp or AV sync associated with these streams; therefore, unless you add these in software, the video will get decoded and played as fast as the CPU will allow.

    That said, applications like GStreamer to add support from transport streams (Audio/video in single file, with time stamps and AV sync); I believe there are a few posts on this forum about Gstreamer that I would encourage you to look at.  Optionally, you can write your own software to do this.