Revision 2d0cacde libavcodec/libx264.c

View differences:

libavcodec/libx264.c
159 159
    x4->params.rc.i_bitrate         = avctx->bit_rate       / 1000;
160 160
    x4->params.rc.i_vbv_buffer_size = avctx->rc_buffer_size / 1000;
161 161
    x4->params.rc.i_vbv_max_bitrate = avctx->rc_max_rate    / 1000;
162
    x4->params.rc.b_stat_write      = avctx->flags & CODEC_FLAG_PASS1;
162
    x4->params.rc.b_stat_write      = !!(avctx->flags & CODEC_FLAG_PASS1);
163 163
    if (avctx->flags & CODEC_FLAG_PASS2) {
164 164
        x4->params.rc.b_stat_read = 1;
165 165
    } else {
......
190 190

  
191 191
    x4->params.i_scenecut_threshold        = avctx->scenechange_threshold;
192 192

  
193
    x4->params.b_deblocking_filter         = avctx->flags & CODEC_FLAG_LOOP_FILTER;
193
    x4->params.b_deblocking_filter         = !!(avctx->flags & CODEC_FLAG_LOOP_FILTER);
194 194
    x4->params.i_deblocking_filter_alphac0 = avctx->deblockalpha;
195 195
    x4->params.i_deblocking_filter_beta    = avctx->deblockbeta;
196 196

  
......
227 227

  
228 228
    x4->params.analyse.i_direct_mv_pred  = avctx->directpred;
229 229

  
230
    x4->params.analyse.b_weighted_bipred = avctx->flags2 & CODEC_FLAG2_WPRED;
230
    x4->params.analyse.b_weighted_bipred = !!(avctx->flags2 & CODEC_FLAG2_WPRED);
231 231
    x4->params.analyse.i_weighted_pred = avctx->weighted_p_pred;
232 232

  
233 233
    if (avctx->me_method == ME_EPZS)
......
245 245
    x4->params.analyse.i_me_range         = avctx->me_range;
246 246
    x4->params.analyse.i_subpel_refine    = avctx->me_subpel_quality;
247 247

  
248
    x4->params.analyse.b_mixed_references = avctx->flags2 & CODEC_FLAG2_MIXED_REFS;
249
    x4->params.analyse.b_chroma_me        = avctx->me_cmp & FF_CMP_CHROMA;
250
    x4->params.analyse.b_transform_8x8    = avctx->flags2 & CODEC_FLAG2_8X8DCT;
251
    x4->params.analyse.b_fast_pskip       = avctx->flags2 & CODEC_FLAG2_FASTPSKIP;
248
    x4->params.analyse.b_mixed_references = !!(avctx->flags2 & CODEC_FLAG2_MIXED_REFS);
249
    x4->params.analyse.b_chroma_me        = !!(avctx->me_cmp & FF_CMP_CHROMA);
250
    x4->params.analyse.b_transform_8x8    = !!(avctx->flags2 & CODEC_FLAG2_8X8DCT);
251
    x4->params.analyse.b_fast_pskip       = !!(avctx->flags2 & CODEC_FLAG2_FASTPSKIP);
252 252

  
253 253
    x4->params.analyse.i_trellis          = avctx->trellis;
254 254
    x4->params.analyse.i_noise_reduction  = avctx->noise_reduction;
......
271 271
    x4->params.rc.f_pb_factor             = avctx->b_quant_factor;
272 272
    x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
273 273

  
274
    x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR;
274
    x4->params.analyse.b_psnr = !!(avctx->flags & CODEC_FLAG_PSNR);
275 275
    x4->params.i_log_level    = X264_LOG_DEBUG;
276 276

  
277
    x4->params.b_aud          = avctx->flags2 & CODEC_FLAG2_AUD;
277
    x4->params.b_aud          = !!(avctx->flags2 & CODEC_FLAG2_AUD);
278 278

  
279 279
    x4->params.i_threads      = avctx->thread_count;
280 280

  
281
    x4->params.b_interlaced   = avctx->flags & CODEC_FLAG_INTERLACED_DCT;
281
    x4->params.b_interlaced   = !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT);
282 282

  
283 283
    if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER)
284 284
        x4->params.b_repeat_headers = 0;

Also available in: Unified diff