• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » Multimedia Software Codecs » Multimedia Software Codecs forum » DM365 JPEG decoder problem
Share
Multimedia Software Codecs
  • Forum
Options
  • Subscribe via RSS

DM365 JPEG decoder problem

DM365 JPEG decoder problem

This question is not answered
Pablo Barrantes
Posted by Pablo Barrantes
on Sep 02 2011 15:36 PM
Prodigy60 points

Hi,


Recently I've been working on decoding a video using MJPEG. The problem I encountered is that some of the buffers (JPEG images) were syntactically correct, meaning that the header and EOI code were correct, but the decoder wasn't able to decode it. This happened randomly, without a specific pattern or order. Looking around on the internet I found this:

http://linux.omap.com/pipermail/davinci-linux-open-source/2010-December/021286.html

We implemented that solution on Diego Dompe's plugins branch for the DM365 and can confirm this behavior, we also noticed that adding less than 1024 bytes to the buffer wouldn't work as well.

 

Is there an explanation for this? If so, is there a "cleaner" way to solve this issue? I can provide example images for both cases.

DM365 decode DM365 Decoder
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Akshay Panday
    Posted by Akshay Panday
    on Sep 02 2011 23:30 PM
    Expert1610 points

    Hi Pablo,

    Are the images encoded with the DM365 JPEG Encoder only? 

    It would be great if you could send some samples across so that we can examine them and try to establish the cause of the problem.

    I will also need the version number of the JPEG Decoder & Encoder and the parameters for the JPEG Encoder (if using DM365 based one).

    Can you also detail the steps you've taken so far?

     

    Regards,

    Akshay

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Pablo Barrantes
    Posted by Pablo Barrantes
    on Sep 06 2011 09:57 AM
    Prodigy60 points
    samples.zip

    Hi Akshay,

    I'm attaching some sample images that were encoded using the DM365 JPEG codec, files 0 and 3 can be decoded while 1 and 2 can't.

    The encoder/decoder version used is the one in DVSDK 4.02, according to the codec release notes both the decoder and the encoder version is 01.00.00 and the parameters used are the default ones.


    Now the steps:

    1. Recorded a video using

    gst-launch -e videotestsrc ! 'video/x-raw-yuv,format=(fourcc)UYVY,width=720,height=480,pitch=736' ! dmaienc_mjpeg qValue=30 ! queue ! qtmux ! filesink location=test_mjpeg.mp4

     

    2. Tried to decode using

    gst-launch filesrc location = test_mjpeg.mp4 ! qtdemux name=demux .video_00 ! queue ! dmaidec_mjpeg ! 'video/x-raw-yuv, format=(fourcc)NV12' ! fakesink

     
    3. Adding DMAI_DEBUG=2 to the previous pipeline got this error messages:

    @0x000f4f82:[T:0x41b28490] ti.sdo.dmai - [Idec1] IMGDEC1_process() failed with error (-1 ext: 0x8800)

    @0x000f87a4:[T:0x41b28490] ti.sdo.dmai - [Idec1] IMGDEC1_process() failed with error (-1 ext: 0xc000)

     

    4. Separated the video in different images (buffers) using:

    gst-launch filesrc location = test_mjpeg.mp4 ! qtdemux name=demux .video_00 ! queue ! multifilesink location=test_%d.jpeg

     

    5. Tried to decode the images individually using:

    DMAI_DEBUG=2 gst-launch filesrc location = test_X.jpeg  ! dmaidec_jpeg ! fakesink

    and got:

    @0x00068c70:[T:0x4125a490] ti.sdo.dmai - [Idec1] IMGDEC1_process() failed with error (-1 ext: 0x8800)

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Akshay Panday
    Posted by Akshay Panday
    on Nov 08 2011 03:28 AM
    Expert1610 points

    Hi Pablo,

     

    Apologies for the delay.

    I checked your files with version 1.00.00.10 of the JPEG Decoder and they are decoding fine. 

     

    Regards,

    Akshay

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Pablo Barrantes
    Posted by Pablo Barrantes
    on Nov 08 2011 07:15 AM
    Prodigy60 points

    Hi,

    Were you using a large input buffer as inidicated on the link above? (http://linux.omap.com/pipermail/davinci-linux-open-source/2010-December/021286.html).



    Thanks,

    Pablo

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Akshay Panday
    Posted by Akshay Panday
    on Nov 09 2011 05:35 AM
    Expert1610 points

    Hi Pablo,

    I tried with both cases - with a much larger input buffer and with an input buffer which is the exact size of the codec requirement.

     

    Regards,

    Akshay

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rohan Babtiwale
    Posted by Rohan Babtiwale
    on Apr 27 2012 07:31 AM
    Prodigy160 points

    Hi,

    I am also working on JPEG decoder and I am also getting a similar error.

    I am using dvsdk_4_02_00_06 and linux 2.6.32.17. 

    I am getting an extended error as "err: 0x8800" (XDM_FATALERROR) according to user guide.

    Can anyone please tell me the reason for this error and how to avoid this error??

    Thanks a lot

    Thanks,

    Rohan

    8168 MPEG4 Encoding and Decoding
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Pablo Barrantes
    Posted by Pablo Barrantes
    on Apr 27 2012 08:17 AM
    Prodigy60 points

    Hi Rohan,

    Dis you follow the link on the very first post in this thread? They used a larger buffer and it worked fine, also that worked for me.


    Regards,

    --Pablo

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • RSV Prasad
    Posted by RSV Prasad
    on Apr 29 2012 11:18 AM
    Intellectual365 points

    Hi,

    Extended error code "0x8800" corresponds to corrupted input JPEG data. Please check the input buffer size and make sure to provide complete JPEG frame data to decoder.

    Regards, RSV

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Rohan Babtiwale
    Posted by Rohan Babtiwale
    on Apr 30 2012 22:18 PM
    Prodigy160 points

    Hi Pablo,

    thanks for the reply. Even if I increase the buffer size, the same problem is observed but little later. 

    Also

    1. I observed that when the decoder fails the bytes consumed by the decoder are less than the actual number of bytes present in the buffer. i.e even if the data is present in the buffer the decoder is not reading the complete buffer. Any idea why this might be happening?

    2. Is there any "End of Frame" or "Start of frame" sequence in case of MJPEG encoded data which I can look for? If there is please let me know.

    3. I am also running H.264 decoder along with JPEG decoder. Can these two be run simultaneously? Is any synchronization required between these two?

    4. Once the JPEG decoder fails with FATAL_ERROR, it does not recover. I tried XDM_RESET but it didn't help. Is there any way to recover the Jpeg decoder if it fails once?

    Thanks for help.

    Thanks and Regards,

    Rohan

    8168 MPEG4 Encoding and Decoding
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use