Useful to judge the resulting quality of a frame when VBV is enabled.
uint8_t i_bframes; /* number of bframes following this nonb in coded order */
float f_qp_avg_rc; /* QPs as decided by ratecontrol */
float f_qp_avg_aq; /* QPs as decided by AQ in addition to ratecontrol */
+ float f_crf_avg; /* Average effective CRF for this frame */
int i_poc_l0ref0; /* poc of first refframe in L0, used to check if direct temporal is possible */
/* YUV buffer */
return -1;
pic_out->hrd_timing = h->fenc->hrd_timing;
+ pic_out->prop.f_crf_avg = h->fdec->f_crf_avg;
while( filler > 0 )
{
h->fdec->f_qp_avg_rc = rc->qpa_rc /= h->mb.i_mb_count;
h->fdec->f_qp_avg_aq = (float)rc->qpa_aq / h->mb.i_mb_count;
+ h->fdec->f_crf_avg = h->param.rc.f_rf_constant + h->fdec->f_qp_avg_rc - rc->qp_novbv;
if( h->param.rc.b_stat_write )
{
double w = x264_clip3f( cur_time*100, 0.0, 1.0 );
q *= pow( (double)total_bits / rcc->expected_bits_sum, w );
}
+ rcc->qp_novbv = qscale2qp( q );
if( rcc->b_vbv )
{
/* Do not overflow vbv */
#include "x264_config.h"
-#define X264_BUILD 125
+#define X264_BUILD 126
/* Application developers planning to link against a shared library version of
* libx264 from a Microsoft Visual Studio or similar development environment
double f_psnr_avg;
/* Out: PSNR of Y, U, and V (if x264_param_t.b_psnr is set) */
double f_psnr[3];
+
+ /* Out: Average effective CRF of the encoded frame */
+ double f_crf_avg;
} x264_image_properties_t;
typedef struct