Fix av1 SVT_AV1_PRED_LOW_DELAY_B deprecation in their latest release (4.0.0+) (#680)

* Change

* Remove

* Polyfill based on docs recommendation

* Update comment

* Update pkg/codec/svtav1/bridge.h comment to actual repo

Co-authored-by: Atsushi Watanabe <atsushi.w@ieee.org>

---------

Co-authored-by: Atsushi Watanabe <atsushi.w@ieee.org>
This commit is contained in:
sean yu
2026-02-03 14:03:16 -05:00
committed by GitHub
parent 347f2ddb0e
commit 0bee5c1f8f
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -4,6 +4,13 @@
#include <EbSvtAv1Enc.h>
#include <stdbool.h>
// For SVT-AV1 v4.0.0+ support
// See below for documentation of low delay value:
// https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/Parameters.md#gop-size-and-type-options
#ifndef SVT_AV1_PRED_LOW_DELAY
#define SVT_AV1_PRED_LOW_DELAY 1
#endif
#define ERR_INIT_ENC_HANDLER 1
#define ERR_SET_ENC_PARAM 2
#define ERR_ENC_INIT 3
+1 -1
View File
@@ -40,7 +40,7 @@ func newEncoder(r video.Reader, p prop.Media, params Params) (codec.ReadCloser,
enc.param.profile = C.MAIN_PROFILE
enc.param.enc_mode = C.int8_t(params.Preset)
enc.param.rate_control_mode = C.SVT_AV1_RC_MODE_CBR
enc.param.pred_structure = C.SVT_AV1_PRED_LOW_DELAY_B
enc.param.pred_structure = C.SVT_AV1_PRED_LOW_DELAY
enc.param.target_bit_rate = C.uint32_t(params.BitRate)
enc.param.frame_rate_numerator = C.uint32_t(p.FrameRate * 1000)
enc.param.frame_rate_denominator = 1000