-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathav1_vulkan_encoder.cpp
More file actions
48 lines (43 loc) · 1.52 KB
/
Copy pathav1_vulkan_encoder.cpp
File metadata and controls
48 lines (43 loc) · 1.52 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 "av1_vulkan_encoder.h"
#include "hw_encoder_capabilities.h"
EncoderInfo Av1VulkanEncoder::encoderInfo = {
.UUID{0x12, 0x1f, 0xa5, 0x6f, 0x3e, 0x4e, 0x4c, 0x3f, 0x9f, 0xf1, 0xb2, 0x26, 0x28, 0xd3, 0xcc, 0x47},
.codecGroup = "AV1",
.fourCC = 'av01',
.encoder = "av1_vulkan",
.hwAcceleration = Vulkan,
.qualityModes = CQP | VBR,
.qp = {1, 25, 63},
.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,
},
},
};
Av1VulkanEncoder::Av1VulkanEncoder(const int formatIndex) {
FFmpegEncoder::encoderInfo = encoderInfo;
FFmpegEncoder::formatIndex = formatIndex;
}
StatusCode Av1VulkanEncoder::RegisterCodecs(HostListRef* list) {
InitializeVulkanPresets(encoderInfo);
return FFmpegEncoder::RegisterCodecs(list, encoderInfo);
}
StatusCode Av1VulkanEncoder::GetEncoderSettings(HostPropertyCollectionRef* values, HostListRef* settingsList) {
return FFmpegEncoder::GetEncoderSettings(values, settingsList, encoderInfo);
}