-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible Threading Issue #21
Comments
Tried the pipeline you provided, and yes I can see the intermittent corruption. |
Would it be possible for the encoder to detect if there are no other mfx elements? If there are no other mfx elements then, presuming I correctly understand the issue, we would then know when the surface is in use. Is that correct? |
The MFX encoder task detects any upstream peer MFX elements such an MFX decoder or MFX VPP task for MFX session sharing, as well as to compute the optimal number of surfaces to be shared between the upstream MFX task and the MFX encoder task. |
I understand, as outlined in the README.usage, that Gstreamer and mfx are heavily threaded frameworks that don't share synchronization mechanisms. That being said, I have come across a threading issue that I believe should be fixable.
The pipeline:
gst-launch-1.0 videotestsrc is-live=1 ! video/x-raw,width=4096,height=1536,framerate=60/1,format=NV12 ! queue ! gamma gamma=0.5 ! queue ! mfxh264enc ! video/x-h264,profile=high ! h264parse ! matroskamux name=mux streamable=false ! queue ! filesink location="out.mkv" sync=1
Creates a file with very visible artifacts. It appears, at least to me, that mfxh264enc isn't locking the frame throughout the entire coding process. As a result, parts of the frame have the gamma applied, and parts do not. I tested this on an i7-6770HQ.
The text was updated successfully, but these errors were encountered: