Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion src/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@

} // namespace qsv

namespace amf {

enum class coder_e : int {
auto_ = 0,
cabac = 1,
cavlc = 2,
};

} // namespace amf

util::Either<avcodec_buffer_t, int> dxgi_init_avcodec_hardware_input_buffer(platf::avcodec_encode_device_t *);
util::Either<avcodec_buffer_t, int> vaapi_init_avcodec_hardware_input_buffer(platf::avcodec_encode_device_t *);
util::Either<avcodec_buffer_t, int> cuda_init_avcodec_hardware_input_buffer(platf::avcodec_encode_device_t *);
Expand Down Expand Up @@ -814,9 +824,22 @@
{"rc"s, &config::video.amd.amd_rc_h264},
{"usage"s, &config::video.amd.amd_usage_h264},
{"vbaq"s, &config::video.amd.amd_vbaq},
{"coder"s, &config::video.amd.amd_coder},
{"enforce_hrd"s, &config::video.amd.amd_enforce_hrd},
},
{}, // SDR-specific options
{
// SDR-specific options
{"profile"s, [](const config_t &) {
switch (config::video.amd.amd_coder) {
case (int) amf::coder_e::cavlc:

Check warning on line 834 in src/video.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use "std::to_underlying" to cast enums to their underlying type.

See more on https://sonarcloud.io/project/issues?id=LizardByte_Sunshine&issues=AZ528JOQfeNRQCeug0Hx&open=AZ528JOQfeNRQCeug0Hx&pullRequest=4927
return "constrained_baseline"s;
case (int) amf::coder_e::cabac:

Check warning on line 836 in src/video.cpp

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use "std::to_underlying" to cast enums to their underlying type.

See more on https://sonarcloud.io/project/issues?id=LizardByte_Sunshine&issues=AZ528JOQfeNRQCeug0Hy&open=AZ528JOQfeNRQCeug0Hy&pullRequest=4927
return "high"s;
default:
return "main"s;
}
}},
},
{}, // HDR-specific options
{}, // YUV444 SDR-specific options
{}, // YUV444 HDR-specific options
Expand Down