Skip to content

Commit

Permalink
obs-ffmpeg: Set ENFORCE_HRD when filler data is enabled for AMD
Browse files Browse the repository at this point in the history
  • Loading branch information
rhutsAMD committed Aug 8, 2023
1 parent b26e26b commit d83d845
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/obs-ffmpeg/texture-amf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,7 @@ static void amf_avc_update_data(amf_base *enc, int rc, int64_t bitrate,
if (rc == AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR ||
rc == AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR) {
set_avc_property(enc, FILLER_DATA_ENABLE, true);
set_avc_property(enc, ENFORCE_HRD, true);
} else if (
rc == AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR ||
rc == AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_HIGH_QUALITY_VBR) {
Expand Down Expand Up @@ -1660,6 +1661,7 @@ static void amf_hevc_update_data(amf_base *enc, int rc, int64_t bitrate,
if (rc == AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CBR ||
rc == AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR) {
set_hevc_property(enc, FILLER_DATA_ENABLE, true);
set_hevc_property(enc, ENFORCE_HRD, true);
} else if (
rc == AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR ||
rc == AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_HIGH_QUALITY_VBR) {
Expand Down Expand Up @@ -2075,6 +2077,7 @@ static void amf_av1_update_data(amf_base *enc, int rc, int64_t bitrate,
if (rc == AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_CBR ||
rc == AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_HIGH_QUALITY_CBR) {
set_av1_property(enc, FILLER_DATA, true);
set_av1_property(enc, ENFORCE_HRD, true);
} else if (
rc == AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR ||
rc == AMF_VIDEO_ENCODER_AV1_RATE_CONTROL_METHOD_HIGH_QUALITY_VBR) {
Expand Down

0 comments on commit d83d845

Please sign in to comment.