summaryrefslogtreecommitdiff
path: root/libavutil/hwcontext.c
Commit message (Collapse)AuthorAge
* hwcontext_internal: add ff_hwframe_map_replaceRostislav Pehlivanov2018-06-21
| | | | | | Used to fix unmapping when no direct interop exists between APIs. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
* hwcontext: Do not call device_init again when deriving an existing deviceMark Thompson2018-05-15
| | | | | | The change in 309d660775e2b47af6723a0477c4d753bc0c54f4 to call device_init when doing derivation missed this case - we should only call it if we actually made a new device.
* Merge commit '2eb396b175e55e515aa6a13c5b1789a2a18d3935'James Almer2018-02-11
|\ | | | | | | | | | | | | * commit '2eb396b175e55e515aa6a13c5b1789a2a18d3935': hwcontext: Fix memory leak on derived frame allocation failure Merged-by: James Almer <jamrial@gmail.com>
| * hwcontext: Fix memory leak on derived frame allocation failureMark Thompson2018-02-04
| |
| * hwcontext: Mark local table static constMark Thompson2017-06-15
| |
| * lavu: add new D3D11 pixfmt and hwcontextwm42017-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be used with the new d3d11 hwaccel decode API. With the new hwaccel API, we don't want surfaces to depend on the decoder (other than the required dimension and format). The old D3D11VA pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the decoder configuration, and thus is incompatible with the new hwaccel API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D and an index. It's simpler and compatible with the new hwaccel API. The introduced hwcontext supports only the new pixfmt. Frame upload code untested. Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites. Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * hwcontext: Improve allocation in derived contextsMark Thompson2017-04-30
| | | | | | | | | | | | | | Use the flags argument of av_hwframe_ctx_create_derived() to pass the mapping flags which will be used on allocation. Also, set the format and hardware context on the allocated frame automatically - the user should not be required to do this themselves.
| * hwcontext: Add frame context mapping for nontrivial contextsMark Thompson2017-04-30
| | | | | | | | | | | | | | Some frames contexts are not usable without additional format-specific state in hwctx. This change adds new functions frames_derive_from and frames_derive_to to initialise this state appropriately when deriving a frames context which will require it to be set.
* | lavu/hwcontext: add AV_HWDEVICE_TYPE_MEDIACODECAman Gupta2017-12-16
| | | | | | | | Signed-off-by: Matthieu Bouron <matthieu.bouron@gmail.com>
* | hwcontext: Perform usual uninitialisation on derived frames contextsMark Thompson2017-11-22
| |
* | lavu: OpenCL hwcontext implementationMark Thompson2017-11-22
| |
* | Merge commit '1bd986ed4b0e95ded368a8eeb5c044853c090f9b'James Almer2017-10-24
|\| | | | | | | | | | | | | * commit '1bd986ed4b0e95ded368a8eeb5c044853c090f9b': hwcontext: Move NONE to the be the first member of AVHWDeviceType Merged-by: James Almer <jamrial@gmail.com>
| * hwcontext: Move NONE to the be the first member of AVHWDeviceTypeMark Thompson2017-03-27
| | | | | | | | Also use that to fix a warning in av_hwdevice_get_type_name().
| * hwcontext: Make it easier to work with device typesMark Thompson2017-03-20
| | | | | | | | | | | | Adds functions to convert to/from strings and a function to iterate over all supported device types. Also adds a new invalid type AV_HWDEVICE_TYPE_NONE, which acts as a sentinel value.
| * hwcontext: Add device derivationMark Thompson2017-03-20
| | | | | | | | | | Creates a new device context from another of a different type which refers to the same underlying hardware.
* | hwcontext: Perform usual initialisation on derived device contextsMark Thompson2017-10-09
| | | | | | | | | | | | | | The initialisation should be common. For libmfx, it was previously happening in the derivation function and this moves it out. For VAAPI, it fixes some failures when deriving from a DRM device because this initialisation did not run.
* | Merge commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3'James Almer2017-09-26
|\| | | | | | | | | | | | | * commit 'fd9212f2edfe9b107c3c08ba2df5fd2cba5ab9e3': Mark some arrays that never change as const. Merged-by: James Almer <jamrial@gmail.com>
| * Mark some arrays that never change as const.Anton Khirnov2017-02-01
| |
* | lavu: Add DRM hwcontextMark Thompson2017-09-13
| |
* | lavu: add new D3D11 pixfmt and hwcontextwm42017-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To be used with the new d3d11 hwaccel decode API. With the new hwaccel API, we don't want surfaces to depend on the decoder (other than the required dimension and format). The old D3D11VA pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the decoder configuration, and thus is incompatible with the new hwaccel API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D and an index. It's simpler and compatible with the new hwaccel API. The introduced hwcontext supports only the new pixfmt. Frame upload code untested. Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites. Merges Libav commit fff90422d181744cd75dbf011687ee7095f02875. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | hwcontext: Improve allocation in derived contextsMark Thompson2017-06-14
| | | | | | | | | | | | | | | | | | Use the flags argument of av_hwframe_ctx_create_derived() to pass the mapping flags which will be used on allocation. Also, set the format and hardware context on the allocated frame automatically - the user should not be required to do this themselves. (cherry picked from commit c5714b51aad41fef56dddac1d542e7fc6b984627)
* | hwcontext: Add frame context mapping for nontrivial contextsMark Thompson2017-06-14
| | | | | | | | | | | | | | | | | | Some frames contexts are not usable without additional format-specific state in hwctx. This change adds new functions frames_derive_from and frames_derive_to to initialise this state appropriately when deriving a frames context which will require it to be set. (cherry picked from commit 27978155bc661eec9f22bcf82c9cfc099cff4365)
* | hwcontext: Make it easier to work with device typesMark Thompson2017-06-14
| | | | | | | | | | | | | | | | Adds functions to convert to/from strings and a function to iterate over all supported device types. Also adds a new invalid type AV_HWDEVICE_TYPE_NONE, which acts as a sentinel value. (cherry picked from commit b7487f4f3c39b4b202e1ea7bb2de13902f2dee45)
* | hwcontext: Add device derivationMark Thompson2017-06-14
| | | | | | | | | | | | | | Creates a new device context from another of a different type which refers to the same underlying hardware. (cherry picked from commit b266ad56fe0e4ce5bb70118ba2e2b1dabfaf76ce)
* | videotoolbox: add hwcontext supportwm42017-05-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds tons of code for no other benefit than making VideoToolbox support conform with the new hwaccel API (using hw_device_ctx and hw_frames_ctx). Since VideoToolbox decoding does not actually require the user to allocate frames, the new code does mostly nothing. One benefit is that ffmpeg_videotoolbox.c can be dropped once generic hwaccel support for ffmpeg.c is merged from Libav. Does not consider VDA or VideoToolbox encoding. Fun fact: the frame transfer functions are copied from vaapi, as the mapping makes copying generic boilerplate. Mapping itself is not exported by the VT code, because I don't know how to test.
* | Merge commit 'd06aa24ba583ad08025da9e1b29afcd8218ff9b0'Clément Bœsch2017-03-30
|\| | | | | | | | | | | | | * commit 'd06aa24ba583ad08025da9e1b29afcd8218ff9b0': hwcontext: Hardware frame mapping Merged-by: Clément Bœsch <cboesch@gopro.com>
| * hwcontext: Hardware frame mappingMark Thompson2016-11-03
| | | | | | | | | | | | | | | | | | | | Adds the new av_hwframe_map() function, which allows mapping between hardware frames and normal memory, along with internal support for implementing it. Also adds av_hwframe_ctx_create_derived(), for creating a hardware frames context associated with one device using frames mapped from another by some hardware-specific means.
* | Merge commit 'fdfe01365d579189d9a55b3741dba2ac46eb1df8'Hendrik Leppkes2016-11-13
|\| | | | | | | | | | | | | * commit 'fdfe01365d579189d9a55b3741dba2ac46eb1df8': hwcontext: allocate the destination frame for the pool size Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext: allocate the destination frame for the pool sizeAnton Khirnov2016-06-28
| | | | | | | | | | | | The source frame may be cropped, so that its dimensions are smaller than the pool dimensions. The transfer_data API requires the allocated size of the destination frame to be the same as the pool size.
* | avutil/hwcontext: use CONFIG_QSV instead of CONFIG_LIBMFX for qsvJames Almer2016-09-28
| | | | | | | | | | | | | | See "[FFmpeg-devel] [PATCH] hwcontext: add a QSV implementation" Suggested-by: nablet developer <sdk@nablet.com> Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '59e7361cc791e5103be1712dc59a2055f118d0da'James Almer2016-09-28
|\| | | | | | | | | | | | | | | | | | | | | * commit '59e7361cc791e5103be1712dc59a2055f118d0da': hwcontext: add a QSV implementation Conflicts: doc/APIchanges libavutil/version.h Merged-by: James Almer <jamrial@gmail.com>
| * hwcontext: add a QSV implementationAnton Khirnov2016-06-21
| |
* | Merge commit '1c9e8616c535ef496e7ee8a5cbc5e9e972a6977d'Hendrik Leppkes2016-06-26
|\| | | | | | | | | | | | | * commit '1c9e8616c535ef496e7ee8a5cbc5e9e972a6977d': hwcontext: add a function for opening devices Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext: add a function for opening devicesAnton Khirnov2016-05-26
| |
* | Merge commit 'c46db38cde8e8fd8ecb1c6602f10ec0e002f29a8'Hendrik Leppkes2016-06-22
|\| | | | | | | | | | | | | * commit 'c46db38cde8e8fd8ecb1c6602f10ec0e002f29a8': hwcontext: add a dxva2 implementation Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * hwcontext: add a dxva2 implementationAnton Khirnov2016-05-17
| |
* | Merge commit 'a0f469da744db83db32f3fe13186ee4aa2bc7dc5'Derek Buitenhuis2016-05-11
|\| | | | | | | | | | | | | * commit 'a0f469da744db83db32f3fe13186ee4aa2bc7dc5': hwcontext: initialize sw_format in av_hwframe_ctx_alloc() Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * hwcontext: initialize sw_format in av_hwframe_ctx_alloc()Anton Khirnov2016-04-15
| |
* | Merge commit '551c6775abb5e0ad34c26d7e23bc6fbbe8ccc9d4'Derek Buitenhuis2016-04-14
|\| | | | | | | | | | | | | * commit '551c6775abb5e0ad34c26d7e23bc6fbbe8ccc9d4': lavu: VAAPI hwcontext implementation Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavu: VAAPI hwcontext implementationMark Thompson2016-03-19
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'b1f01e85a92d401a9b29c79f23db36b7685e8c09'Derek Buitenhuis2016-04-14
|\| | | | | | | | | | | | | * commit 'b1f01e85a92d401a9b29c79f23db36b7685e8c09': lavu: add a way to query hwcontext frame constraints Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavu: add a way to query hwcontext frame constraintsMark Thompson2016-03-19
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073'Derek Buitenhuis2016-02-24
|\| | | | | | | | | | | | | * commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073': hwcontext: add a CUDA implementation Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * hwcontext: add a CUDA implementationAnton Khirnov2016-02-14
| |
* | avutil/hwcontext: Remove duplicate ;Michael Niedermayer2016-02-17
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'a001ce31bc2bcf875a39b5fb22dae49120293b42'Derek Buitenhuis2016-02-17
|\| | | | | | | | | | | | | * commit 'a001ce31bc2bcf875a39b5fb22dae49120293b42': hwcontext: add a VDPAU implementation Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * hwcontext: add a VDPAU implementationAnton Khirnov2016-02-14
| |
* | Merge commit '89923e418b494e337683442ab896d754bc07341a'Derek Buitenhuis2016-02-17
|/ | | | | | | * commit '89923e418b494e337683442ab896d754bc07341a': lavu: add a framework for handling hwaccel frames Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* lavu: add a framework for handling hwaccel framesAnton Khirnov2016-02-14