[FFmpeg-trac] #7507(avfilter:new): hwupload: missing device platform
FFmpeg
trac at avcodec.org
Mon Oct 22 17:01:36 EEST 2018
#7507: hwupload: missing device platform
-------------------------------------+-------------------------------------
Reporter: msiders | Owner:
Type: enhancement | Status: new
Priority: normal | Component: avfilter
Version: unspecified | Resolution:
Keywords: hwupload, | Blocked By:
hwaccel | Reproduced by developer: 0
Blocking: |
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by msiders):
Hi oromit,
This is my suggestion:
- The vars "hw_device_ctx" and "hw_frames_ctx" are both AVBufferRef
pointers.
- And ANY filter/decoder/encoder only takes just one "hw_device_ctx".
- So the pointers doesn't change!
- The only difference would be that the new hwupload can point to a
''new'' context pointer.
So, the basis are that the "hw_device_ctx" doesn't change for filters.
See this overview example:
INPUT --> DECODER A --> FILTER B --> HWDOWNLOAD --> FILTER C -->
HWUPLOAD --> ENCODER D --> OUTPUT
As you can note:
- GPU platform X: applies to A,B & hwdownload.
- System memory: C only .
- GPU platform Y: hwupload & D.
In this case, the "hw_device_ctx" is unique for filters and opaque to all.
Just only the ffmpeg.c needs to initialize the different platforms when
more than one is used. And the hwupload needs to select between the
different available contexts inside the ffmpeg.c list.
Does this sound good to you?
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7507#comment:4>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list