-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathh264_nvenc_encoder.cpp
More file actions
54 lines (50 loc) · 1.61 KB
/
h264_nvenc_encoder.cpp
File metadata and controls
54 lines (50 loc) · 1.61 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
49
50
51
52
53
54
#include "h264_nvenc_encoder.h"
const EncoderInfo H264NvencEncoder::encoderInfo = {
.UUID{0x10, 0x2f, 0x9d, 0x71, 0x19, 0xd7, 0xa8, 0xde, 0x90, 0xb1, 0xff, 0x35, 0x91, 0x4f, 0xaa, 0x36},
.codecGroup = "H.264",
.fourCC = 'avc1',
.encoder = "h264_nvenc",
.hwAcceleration = Nvenc,
.qualityModes = CQP | VBR,
.qp = {0, 0, 51},
.presets =
{
{0, "p1"},
{1, "p2"},
{2, "p3"},
{3, "p4"},
{4, "p5"},
{5, "p6"},
{6, "p7"},
},
.defaultPreset = 3,
.formats =
{
{
.codecName = "NVENC 8-bit 4:2:0 (FFmpeg)",
.bitDepth = 8,
.colorModel = clrNV12,
.hSubsampling = 2,
.vSubsampling = 2,
.pixelFormat = AV_PIX_FMT_NV12,
},
{
.codecName = "NVENC 10-bit 4:2:0 (FFmpeg)",
.bitDepth = 10,
.colorModel = clrNV12,
.hSubsampling = 2,
.vSubsampling = 2,
.pixelFormat = AV_PIX_FMT_P010,
},
},
};
H264NvencEncoder::H264NvencEncoder(const int formatIndex) {
FFmpegEncoder::encoderInfo = encoderInfo;
FFmpegEncoder::formatIndex = formatIndex;
}
StatusCode H264NvencEncoder::RegisterCodecs(HostListRef* list) {
return FFmpegEncoder::RegisterCodecs(list, encoderInfo);
}
StatusCode H264NvencEncoder::GetEncoderSettings(HostPropertyCollectionRef* values, HostListRef* settingsList) {
return FFmpegEncoder::GetEncoderSettings(values, settingsList, encoderInfo);
}