[FFmpeg-devel] [PATCH v3 4/5] avcodec/cavsdec, h264*, hevc_parser: Use get_ue_golomb_31 where possible
Michael Niedermayer
michael at niedermayer.cc
Tue Jul 28 22:39:53 EEST 2020
On Mon, Jul 27, 2020 at 11:08:09AM +0200, Andreas Rheinhardt wrote:
> instead of get_ue_golomb(). The difference between the two is that the
> latter also has to take into account the case in which the read code is
> more than 9 bits (four preceding zeroes + at most five value bits) long,
> leading to more code.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
> libavcodec/cavsdec.c | 2 +-
> libavcodec/h264_parse.c | 4 ++--
> libavcodec/h264_ps.c | 24 ++++++++++++------------
> libavcodec/hevc_parser.c | 2 +-
> 4 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
> index aaed807196..9c3825df38 100644
> --- a/libavcodec/cavsdec.c
> +++ b/libavcodec/cavsdec.c
> @@ -676,7 +676,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code)
> }
> h->pred_mode_Y[pos] = predpred;
> }
> - pred_mode_uv = get_ue_golomb(gb);
> + pred_mode_uv = get_ue_golomb_31(gb);
> if (pred_mode_uv > 6) {
> av_log(h->avctx, AV_LOG_ERROR, "illegal intra chroma pred mode\n");
> return AVERROR_INVALIDDATA;
LGTM
i dont think the others are speed relevant so they could be changed or left
as they are
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20200728/4227038e/attachment.sig>
More information about the ffmpeg-devel
mailing list