@pproenca/ffmpeg-darwin-x64-gpl 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/include/aom/aom.h +127 -0
- package/include/aom/aom_codec.h +594 -0
- package/include/aom/aom_decoder.h +257 -0
- package/include/aom/aom_encoder.h +1154 -0
- package/include/aom/aom_external_partition.h +452 -0
- package/include/aom/aom_frame_buffer.h +84 -0
- package/include/aom/aom_image.h +462 -0
- package/include/aom/aom_integer.h +60 -0
- package/include/aom/aomcx.h +2288 -0
- package/include/aom/aomdx.h +607 -0
- package/include/dav1d/common.h +94 -0
- package/include/dav1d/data.h +117 -0
- package/include/dav1d/dav1d.h +329 -0
- package/include/dav1d/headers.h +444 -0
- package/include/dav1d/picture.h +157 -0
- package/include/dav1d/version.h +50 -0
- package/include/index.js +1 -0
- package/include/lame/lame.h +1342 -0
- package/include/libavcodec/ac3_parser.h +36 -0
- package/include/libavcodec/adts_parser.h +37 -0
- package/include/libavcodec/avcodec.h +3128 -0
- package/include/libavcodec/avdct.h +88 -0
- package/include/libavcodec/avfft.h +149 -0
- package/include/libavcodec/bsf.h +332 -0
- package/include/libavcodec/codec.h +382 -0
- package/include/libavcodec/codec_desc.h +134 -0
- package/include/libavcodec/codec_id.h +669 -0
- package/include/libavcodec/codec_par.h +248 -0
- package/include/libavcodec/d3d11va.h +109 -0
- package/include/libavcodec/defs.h +337 -0
- package/include/libavcodec/dirac.h +135 -0
- package/include/libavcodec/dv_profile.h +82 -0
- package/include/libavcodec/dxva2.h +90 -0
- package/include/libavcodec/jni.h +67 -0
- package/include/libavcodec/mediacodec.h +103 -0
- package/include/libavcodec/packet.h +887 -0
- package/include/libavcodec/qsv.h +109 -0
- package/include/libavcodec/vdpau.h +171 -0
- package/include/libavcodec/version.h +45 -0
- package/include/libavcodec/version_major.h +52 -0
- package/include/libavcodec/videotoolbox.h +85 -0
- package/include/libavcodec/vorbis_parser.h +74 -0
- package/include/libavdevice/avdevice.h +397 -0
- package/include/libavdevice/version.h +45 -0
- package/include/libavdevice/version_major.h +43 -0
- package/include/libavfilter/avfilter.h +1379 -0
- package/include/libavfilter/buffersink.h +173 -0
- package/include/libavfilter/buffersrc.h +215 -0
- package/include/libavfilter/version.h +48 -0
- package/include/libavfilter/version_major.h +40 -0
- package/include/libavformat/avformat.h +3107 -0
- package/include/libavformat/avio.h +831 -0
- package/include/libavformat/version.h +47 -0
- package/include/libavformat/version_major.h +54 -0
- package/include/libavutil/adler32.h +63 -0
- package/include/libavutil/aes.h +69 -0
- package/include/libavutil/aes_ctr.h +99 -0
- package/include/libavutil/ambient_viewing_environment.h +72 -0
- package/include/libavutil/attributes.h +173 -0
- package/include/libavutil/audio_fifo.h +187 -0
- package/include/libavutil/avassert.h +78 -0
- package/include/libavutil/avconfig.h +6 -0
- package/include/libavutil/avstring.h +428 -0
- package/include/libavutil/avutil.h +362 -0
- package/include/libavutil/base64.h +72 -0
- package/include/libavutil/blowfish.h +82 -0
- package/include/libavutil/bprint.h +254 -0
- package/include/libavutil/bswap.h +105 -0
- package/include/libavutil/buffer.h +322 -0
- package/include/libavutil/camellia.h +70 -0
- package/include/libavutil/cast5.h +80 -0
- package/include/libavutil/channel_layout.h +751 -0
- package/include/libavutil/common.h +589 -0
- package/include/libavutil/cpu.h +145 -0
- package/include/libavutil/crc.h +102 -0
- package/include/libavutil/csp.h +150 -0
- package/include/libavutil/des.h +81 -0
- package/include/libavutil/detection_bbox.h +108 -0
- package/include/libavutil/dict.h +241 -0
- package/include/libavutil/display.h +109 -0
- package/include/libavutil/dovi_meta.h +396 -0
- package/include/libavutil/downmix_info.h +115 -0
- package/include/libavutil/encryption_info.h +205 -0
- package/include/libavutil/error.h +129 -0
- package/include/libavutil/eval.h +140 -0
- package/include/libavutil/executor.h +67 -0
- package/include/libavutil/ffversion.h +5 -0
- package/include/libavutil/fifo.h +242 -0
- package/include/libavutil/file.h +62 -0
- package/include/libavutil/film_grain_params.h +322 -0
- package/include/libavutil/frame.h +1175 -0
- package/include/libavutil/hash.h +264 -0
- package/include/libavutil/hdr_dynamic_metadata.h +376 -0
- package/include/libavutil/hdr_dynamic_vivid_metadata.h +346 -0
- package/include/libavutil/hmac.h +99 -0
- package/include/libavutil/hwcontext.h +598 -0
- package/include/libavutil/hwcontext_cuda.h +74 -0
- package/include/libavutil/hwcontext_d3d11va.h +178 -0
- package/include/libavutil/hwcontext_d3d12va.h +142 -0
- package/include/libavutil/hwcontext_drm.h +169 -0
- package/include/libavutil/hwcontext_dxva2.h +75 -0
- package/include/libavutil/hwcontext_mediacodec.h +61 -0
- package/include/libavutil/hwcontext_opencl.h +100 -0
- package/include/libavutil/hwcontext_qsv.h +87 -0
- package/include/libavutil/hwcontext_vaapi.h +117 -0
- package/include/libavutil/hwcontext_vdpau.h +44 -0
- package/include/libavutil/hwcontext_videotoolbox.h +106 -0
- package/include/libavutil/hwcontext_vulkan.h +382 -0
- package/include/libavutil/iamf.h +690 -0
- package/include/libavutil/imgutils.h +377 -0
- package/include/libavutil/intfloat.h +77 -0
- package/include/libavutil/intreadwrite.h +677 -0
- package/include/libavutil/lfg.h +81 -0
- package/include/libavutil/log.h +387 -0
- package/include/libavutil/lzo.h +66 -0
- package/include/libavutil/macros.h +80 -0
- package/include/libavutil/mastering_display_metadata.h +137 -0
- package/include/libavutil/mathematics.h +300 -0
- package/include/libavutil/md5.h +89 -0
- package/include/libavutil/mem.h +607 -0
- package/include/libavutil/motion_vector.h +57 -0
- package/include/libavutil/murmur3.h +115 -0
- package/include/libavutil/opt.h +1187 -0
- package/include/libavutil/parseutils.h +197 -0
- package/include/libavutil/pixdesc.h +440 -0
- package/include/libavutil/pixelutils.h +51 -0
- package/include/libavutil/pixfmt.h +716 -0
- package/include/libavutil/random_seed.h +57 -0
- package/include/libavutil/rational.h +225 -0
- package/include/libavutil/rc4.h +69 -0
- package/include/libavutil/replaygain.h +50 -0
- package/include/libavutil/ripemd.h +83 -0
- package/include/libavutil/samplefmt.h +269 -0
- package/include/libavutil/sha.h +90 -0
- package/include/libavutil/sha512.h +92 -0
- package/include/libavutil/spherical.h +243 -0
- package/include/libavutil/stereo3d.h +325 -0
- package/include/libavutil/tea.h +71 -0
- package/include/libavutil/threadmessage.h +115 -0
- package/include/libavutil/time.h +56 -0
- package/include/libavutil/timecode.h +199 -0
- package/include/libavutil/timestamp.h +85 -0
- package/include/libavutil/tree.h +137 -0
- package/include/libavutil/twofish.h +70 -0
- package/include/libavutil/tx.h +210 -0
- package/include/libavutil/uuid.h +146 -0
- package/include/libavutil/version.h +124 -0
- package/include/libavutil/video_enc_params.h +171 -0
- package/include/libavutil/video_hint.h +107 -0
- package/include/libavutil/xtea.h +94 -0
- package/include/libpostproc/postprocess.h +107 -0
- package/include/libpostproc/version.h +46 -0
- package/include/libpostproc/version_major.h +31 -0
- package/include/libswresample/swresample.h +587 -0
- package/include/libswresample/version.h +46 -0
- package/include/libswresample/version_major.h +31 -0
- package/include/libswscale/swscale.h +460 -0
- package/include/libswscale/version.h +44 -0
- package/include/libswscale/version_major.h +35 -0
- package/include/ogg/config_types.h +26 -0
- package/include/ogg/ogg.h +209 -0
- package/include/ogg/os_types.h +158 -0
- package/include/opus/opus.h +1099 -0
- package/include/opus/opus_defines.h +830 -0
- package/include/opus/opus_multistream.h +660 -0
- package/include/opus/opus_projection.h +568 -0
- package/include/opus/opus_types.h +166 -0
- package/include/svt-av1/EbDebugMacros.h +88 -0
- package/include/svt-av1/EbSvtAv1.h +462 -0
- package/include/svt-av1/EbSvtAv1Enc.h +1112 -0
- package/include/svt-av1/EbSvtAv1ErrorCodes.h +67 -0
- package/include/svt-av1/EbSvtAv1ExtFrameBuf.h +64 -0
- package/include/svt-av1/EbSvtAv1Formats.h +126 -0
- package/include/svt-av1/EbSvtAv1Metadata.h +156 -0
- package/include/vorbis/codec.h +242 -0
- package/include/vorbis/vorbisenc.h +435 -0
- package/include/vorbis/vorbisfile.h +205 -0
- package/include/vpx/vp8.h +136 -0
- package/include/vpx/vp8cx.h +1118 -0
- package/include/vpx/vp8dx.h +228 -0
- package/include/vpx/vpx_codec.h +475 -0
- package/include/vpx/vpx_decoder.h +367 -0
- package/include/vpx/vpx_encoder.h +1150 -0
- package/include/vpx/vpx_ext_ratectrl.h +590 -0
- package/include/vpx/vpx_frame_buffer.h +83 -0
- package/include/vpx/vpx_image.h +221 -0
- package/include/vpx/vpx_integer.h +40 -0
- package/include/vpx/vpx_tpl.h +68 -0
- package/include/x264.h +1027 -0
- package/include/x264_config.h +6 -0
- package/include/x265.h +2737 -0
- package/include/x265_config.h +34 -0
- package/lib/index.js +1 -0
- package/lib/libSvtAv1Enc.a +0 -0
- package/lib/libaom.a +0 -0
- package/lib/libavcodec.a +0 -0
- package/lib/libavdevice.a +0 -0
- package/lib/libavfilter.a +0 -0
- package/lib/libavformat.a +0 -0
- package/lib/libavutil.a +0 -0
- package/lib/libdav1d.a +0 -0
- package/lib/libmp3lame.a +0 -0
- package/lib/libogg.a +0 -0
- package/lib/libopus.a +0 -0
- package/lib/libpostproc.a +0 -0
- package/lib/libswresample.a +0 -0
- package/lib/libswscale.a +0 -0
- package/lib/libvorbis.a +0 -0
- package/lib/libvorbisenc.a +0 -0
- package/lib/libvorbisfile.a +0 -0
- package/lib/libvpx.a +0 -0
- package/lib/libx264.a +0 -0
- package/lib/libx265.a +0 -0
- package/package.json +35 -0
- package/versions.json +1 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of FFmpeg.
|
|
3
|
+
*
|
|
4
|
+
* FFmpeg is free software; you can redistribute it and/or
|
|
5
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
6
|
+
* License as published by the Free Software Foundation; either
|
|
7
|
+
* version 2.1 of the License, or (at your option) any later version.
|
|
8
|
+
*
|
|
9
|
+
* FFmpeg is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
12
|
+
* Lesser General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
15
|
+
* License along with FFmpeg; if not, write to the Free Software
|
|
16
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
#ifndef AVUTIL_HWCONTEXT_OPENCL_H
|
|
20
|
+
#define AVUTIL_HWCONTEXT_OPENCL_H
|
|
21
|
+
|
|
22
|
+
#ifdef __APPLE__
|
|
23
|
+
#include <OpenCL/cl.h>
|
|
24
|
+
#else
|
|
25
|
+
#include <CL/cl.h>
|
|
26
|
+
#endif
|
|
27
|
+
|
|
28
|
+
#include "frame.h"
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @file
|
|
32
|
+
* API-specific header for AV_HWDEVICE_TYPE_OPENCL.
|
|
33
|
+
*
|
|
34
|
+
* Pools allocated internally are always dynamic, and are primarily intended
|
|
35
|
+
* to be used in OpenCL-only cases. If interoperation is required, it is
|
|
36
|
+
* typically required to allocate frames in the other API and then map the
|
|
37
|
+
* frames context to OpenCL with av_hwframe_ctx_create_derived().
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* OpenCL frame descriptor for pool allocation.
|
|
42
|
+
*
|
|
43
|
+
* In user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs
|
|
44
|
+
* with the data pointer pointing at an object of this type describing the
|
|
45
|
+
* planes of the frame.
|
|
46
|
+
*/
|
|
47
|
+
typedef struct AVOpenCLFrameDescriptor {
|
|
48
|
+
/**
|
|
49
|
+
* Number of planes in the frame.
|
|
50
|
+
*/
|
|
51
|
+
int nb_planes;
|
|
52
|
+
/**
|
|
53
|
+
* OpenCL image2d objects for each plane of the frame.
|
|
54
|
+
*/
|
|
55
|
+
cl_mem planes[AV_NUM_DATA_POINTERS];
|
|
56
|
+
} AVOpenCLFrameDescriptor;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* OpenCL device details.
|
|
60
|
+
*
|
|
61
|
+
* Allocated as AVHWDeviceContext.hwctx
|
|
62
|
+
*/
|
|
63
|
+
typedef struct AVOpenCLDeviceContext {
|
|
64
|
+
/**
|
|
65
|
+
* The primary device ID of the device. If multiple OpenCL devices
|
|
66
|
+
* are associated with the context then this is the one which will
|
|
67
|
+
* be used for all operations internal to FFmpeg.
|
|
68
|
+
*/
|
|
69
|
+
cl_device_id device_id;
|
|
70
|
+
/**
|
|
71
|
+
* The OpenCL context which will contain all operations and frames on
|
|
72
|
+
* this device.
|
|
73
|
+
*/
|
|
74
|
+
cl_context context;
|
|
75
|
+
/**
|
|
76
|
+
* The default command queue for this device, which will be used by all
|
|
77
|
+
* frames contexts which do not have their own command queue. If not
|
|
78
|
+
* intialised by the user, a default queue will be created on the
|
|
79
|
+
* primary device.
|
|
80
|
+
*/
|
|
81
|
+
cl_command_queue command_queue;
|
|
82
|
+
} AVOpenCLDeviceContext;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* OpenCL-specific data associated with a frame pool.
|
|
86
|
+
*
|
|
87
|
+
* Allocated as AVHWFramesContext.hwctx.
|
|
88
|
+
*/
|
|
89
|
+
typedef struct AVOpenCLFramesContext {
|
|
90
|
+
/**
|
|
91
|
+
* The command queue used for internal asynchronous operations on this
|
|
92
|
+
* device (av_hwframe_transfer_data(), av_hwframe_map()).
|
|
93
|
+
*
|
|
94
|
+
* If this is not set, the command queue from the associated device is
|
|
95
|
+
* used instead.
|
|
96
|
+
*/
|
|
97
|
+
cl_command_queue command_queue;
|
|
98
|
+
} AVOpenCLFramesContext;
|
|
99
|
+
|
|
100
|
+
#endif /* AVUTIL_HWCONTEXT_OPENCL_H */
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of FFmpeg.
|
|
3
|
+
*
|
|
4
|
+
* FFmpeg is free software; you can redistribute it and/or
|
|
5
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
6
|
+
* License as published by the Free Software Foundation; either
|
|
7
|
+
* version 2.1 of the License, or (at your option) any later version.
|
|
8
|
+
*
|
|
9
|
+
* FFmpeg is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
12
|
+
* Lesser General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
15
|
+
* License along with FFmpeg; if not, write to the Free Software
|
|
16
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
#ifndef AVUTIL_HWCONTEXT_QSV_H
|
|
20
|
+
#define AVUTIL_HWCONTEXT_QSV_H
|
|
21
|
+
|
|
22
|
+
#include <mfxvideo.h>
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @file
|
|
26
|
+
* An API-specific header for AV_HWDEVICE_TYPE_QSV.
|
|
27
|
+
*
|
|
28
|
+
* AVHWFramesContext.pool must contain AVBufferRefs whose data pointer points
|
|
29
|
+
* to a mfxFrameSurface1 struct.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* This struct is allocated as AVHWDeviceContext.hwctx
|
|
34
|
+
*/
|
|
35
|
+
typedef struct AVQSVDeviceContext {
|
|
36
|
+
mfxSession session;
|
|
37
|
+
/**
|
|
38
|
+
* The mfxLoader handle used for mfxSession creation
|
|
39
|
+
*
|
|
40
|
+
* This field is only available for oneVPL user. For non-oneVPL user, this
|
|
41
|
+
* field must be set to NULL.
|
|
42
|
+
*
|
|
43
|
+
* Filled by the user before calling av_hwdevice_ctx_init() and should be
|
|
44
|
+
* cast to mfxLoader handle. Deallocating the AVHWDeviceContext will always
|
|
45
|
+
* release this interface.
|
|
46
|
+
*/
|
|
47
|
+
void *loader;
|
|
48
|
+
} AVQSVDeviceContext;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* This struct is allocated as AVHWFramesContext.hwctx
|
|
52
|
+
*/
|
|
53
|
+
typedef struct AVQSVFramesContext {
|
|
54
|
+
/**
|
|
55
|
+
* A pointer to a mfxFrameSurface1 struct
|
|
56
|
+
*
|
|
57
|
+
* It is available when nb_surfaces is non-zero.
|
|
58
|
+
*/
|
|
59
|
+
mfxFrameSurface1 *surfaces;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Number of frames in the pool
|
|
63
|
+
*
|
|
64
|
+
* It is 0 for dynamic frame pools or AVHWFramesContext.initial_pool_size
|
|
65
|
+
* for fixed frame pools.
|
|
66
|
+
*
|
|
67
|
+
* Note only oneVPL GPU runtime 2.9+ can support dynamic frame pools
|
|
68
|
+
* on d3d11va or vaapi
|
|
69
|
+
*/
|
|
70
|
+
int nb_surfaces;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* A combination of MFX_MEMTYPE_* describing the frame pool.
|
|
74
|
+
*/
|
|
75
|
+
int frame_type;
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* A pointer to a mfxFrameInfo struct
|
|
79
|
+
*
|
|
80
|
+
* It is available when nb_surfaces is 0, all buffers allocated from the
|
|
81
|
+
* pool have the same mfxFrameInfo.
|
|
82
|
+
*/
|
|
83
|
+
mfxFrameInfo *info;
|
|
84
|
+
} AVQSVFramesContext;
|
|
85
|
+
|
|
86
|
+
#endif /* AVUTIL_HWCONTEXT_QSV_H */
|
|
87
|
+
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of FFmpeg.
|
|
3
|
+
*
|
|
4
|
+
* FFmpeg is free software; you can redistribute it and/or
|
|
5
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
6
|
+
* License as published by the Free Software Foundation; either
|
|
7
|
+
* version 2.1 of the License, or (at your option) any later version.
|
|
8
|
+
*
|
|
9
|
+
* FFmpeg is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
12
|
+
* Lesser General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
15
|
+
* License along with FFmpeg; if not, write to the Free Software
|
|
16
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
#ifndef AVUTIL_HWCONTEXT_VAAPI_H
|
|
20
|
+
#define AVUTIL_HWCONTEXT_VAAPI_H
|
|
21
|
+
|
|
22
|
+
#include <va/va.h>
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @file
|
|
26
|
+
* API-specific header for AV_HWDEVICE_TYPE_VAAPI.
|
|
27
|
+
*
|
|
28
|
+
* Dynamic frame pools are supported, but note that any pool used as a render
|
|
29
|
+
* target is required to be of fixed size in order to be be usable as an
|
|
30
|
+
* argument to vaCreateContext().
|
|
31
|
+
*
|
|
32
|
+
* For user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs
|
|
33
|
+
* with the data pointer set to a VASurfaceID.
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
enum {
|
|
37
|
+
/**
|
|
38
|
+
* The quirks field has been set by the user and should not be detected
|
|
39
|
+
* automatically by av_hwdevice_ctx_init().
|
|
40
|
+
*/
|
|
41
|
+
AV_VAAPI_DRIVER_QUIRK_USER_SET = (1 << 0),
|
|
42
|
+
/**
|
|
43
|
+
* The driver does not destroy parameter buffers when they are used by
|
|
44
|
+
* vaRenderPicture(). Additional code will be required to destroy them
|
|
45
|
+
* separately afterwards.
|
|
46
|
+
*/
|
|
47
|
+
AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS = (1 << 1),
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The driver does not support the VASurfaceAttribMemoryType attribute,
|
|
51
|
+
* so the surface allocation code will not try to use it.
|
|
52
|
+
*/
|
|
53
|
+
AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE = (1 << 2),
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The driver does not support surface attributes at all.
|
|
57
|
+
* The surface allocation code will never pass them to surface allocation,
|
|
58
|
+
* and the results of the vaQuerySurfaceAttributes() call will be faked.
|
|
59
|
+
*/
|
|
60
|
+
AV_VAAPI_DRIVER_QUIRK_SURFACE_ATTRIBUTES = (1 << 3),
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* VAAPI connection details.
|
|
65
|
+
*
|
|
66
|
+
* Allocated as AVHWDeviceContext.hwctx
|
|
67
|
+
*/
|
|
68
|
+
typedef struct AVVAAPIDeviceContext {
|
|
69
|
+
/**
|
|
70
|
+
* The VADisplay handle, to be filled by the user.
|
|
71
|
+
*/
|
|
72
|
+
VADisplay display;
|
|
73
|
+
/**
|
|
74
|
+
* Driver quirks to apply - this is filled by av_hwdevice_ctx_init(),
|
|
75
|
+
* with reference to a table of known drivers, unless the
|
|
76
|
+
* AV_VAAPI_DRIVER_QUIRK_USER_SET bit is already present. The user
|
|
77
|
+
* may need to refer to this field when performing any later
|
|
78
|
+
* operations using VAAPI with the same VADisplay.
|
|
79
|
+
*/
|
|
80
|
+
unsigned int driver_quirks;
|
|
81
|
+
} AVVAAPIDeviceContext;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* VAAPI-specific data associated with a frame pool.
|
|
85
|
+
*
|
|
86
|
+
* Allocated as AVHWFramesContext.hwctx.
|
|
87
|
+
*/
|
|
88
|
+
typedef struct AVVAAPIFramesContext {
|
|
89
|
+
/**
|
|
90
|
+
* Set by the user to apply surface attributes to all surfaces in
|
|
91
|
+
* the frame pool. If null, default settings are used.
|
|
92
|
+
*/
|
|
93
|
+
VASurfaceAttrib *attributes;
|
|
94
|
+
int nb_attributes;
|
|
95
|
+
/**
|
|
96
|
+
* The surfaces IDs of all surfaces in the pool after creation.
|
|
97
|
+
* Only valid if AVHWFramesContext.initial_pool_size was positive.
|
|
98
|
+
* These are intended to be used as the render_targets arguments to
|
|
99
|
+
* vaCreateContext().
|
|
100
|
+
*/
|
|
101
|
+
VASurfaceID *surface_ids;
|
|
102
|
+
int nb_surfaces;
|
|
103
|
+
} AVVAAPIFramesContext;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* VAAPI hardware pipeline configuration details.
|
|
107
|
+
*
|
|
108
|
+
* Allocated with av_hwdevice_hwconfig_alloc().
|
|
109
|
+
*/
|
|
110
|
+
typedef struct AVVAAPIHWConfig {
|
|
111
|
+
/**
|
|
112
|
+
* ID of a VAAPI pipeline configuration.
|
|
113
|
+
*/
|
|
114
|
+
VAConfigID config_id;
|
|
115
|
+
} AVVAAPIHWConfig;
|
|
116
|
+
|
|
117
|
+
#endif /* AVUTIL_HWCONTEXT_VAAPI_H */
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of FFmpeg.
|
|
3
|
+
*
|
|
4
|
+
* FFmpeg is free software; you can redistribute it and/or
|
|
5
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
6
|
+
* License as published by the Free Software Foundation; either
|
|
7
|
+
* version 2.1 of the License, or (at your option) any later version.
|
|
8
|
+
*
|
|
9
|
+
* FFmpeg is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
12
|
+
* Lesser General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
15
|
+
* License along with FFmpeg; if not, write to the Free Software
|
|
16
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
#ifndef AVUTIL_HWCONTEXT_VDPAU_H
|
|
20
|
+
#define AVUTIL_HWCONTEXT_VDPAU_H
|
|
21
|
+
|
|
22
|
+
#include <vdpau/vdpau.h>
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @file
|
|
26
|
+
* An API-specific header for AV_HWDEVICE_TYPE_VDPAU.
|
|
27
|
+
*
|
|
28
|
+
* This API supports dynamic frame pools. AVHWFramesContext.pool must return
|
|
29
|
+
* AVBufferRefs whose data pointer is a VdpVideoSurface.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* This struct is allocated as AVHWDeviceContext.hwctx
|
|
34
|
+
*/
|
|
35
|
+
typedef struct AVVDPAUDeviceContext {
|
|
36
|
+
VdpDevice device;
|
|
37
|
+
VdpGetProcAddress *get_proc_address;
|
|
38
|
+
} AVVDPAUDeviceContext;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* AVHWFramesContext.hwctx is currently not used
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
#endif /* AVUTIL_HWCONTEXT_VDPAU_H */
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This file is part of FFmpeg.
|
|
3
|
+
*
|
|
4
|
+
* FFmpeg is free software; you can redistribute it and/or
|
|
5
|
+
* modify it under the terms of the GNU Lesser General Public
|
|
6
|
+
* License as published by the Free Software Foundation; either
|
|
7
|
+
* version 2.1 of the License, or (at your option) any later version.
|
|
8
|
+
*
|
|
9
|
+
* FFmpeg is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
12
|
+
* Lesser General Public License for more details.
|
|
13
|
+
*
|
|
14
|
+
* You should have received a copy of the GNU Lesser General Public
|
|
15
|
+
* License along with FFmpeg; if not, write to the Free Software
|
|
16
|
+
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
#ifndef AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H
|
|
20
|
+
#define AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H
|
|
21
|
+
|
|
22
|
+
#include <stdint.h>
|
|
23
|
+
|
|
24
|
+
#include <VideoToolbox/VideoToolbox.h>
|
|
25
|
+
|
|
26
|
+
#include "frame.h"
|
|
27
|
+
#include "pixfmt.h"
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @file
|
|
31
|
+
* An API-specific header for AV_HWDEVICE_TYPE_VIDEOTOOLBOX.
|
|
32
|
+
*
|
|
33
|
+
* This API supports frame allocation using a native CVPixelBufferPool
|
|
34
|
+
* instead of an AVBufferPool.
|
|
35
|
+
*
|
|
36
|
+
* If the API user sets a custom pool, AVHWFramesContext.pool must return
|
|
37
|
+
* AVBufferRefs whose data pointer is a CVImageBufferRef or CVPixelBufferRef.
|
|
38
|
+
* Note that the underlying CVPixelBuffer could be retained by OS frameworks
|
|
39
|
+
* depending on application usage, so it is preferable to let CoreVideo manage
|
|
40
|
+
* the pool using the default implementation.
|
|
41
|
+
*
|
|
42
|
+
* Currently AVHWDeviceContext.hwctx are always NULL.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
typedef struct AVVTFramesContext {
|
|
46
|
+
enum AVColorRange color_range;
|
|
47
|
+
} AVVTFramesContext;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Convert a VideoToolbox (actually CoreVideo) format to AVPixelFormat.
|
|
51
|
+
* Returns AV_PIX_FMT_NONE if no known equivalent was found.
|
|
52
|
+
*/
|
|
53
|
+
enum AVPixelFormat av_map_videotoolbox_format_to_pixfmt(uint32_t cv_fmt);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Convert an AVPixelFormat to a VideoToolbox (actually CoreVideo) format.
|
|
57
|
+
* Returns 0 if no known equivalent was found.
|
|
58
|
+
*/
|
|
59
|
+
uint32_t av_map_videotoolbox_format_from_pixfmt(enum AVPixelFormat pix_fmt);
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Same as av_map_videotoolbox_format_from_pixfmt function, but can map and
|
|
63
|
+
* return full range pixel formats via a flag.
|
|
64
|
+
*/
|
|
65
|
+
uint32_t av_map_videotoolbox_format_from_pixfmt2(enum AVPixelFormat pix_fmt, bool full_range);
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Convert an AVChromaLocation to a VideoToolbox/CoreVideo chroma location string.
|
|
69
|
+
* Returns 0 if no known equivalent was found.
|
|
70
|
+
*/
|
|
71
|
+
CFStringRef av_map_videotoolbox_chroma_loc_from_av(enum AVChromaLocation loc);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Convert an AVColorSpace to a VideoToolbox/CoreVideo color matrix string.
|
|
75
|
+
* Returns 0 if no known equivalent was found.
|
|
76
|
+
*/
|
|
77
|
+
CFStringRef av_map_videotoolbox_color_matrix_from_av(enum AVColorSpace space);
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Convert an AVColorPrimaries to a VideoToolbox/CoreVideo color primaries string.
|
|
81
|
+
* Returns 0 if no known equivalent was found.
|
|
82
|
+
*/
|
|
83
|
+
CFStringRef av_map_videotoolbox_color_primaries_from_av(enum AVColorPrimaries pri);
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Convert an AVColorTransferCharacteristic to a VideoToolbox/CoreVideo color transfer
|
|
87
|
+
* function string.
|
|
88
|
+
* Returns 0 if no known equivalent was found.
|
|
89
|
+
*/
|
|
90
|
+
CFStringRef av_map_videotoolbox_color_trc_from_av(enum AVColorTransferCharacteristic trc);
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Set CVPixelBufferRef's metadata based on an AVFrame.
|
|
94
|
+
*
|
|
95
|
+
* Sets/unsets the CVPixelBuffer attachments to match as closely as possible the
|
|
96
|
+
* AVFrame metadata. To prevent inconsistent attachments, the attachments for properties
|
|
97
|
+
* that could not be matched or are unspecified in the given AVFrame are unset. So if
|
|
98
|
+
* any attachments already covered by AVFrame metadata need to be set to a specific
|
|
99
|
+
* value, this should happen after calling this function.
|
|
100
|
+
*
|
|
101
|
+
* Returns < 0 in case of an error.
|
|
102
|
+
*/
|
|
103
|
+
int av_vt_pixbuf_set_attachments(void *log_ctx,
|
|
104
|
+
CVPixelBufferRef pixbuf, const struct AVFrame *src);
|
|
105
|
+
|
|
106
|
+
#endif /* AVUTIL_HWCONTEXT_VIDEOTOOLBOX_H */
|