From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH v2 2/3] avcodec/vvc/cabac: remove vvc_refill2 Date: Thu, 8 Aug 2024 22:19:05 +0200 Message-ID: <AS8P250MB07448C86ED96C99951F679E78FB92@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <OS3PR01MB99447B96CD3A32B4D5149471CAB92@OS3PR01MB9944.jpnprd01.prod.outlook.com> toqsxw@outlook.com: > From: Wu Jianhua <toqsxw@outlook.com> > > See https://github.com/ffvvc/FFmpeg/issues/178 This link only sends one to a patchwork thread to read. The commit message should instead explain why this is done on its own (and may refer to the mailing list thread for a more detailed explanation). Same for the next patch. > > Signed-off-by: Wu Jianhua <toqsxw@outlook.com> > --- > libavcodec/cabac_functions.h | 2 +- > libavcodec/vvc/cabac.c | 28 +--------------------------- > 2 files changed, 2 insertions(+), 28 deletions(-) > > diff --git a/libavcodec/cabac_functions.h b/libavcodec/cabac_functions.h > index c3f08d3410..9bee401f2c 100644 > --- a/libavcodec/cabac_functions.h > +++ b/libavcodec/cabac_functions.h > @@ -85,7 +85,7 @@ static inline void renorm_cabac_decoder_once(CABACContext *c){ > } > #endif > > -#ifndef get_cabac_inline > +#if !defined(get_cabac_inline) || !defined(refill2) > static void refill2(CABACContext *c){ > int i; > unsigned x; > diff --git a/libavcodec/vvc/cabac.c b/libavcodec/vvc/cabac.c > index 0d45eec751..c9b6f9bf3e 100644 > --- a/libavcodec/vvc/cabac.c > +++ b/libavcodec/vvc/cabac.c > @@ -856,32 +856,6 @@ int ff_vvc_cabac_init(VVCLocalContext *lc, > return ret; > } > > -//fixme > -static void vvc_refill2(CABACContext* c) { > - int i; > - unsigned x; > -#if !HAVE_FAST_CLZ > - x = c->low ^ (c->low - 1); > - i = 7 - ff_h264_norm_shift[x >> (CABAC_BITS - 1)]; > -#else > - i = ff_ctz(c->low) - CABAC_BITS; > -#endif > - > - x = -CABAC_MASK; > - > -#if CABAC_BITS == 16 > - x += (c->bytestream[0] << 9) + (c->bytestream[1] << 1); > -#else > - x += c->bytestream[0] << 1; > -#endif > - > - c->low += x << i; > -#if !UNCHECKED_BITSTREAM_READER > - if (c->bytestream < c->bytestream_end) > -#endif > - c->bytestream += CABAC_BITS / 8; > -} > - > static int inline vvc_get_cabac(CABACContext *c, VVCCabacState* base, const int ctx) > { > VVCCabacState *s = base + ctx; > @@ -904,7 +878,7 @@ static int inline vvc_get_cabac(CABACContext *c, VVCCabacState* base, const int > c->low <<= lps_mask; > > if (!(c->low & CABAC_MASK)) > - vvc_refill2(c); > + refill2(c); > s->state[0] = s->state[0] - (s->state[0] >> s->shift[0]) + (1023 * bit >> s->shift[0]); > s->state[1] = s->state[1] - (s->state[1] >> s->shift[1]) + (16383 * bit >> s->shift[1]); > return bit; _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-08-08 20:19 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20240808191344.1017-1-toqsxw@outlook.com> 2024-08-08 19:13 ` toqsxw 2024-08-08 20:19 ` Andreas Rheinhardt [this message] 2024-08-10 20:20 ` [FFmpeg-devel] 回复: " Wu Jianhua 2024-08-08 19:13 ` [FFmpeg-devel] [PATCH v2 3/3] avcodec/vvc/dsp: prefix TxType and TxSize with VVC toqsxw
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=AS8P250MB07448C86ED96C99951F679E78FB92@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git