h->mb.i_subpel_refine = h->param.analyse.i_subpel_refine;
h->mb.b_chroma_me = h->param.analyse.b_chroma_me && h->sh.i_type == SLICE_TYPE_P
&& h->mb.i_subpel_refine >= 5;
+ h->mb.b_dct_decimate = h->sh.i_type == SLICE_TYPE_B ||
+ (h->param.analyse.b_dct_decimate && h->sh.i_type != SLICE_TYPE_I);
h->mb.b_transform_8x8 = 0;
h->mb.b_noise_reduction = 0;
ALIGNED_ARRAY_16( int16_t, dct_dc4x4,[16] );
int i, nz;
- int b_decimate = h->sh.i_type == SLICE_TYPE_B || (h->param.analyse.b_dct_decimate && h->sh.i_type == SLICE_TYPE_P);
- int decimate_score = b_decimate ? 0 : 9;
+ int decimate_score = h->mb.b_dct_decimate ? 0 : 9;
if( h->mb.b_lossless )
{
void x264_mb_encode_8x8_chroma( x264_t *h, int b_inter, int i_qp )
{
int i, ch, nz, nz_dc;
- int b_decimate = b_inter && (h->sh.i_type == SLICE_TYPE_B || h->param.analyse.b_dct_decimate);
+ int b_decimate = b_inter && h->mb.b_dct_decimate;
ALIGNED_ARRAY_16( int16_t, dct2x2,[4] );
h->mb.i_cbp_chroma = 0;
{
int i_cbp_dc = 0;
int i_qp = h->mb.i_qp;
- int b_decimate = h->sh.i_type == SLICE_TYPE_B || h->param.analyse.b_dct_decimate;
+ int b_decimate = h->mb.b_dct_decimate;
int b_force_no_skip = 0;
int i,idx,nz;
h->mb.i_cbp_luma = 0;
/*****************************************************************************
* x264_macroblock_probe_skip:
- * Check if the current MB could be encoded as a [PB]_SKIP (it supposes you use
- * the previous QP
+ * Check if the current MB could be encoded as a [PB]_SKIP
*****************************************************************************/
int x264_macroblock_probe_skip( x264_t *h, int b_bidir )
{
int i_qp = h->mb.i_qp;
uint8_t *p_fenc = h->mb.pic.p_fenc[0] + (i8&1)*8 + (i8>>1)*8*FENC_STRIDE;
uint8_t *p_fdec = h->mb.pic.p_fdec[0] + (i8&1)*8 + (i8>>1)*8*FDEC_STRIDE;
- int b_decimate = h->sh.i_type == SLICE_TYPE_B || h->param.analyse.b_dct_decimate;
+ int b_decimate = h->mb.b_dct_decimate;
int nnz8x8 = 0;
int ch, nz;