-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathh264_vulkan_encoder.cpp
More file actions
48 lines (43 loc) · 1.53 KB
/
Copy pathh264_vulkan_encoder.cpp
File metadata and controls
48 lines (43 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "h264_vulkan_encoder.h"
#include "hw_encoder_capabilities.h"
EncoderInfo H264VulkanEncoder::encoderInfo = {
.UUID{0x12, 0x1c, 0x5e, 0x0b, 0x16, 0xb2, 0x44, 0x26, 0xbd, 0x97, 0x83, 0x17, 0x91, 0x52, 0x69, 0xe8},
.codecGroup = "H.264",
.fourCC = 'avc1',
.encoder = "h264_vulkan",
.hwAcceleration = Vulkan,
.qualityModes = CQP | VBR,
.qp = {1, 20, 51},
.presets = {{0, "Default"}},
.defaultPreset = 0,
.formats =
{
{
.codecName = "Vulkan 8-bit 4:2:0 (FFmpeg)",
.bitDepth = 8,
.colorModel = clrNV12,
.hSubsampling = 2,
.vSubsampling = 2,
.pixelFormat = AV_PIX_FMT_NV12,
},
{
.codecName = "Vulkan 10-bit 4:2:0 (FFmpeg)",
.bitDepth = 10,
.colorModel = clrNV12,
.hSubsampling = 2,
.vSubsampling = 2,
.pixelFormat = AV_PIX_FMT_P010,
},
},
};
H264VulkanEncoder::H264VulkanEncoder(const int formatIndex) {
FFmpegEncoder::encoderInfo = encoderInfo;
FFmpegEncoder::formatIndex = formatIndex;
}
StatusCode H264VulkanEncoder::RegisterCodecs(HostListRef* list) {
InitializeVulkanPresets(encoderInfo);
return FFmpegEncoder::RegisterCodecs(list, encoderInfo);
}
StatusCode H264VulkanEncoder::GetEncoderSettings(HostPropertyCollectionRef* values, HostListRef* settingsList) {
return FFmpegEncoder::GetEncoderSettings(values, settingsList, encoderInfo);
}