-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathav1_vaapi_encoder.cpp
More file actions
48 lines (43 loc) · 1.55 KB
/
Copy pathav1_vaapi_encoder.cpp
File metadata and controls
48 lines (43 loc) · 1.55 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_vaapi_encoder.h"
#include "hw_encoder_capabilities.h"
EncoderInfo Av1VaapiEncoder::encoderInfo = {
.UUID{0x95, 0x43, 0x6f, 0x52, 0xfb, 0xab, 0x11, 0x60, 0x04, 0x51, 0xf8, 0x5b, 0x83, 0xa4, 0x76, 0x4d},
.codecGroup = "AV1",
.fourCC = 'av01',
.encoder = "av1_vaapi",
.hwAcceleration = Vaapi,
.qualityModes = CQP | VBR,
.qp = {1, 25, 63},
.presets = {{FF_COMPRESSION_DEFAULT, "Default"}},
.defaultPreset = FF_COMPRESSION_DEFAULT,
.formats =
{
{
.codecName = "VAAPI 8-bit 4:2:0 (FFmpeg)",
.bitDepth = 8,
.colorModel = clrNV12,
.hSubsampling = 2,
.vSubsampling = 2,
.pixelFormat = AV_PIX_FMT_NV12,
},
{
.codecName = "VAAPI 10-bit 4:2:0 (FFmpeg)",
.bitDepth = 10,
.colorModel = clrNV12,
.hSubsampling = 2,
.vSubsampling = 2,
.pixelFormat = AV_PIX_FMT_P010,
},
},
};
Av1VaapiEncoder::Av1VaapiEncoder(const int formatIndex) {
FFmpegEncoder::encoderInfo = encoderInfo;
FFmpegEncoder::formatIndex = formatIndex;
}
StatusCode Av1VaapiEncoder::RegisterCodecs(HostListRef* list) {
InitializeVaapiPresets(encoderInfo);
return FFmpegEncoder::RegisterCodecs(list, encoderInfo);
}
StatusCode Av1VaapiEncoder::GetEncoderSettings(HostPropertyCollectionRef* values, HostListRef* settingsList) {
return FFmpegEncoder::GetEncoderSettings(values, settingsList, encoderInfo);
}