ffmpeg | branch: master | Andreas Rheinhardt <[email protected]> | Tue Nov 30 19:19:06 2021 +0100| [b574fb472ed168f5a75cd981c98dd34cfe57ff3a] | committer: Andreas Rheinhardt
avcodec/h264_redundant_pps_bsf: Inline constant Signed-off-by: Andreas Rheinhardt <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b574fb472ed168f5a75cd981c98dd34cfe57ff3a --- libavcodec/h264_redundant_pps_bsf.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libavcodec/h264_redundant_pps_bsf.c b/libavcodec/h264_redundant_pps_bsf.c index 5efcf5ea5d..769946abfd 100644 --- a/libavcodec/h264_redundant_pps_bsf.c +++ b/libavcodec/h264_redundant_pps_bsf.c @@ -27,11 +27,10 @@ #include "cbs_h264.h" #include "h264.h" +#define NEW_GLOBAL_PIC_INIT_QP 26 typedef struct H264RedundantPPSContext { CBSBSFContext common; - - int global_pic_init_qp; } H264RedundantPPSContext; @@ -50,7 +49,7 @@ static int h264_redundant_pps_fixup_pps(H264RedundantPPSContext *ctx, pps = unit->content; // Overwrite pic_init_qp with the global value. - pps->pic_init_qp_minus26 = ctx->global_pic_init_qp - 26; + pps->pic_init_qp_minus26 = NEW_GLOBAL_PIC_INIT_QP - 26; // Some PPSs have this set, so it must be set in all of them. // (Slices which do not use such a PPS on input will still have @@ -69,7 +68,7 @@ static int h264_redundant_pps_fixup_slice(H264RedundantPPSContext *ctx, // We modified the PPS's qp value, now offset this by applying // the negative offset to the slices. slice->slice_qp_delta += pps->pic_init_qp_minus26 - - (ctx->global_pic_init_qp - 26); + - (NEW_GLOBAL_PIC_INIT_QP - 26); return 0; } @@ -119,10 +118,6 @@ static const CBSBSFType h264_redundant_pps_type = { static int h264_redundant_pps_init(AVBSFContext *bsf) { - H264RedundantPPSContext *ctx = bsf->priv_data; - - ctx->global_pic_init_qp = 26; - return ff_cbs_bsf_generic_init(bsf, &h264_redundant_pps_type); } _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
