Comments (13)
OK, the driver crash (TDR) was reproduced and internal ticket logged.
from amf.
Hi,
Win 7 has limited support for DX11. In particular, encoder works only using DX9. It is possible to use DX11 surfaces in converter but AMF needs to be programmed certain way:
-
InitDX9()
-
InitDX11()
-
InitOpenCL()
-
Force converter to work via OpenCL and return DX9 NV12 surface:
-
AMF_VIDEO_CONVERTER_MEMORY_TYPE = DX9
-
AMF_VIDEO_CONVERTER_COMPUTE_DEVICE = OPENCL
So the logic would be:
-
Application submit DX11 texture (should be allocated by AMF or allocated by application with shared handle for performance reasons)
-
AMF interops input texture into OpenCL
-
AMF allocated DX9 output surface
-
AMF interops it into OpenCL
-
AMF runs converter GPU kernels using OpenCL
-
AMF un-interops output surface back to DX9 and returns it
-
Application submits DX9 NV12 surface to the encoder
I will add more error checking for the next release.
Thanks,
Mikhail
from amf.
@dvv47 You do not have the same crash, your crash is related to using DirectX11 on Windows 7 which is not supported. See #25 for an answer.
from amf.
Can you produce and share dumps for crashes?
Crash In Terminate()
- Who is calling terminate?
- Did you implement Drain() of Flush()
- Is it easy to reproduce?
from amf.
Yes, just dump for whole process.
Thanks,
Mikhail
From: Michael Fabian Dirks [mailto:[email protected]]
Sent: September 9, 2016 2:21 PM
To: GPUOpen-LibrariesAndSDKs/AMF [email protected]
Cc: Mironov, Mikhail [email protected]; Comment [email protected]
Subject: Re: [GPUOpen-LibrariesAndSDKs/AMF] Video Encode API: Driver Crash inside SubmitInput (#12)
Also I'm not sure how to create a dump for amfrt*.dll, do I just dump the full process in case it happens to me?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/12#issuecomment-245996535, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWv4D4thyntuEih9RjxrVAz86ApoCTks5qoaOAgaJpZM4JuY6P.
from amf.
Hey,
Few small things from the latest code:
- There is no need to call surface->Acquire(); surface->Release(); You use smart pointers in the queue and they will do all work.
- if you got AMF_INPUT_FULL on SubmItInput() you probably should not exit loop because next attempt to submit will be only when the next frame will be put in the queue. something like res = AMF_OK; will do the job.
Thanks,
Mikhail
From: Michael Fabian Dirks [email protected]
Sent: Friday, September 9, 2016 2:20 PM
To: GPUOpen-LibrariesAndSDKs/AMF
Cc: Mironov, Mikhail; Comment
Subject: Re: [GPUOpen-LibrariesAndSDKs/AMF] Video Encode API: Driver Crash inside SubmitInput (#12)
Also I'm not sure how to create a dump for amfrt*.dll, do I just dump the full process in case it happens to me?
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/12#issuecomment-245996535, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWv4D4thyntuEih9RjxrVAz86ApoCTks5qoaOAgaJpZM4JuY6P.
from amf.
Did you try InitOpenCL()?
SubmitInput has no places to stuck except to wait for CSC and therefore for HW 3D queue.
Mikhail
From: Michael Fabian Dirks [mailto:[email protected]]
Sent: September 12, 2016 2:37 PM
To: GPUOpen-LibrariesAndSDKs/AMF [email protected]
Cc: Mironov, Mikhail [email protected]; Comment [email protected]
Subject: Re: [GPUOpen-LibrariesAndSDKs/AMF] Video Encode API: Driver Crash inside SubmitInput (#12)
- Alright. I'll change it back.
- The queue so far has always been up to speed with the code so far, nothing really increased past the limit except when encoding literally gets stuck as reported in #19#19. I changed it to try for 5 milliseconds, waiting a single msec between SubmitInput calls and if it still didn't work to just wait for the next signal. I had issues with it forever getting stuck in a AMF_INPUT_FULL loop before.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/12#issuecomment-246447138, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWvwp36jdT1IZS1Qfy_pxAj3gVNDM9ks5qpZvdgaJpZM4JuY6P.
from amf.
OK, there are two issues:
-
OpenCL is slow to start up
-
Before calling SubmitINput() call surface->Convert(AMF_MEMORY_OPENCL);
Mikhail
From: Michael Fabian Dirks [mailto:[email protected]]
Sent: September 12, 2016 2:52 PM
To: GPUOpen-LibrariesAndSDKs/AMF [email protected]
Cc: Mironov, Mikhail [email protected]; Comment [email protected]
Subject: Re: [GPUOpen-LibrariesAndSDKs/AMF] Video Encode API: Driver Crash inside SubmitInput (#12)
Did you try InitOpenCL()?
SubmitInput has no places to stuck except to wait for CSC and therefore for HW 3D queue.
Mikhail
Testing with InitOpenCL resulted in the overloaded/stuck issue happening immediately and upon 2nd run it caused the following error:
20:51:36.034: [AMF Encoder] Plugin::AMD::VCEEncoder::SendInput Input Queue is full, dropping frame...
20:51:36.035: [AMFTrace::AMFEncoderVCE] Error: ..........\runtime\src\components\EncoderVCE\EncoderVCEImpl.cpp(1986):Assertion failed:SubmitInput() - Invalid param
20:51:36.035: [AMF Encoder] Plugin::AMD::VCEEncoder::InputThreadLogic SubmitInput failed with error A (code 4).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/12#issuecomment-246452018, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWv9irJLGfTB0ebKevRmKtrTS8lGY1ks5qpZ9hgaJpZM4JuY6P.
from amf.
Re-encountered just now, here is the dump file:
Additionally I have deleted any on my comments here so it's clean issue again.
from amf.
Seems to have been fixed by 16.10.1 by what I can tell. I have not managed to crash the driver with my usual test setup.
from amf.
I am not aware of this particular fix (the ticket was not closed) but late we couldn't repro it. There are many other changes that could be responsible. Let's wait for some stats.
Mikhail
On Wed, Oct 05, 2016 at 3:56pm, Michael Fabian Dirks <[email protected]mailto:[email protected]> wrote:
Seems to have been fixed by 16.10.1 by what I can tell. I have not managed to crash the driver with my usual test setup.
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com//issues/12#issuecomment-251823300, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOcWv19F2zHJ4GcJIFvc6e6tyojSyMZkks5qxCsNgaJpZM4JuY6P.
from amf.
Hello, i am also got crash after SubmitInput on Windows 7 x64
I use DirectX11 surface B8G8R8A for input, submit it to converter for resize, and then push Data to encoder.
Driver 16.10.1
GPU r9 380
Preset ultra_low_latency
And this code works fine with windows 10 x64
With this crash stack trace
dxva2.dll!000007fef5014fda() Unknown
dxva2.dll!000007fef5014f84() Unknown
dxva2.dll!000007fef5014d26() Unknown
dxva2.dll!000007fef501694d() Unknown
dxva2.dll!000007fef50168a4() Unknown
dxva2.dll!000007fef5014d26() Unknown
amdave64.dll!0000000073f4538f() Unknown
amdave64.dll!0000000073f44f34() Unknown
amdave64.dll!0000000073f43f3c() Unknown
amdave64.dll!0000000073f4111f() Unknown
amfrt64.dll!000007fee44eb4a1() Unknown
amfrt64.dll!000007fee44eac27() Unknown
amfrt64.dll!000007fee44e9897() Unknown
amfrt64.dll!000007fee44f323b() Unknown
amfrt64.dll!000007fee44af730() Unknown
from amf.
OpenCL works like a charm now and I'm no longer able to reproduce this. So this was most likely fixed.
from amf.
Related Issues (20)
- Security Report HOT 2
- [Request]: Change Bitrate Cap in Adrenaline HOT 4
- [Question]: Sharing context for multiple decoders?
- AMF AV1 + 10 BIT HDR HOT 2
- [Bug]: DX11 or DXVA2 (copy-back) HW decoder fails and causes driver crash on encountering corrupted frame
- [Investigation]: DX11 HW decode can cause image corruption on quick time skipping in some sources HOT 20
- [Question]: Using -rc for AV1_AMF HOT 1
- Need help for HEVC encoding GPU with AMF on FFMPEG HOT 4
- [Bug]: DX11 hardware accelerated transcode fails on FFMPEG v6 HOT 10
- [Bug]: Unable to produce scaled video with AMF specific methods HQScaler when preanalysis flag is enabled. HOT 2
- [Question]: How to use AMF with RADV driver? HOT 8
- [Bug]: AMF hangs on trying to decode video with momentary switch between progressive and interlaced fragment mid-stream
- [Question]: When AMD will use proper AI to replace programmers and produce a way better AMD AMF ? HOT 1
- [Bug]: <stream is not FLV 1.1 compatible> HOT 19
- [Question]: How to import AMF SDK into a QT project? HOT 2
- Missing documentation AMF_VE_FCR_RADIUS HOT 1
- [Bug]: Unable to make AMF encoder to follow specified CBR bitrate. Filler data parameter is ignored for CBR in some cases.
- [Question]: Every 4 seconds of recording gets blury HOT 19
- [Question]: (H)QVBR mode on Ryzen 5 8600G with AV1 HOT 6
- [Bug]: MJPEG decoder crashes with some JPEGs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amf.