Fix amd_rc config options

This commit is contained in:
loki
2021-05-09 16:37:40 +02:00
parent ade2ef3a15
commit 377b086882
2 changed files with 11 additions and 17 deletions
+2 -4
View File
@@ -185,11 +185,9 @@
####### rate control ##### ####### rate control #####
# auto -- let ffmpeg decide rate control # auto -- let ffmpeg decide rate control
# constqp -- constant QP mode # constqp -- constant QP mode
# vbr -- variable bitrate # vbr_latency -- Latency Constrained Variable Bitrate
# vbr_peak -- Peak Contrained Variable Bitrate
# cbr -- constant bitrate # cbr -- constant bitrate
# cbr_hq -- cbr high quality
# cbr_ld_hq -- cbr low delay high quality
# vbr_hq -- vbr high quality
########################## ##########################
# amd_rc = auto # amd_rc = auto
+6 -10
View File
@@ -94,12 +94,10 @@ enum quality_e : int {
}; };
enum rc_e : int { enum rc_e : int {
constqp = 0x0, /**< Constant QP mode */ constqp, /**< Constant QP mode */
vbr = 0x1, /**< Variable bitrate mode */ vbr_latency, /**< Latency Constrained Variable Bitrate */
cbr = 0x2, /**< Constant bitrate mode */ vbr_peak, /**< Peak Contrained Variable Bitrate */
cbr_ld_hq = 0x8, /**< low-delay CBR, high quality */ cbr, /**< Constant bitrate mode */
cbr_hq = 0x10, /**< CBR, high quality (slower) */
vbr_hq = 0x20 /**< VBR, high quality (slower) */
}; };
enum coder_e : int { enum coder_e : int {
@@ -121,11 +119,9 @@ std::optional<quality_e> quality_from_view(const std::string_view &quality) {
std::optional<rc_e> rc_from_view(const std::string_view &rc) { std::optional<rc_e> rc_from_view(const std::string_view &rc) {
#define _CONVERT_(x) if(rc == #x##sv) return x #define _CONVERT_(x) if(rc == #x##sv) return x
_CONVERT_(constqp); _CONVERT_(constqp);
_CONVERT_(vbr); _CONVERT_(vbr_latency);
_CONVERT_(vbr_peak);
_CONVERT_(cbr); _CONVERT_(cbr);
_CONVERT_(cbr_hq);
_CONVERT_(vbr_hq);
_CONVERT_(cbr_ld_hq);
#undef _CONVERT_ #undef _CONVERT_
return std::nullopt; return std::nullopt;
} }