diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-02-24 18:23:16 +0300 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-02-24 18:23:16 +0300 |
commit | 6992276acaaee32b33bd5f6e2f0d89588c4ae59a (patch) | |
tree | cd5d035d3293ae6076de0b6cc0a41e132e64539d /libavutil/hwcontext_cuda.h | |
parent | 63c3e35332838fca19b7ffdae13233b0f3759402 (diff) | |
parent | ad884d100259e55cb51a4239cd8a4fd5154c2073 (diff) |
Merge commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073'
* commit 'ad884d100259e55cb51a4239cd8a4fd5154c2073':
hwcontext: add a CUDA implementation
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavutil/hwcontext_cuda.h')
-rw-r--r-- | libavutil/hwcontext_cuda.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/libavutil/hwcontext_cuda.h b/libavutil/hwcontext_cuda.h new file mode 100644 index 0000000000..23a77cee73 --- /dev/null +++ b/libavutil/hwcontext_cuda.h @@ -0,0 +1,46 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +#ifndef AVUTIL_HWCONTEXT_CUDA_H +#define AVUTIL_HWCONTEXT_CUDA_H + +#include <cuda.h> + +#include "pixfmt.h" + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_CUDA. + * + * This API supports dynamic frame pools. AVHWFramesContext.pool must return + * AVBufferRefs whose data pointer is a CUdeviceptr. + */ + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVCUDADeviceContext { + CUcontext cuda_ctx; +} AVCUDADeviceContext; + +/** + * AVHWFramesContext.hwctx is currently not used + */ + +#endif /* AVUTIL_HWCONTEXT_CUDA_H */ |