[x264-devel] [PATCH] fix mb_type statistic bug in X264

Lingjiang Fang vacingfang at foxmail.com
Sun Feb 7 01:35:26 UTC 2021


On Thu,  4 Feb 2021 12:26:17 +0800
zhengzhi Duan <royzzduan at foxmail.com> wrote:

> From: royduan <royduan at tencent.com>
> 
> ---
>  encoder/ratecontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/encoder/ratecontrol.c b/encoder/ratecontrol.c
> index e52270ba..e667a24e 100644
> --- a/encoder/ratecontrol.c
> +++ b/encoder/ratecontrol.c
> @@ -1831,7 +1831,7 @@ int x264_ratecontrol_end( x264_t *h, int bits,
> int *filler ) h->stat.frame.i_mb_count_skip = mbs[P_SKIP] +
> mbs[B_SKIP]; h->stat.frame.i_mb_count_i = mbs[I_16x16] + mbs[I_8x8] +
> mbs[I_4x4]; h->stat.frame.i_mb_count_p = mbs[P_L0] + mbs[P_8x8];
> -    for( int i = B_DIRECT; i < B_8x8; i++ )
> +    for( int i = B_DIRECT; i <= B_8x8; i++ )

I helped him to send this patch for review, sorry if there is something
wrong.
Hope someone can give us a response :)

>          h->stat.frame.i_mb_count_p += mbs[i];
>  
>      h->fdec->f_qp_avg_rc = rc->qpa_rc /= h->mb.i_mb_count;



Regards,
Lingjiang Fang


More information about the x264-devel mailing list