Giter Site home page Giter Site logo

Comments (5)

mofo7777 avatar mofo7777 commented on May 28, 2024

I have only tested Intel HD Graphics 4000. I've made an update because this GPU didn't handle DXVAHD_STREAM_STATE_ALPHA_DATA like NVIDIA. Try to change values in CDxva2Decoder::ConfigureVideoProcessor, like i did. Also i see some source code that does special things when GPU is Intel. I'll try to see.

from h264dxva2decoder.

mofo7777 avatar mofo7777 commented on May 28, 2024

On windows10 (Intel graphic HD 500), decoding is not good. I will investigate. Perhaps Nalu buffer needs alignment with Intel GPU.

from h264dxva2decoder.

mofo7777 avatar mofo7777 commented on May 28, 2024

I found the problem. I don't know if it comes from DXVA2 or Intel graphic HD 500/510.

The problem is the start code from the nalu buffer ; 0x00, 0x00, 0x00, 0x01.

When movie file has nalu lenght size of 4, i simply replace the four bytes with the start code above.

Using this start code 0x00, 0x00, 0x01 permits to play the video file correctly. So it seems that start code 0x00, 0x00, 0x00, 0x01 is not handled.

Here is a quick workaround with the video sample "Beach - 10890.mp4".

` Main.cpp

if(pVideoBuffer.GetBufferSize() == 0){

    NalUnitBuffer.SetStartPositionAtBeginning();
    IF_FAILED_THROW(NalUnitBuffer.SetStartPosition(1)); // Add this line
    IF_FAILED_THROW(pDxva2Decoder->DecodeFrame(NalUnitBuffer, cH264NaluParser.GetPicture(), llTime, iSubSliceCount));
    IF_FAILED_THROW(pDxva2Decoder->DisplayFrame());
}`

Off course, for video files with subslices, this workaround will not be enough.

from h264dxva2decoder.

mofo7777 avatar mofo7777 commented on May 28, 2024

after talking with Intel, I found that I was not handle dxva2 specifications correctly. Now it's ok with version 1.1.0.0

from h264dxva2decoder.

fengguangle avatar fengguangle commented on May 28, 2024

ok, thank you mofo.

from h264dxva2decoder.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.