-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathh265_vaapi_encoder.cpp
More file actions
48 lines (43 loc) · 1.56 KB
/
Copy pathh265_vaapi_encoder.cpp
File metadata and controls
48 lines (43 loc) · 1.56 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 "h265_vaapi_encoder.h"
#include "hw_encoder_capabilities.h"
EncoderInfo H265VaapiEncoder::encoderInfo = {
.UUID{0x2b, 0xfa, 0xeb, 0xed, 0xaa, 0x3d, 0x45, 0xbf, 0xe2, 0x27, 0x32, 0x4a, 0x96, 0x7a, 0xb4, 0x66},
.codecGroup = "H.265",
.fourCC = 'hvc1',
.encoder = "hevc_vaapi",
.hwAcceleration = Vaapi,
.qualityModes = CQP | VBR,
.qp = {1, 25, 51},
.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,
},
},
};
H265VaapiEncoder::H265VaapiEncoder(const int formatIndex) {
FFmpegEncoder::encoderInfo = encoderInfo;
FFmpegEncoder::formatIndex = formatIndex;
}
StatusCode H265VaapiEncoder::RegisterCodecs(HostListRef* list) {
InitializeVaapiPresets(encoderInfo);
return FFmpegEncoder::RegisterCodecs(list, encoderInfo);
}
StatusCode H265VaapiEncoder::GetEncoderSettings(HostPropertyCollectionRef* values, HostListRef* settingsList) {
return FFmpegEncoder::GetEncoderSettings(values, settingsList, encoderInfo);
}