5 Replies Latest reply on Apr 26, 2017 5:40 AM by dipak

    Need Help on UVD H.264 decoder (Media SDK 1.1)

    mrparkdo

      I need some tech support on using UVD H.264 decoder in Media SDK 1.1.

       

      Initially, I reviewed the sample project (SimpleDecoder) which decodes H.264 file into NV12 file.

      Because my goal is to decode H.264 frame data rather than H.264 file, I tried to use AMFDataStreamMemory class instead of AMFDataStreamFile class in PlatformWindows.h/cpp files.

       

      Right after submitting the first H.264 frame data into decoder, breakpoint is triggered. Then, I found the following logs in the output pane of Visual Studio 2013:

       

      2015-05-27 18:42:22.122 DB4 [AMFDecodeEngineImplDXVA2] Info: InitDecoder() OK! Video DVXA2 HW DECODER (1280x720) for input stream; profile: UVD H264 Unencrypted Config Profile

      2015-05-27 18:42:22.126 DB4 [h264parser_util] Error: ..\..\..\..\..\impl\components\VideoStreamParser\parsers\h264\h264_util.cpp(91):Assertion failed:false

      AmdUvdDecode.exe has triggered a breakpoint.

      2015-05-27 18:43:38.581 DB4 [H264Parser] Error: ..\..\..\..\..\impl\components\VideoStreamParser\parsers\h264\H264Parser.cpp(2947):GetDPBSize() undefined level_idc=0

       

      I guess the decoder is not configured properly.

      Please let me know how to resolve my issue.

       

      Thanks,

       

      Do Park

        • Re: Need Help on UVD H.264 decoder (Media SDK 1.1)
          amit.agarwal

          Hi, 1. Easiest way to do it is to use the H264 Parser present in the MediaSDK 1.1 in addition to decode component. 2. If you are using an external parser, then present NAL units to the decoder BUT remember to put the length of the NAL unit at the head of NAL buffer in 4 bytes 3. If the above dint help solve the issue, then set SPS/PPS as extra-data parameters in the first frame Hope this helps. Please feel free to get in touch with us for any further query. Thank You

          • Re: Need Help on UVD H.264 decoder (Media SDK 1.1)
            mrparkdo

            Hi. Thanks for your answer.

             

            Unfortunately, your tip doesn't help my case.

            I have been using the H264 parser bundled in the MediaSDK 1.1 and changed the parser a little to handle with my h264 frame data.

            But the decoder still gives me the following error at the Visual Studio output pane:

             

            2015-06-19 12:47:55.583     321C [AMFDecodeEngineImplDXVA2]    Info: InitDecoder() OK! Video DVXA2 HW DECODER (1024x768) for input stream; profile: UVD H264 Unencrypted Config Profile

            2015-06-19 12:47:55.583     321C [h264parser_util]   Error: ..\..\..\..\..\impl\components\VideoStreamParser\parsers\h264\h264_util.cpp(91):Assertion failed:false

            AmdUvdDecode.exe has triggered a breakpoint.

             

            After debugging the bundled parser, I found the decoder doesn't make the above error when its m_bUseStartCodes is set to true by calling SetUseStartCodes(true). Then, the decoder gives me the decoded NV12 data.

             

            Do you have any clue on this trial?

             

            In addition, I have a question on the decoder performance.

            My test computer has an AMD A8-6410-R5 APU. At this platform, the decoding speed of 1024x768 h264 frames is about 9 ~ 11 fps and the overall CPU usage is over 20%.

            Do you have any suggestion how to improve the decoder performance?

             

            Thanks,

             

            Do Park