if(s->flags&CODEC_FLAG_QPEL){ if(s->avctx->mb_cmp&FF_CMP_CHROMA) s->me.get_mb_score= simple_chroma_qpel_get_mb_score; else s->me.get_mb_score= simple_qpel_get_mb_score; }else{ if(s->avctx->mb_cmp&FF_CMP_CHROMA) s->me.get_mb_score= simple_chroma_hpel_get_mb_score; else s->me.get_mb_score= simple_hpel_get_mb_score; }
void ff_init_me(MpegEncContext *s){    set_cmp(s, s->dsp.me_pre_cmp, s->avctx->me_pre_cmp);    set_cmp(s, s->dsp.me_cmp, s->avctx->me_cmp);    set_cmp(s, s->dsp.me_sub_cmp, s->avctx->me_sub_cmp);    set_cmp(s, s->dsp.mb_cmp, s->avctx->mb_cmp);    if(s->flags&CODEC_FLAG_QPEL){        if(s->avctx->me_sub_cmp&FF_CMP_CHROMA)            s->me.sub_motion_search= simple_chroma_qpel_motion_search;        else            s->me.sub_motion_search= simple_qpel_motion_search;    }else{        if(s->avctx->me_sub_cmp&FF_CMP_CHROMA)            s->me.sub_motion_search= simple_chroma_hpel_motion_search;        else if(s->avctx->me_sub_cmp == FF_CMP_SAD && s->avctx->me_cmp == FF_CMP_SAD)            s->me.sub_motion_search= sad_hpel_motion_search;        else            s->me.sub_motion_search= simple_hpel_motion_search;    }    if(s->avctx->me_cmp&FF_CMP_CHROMA){        s->me.motion_search[0]= simple_chroma_epzs_motion_search;        s->me.motion_search[1]= simple_chroma_epzs_motion_search4;    }else{        s->me.motion_search[0]= simple_epzs_motion_search;        s->me.motion_search[1]= simple_epzs_motion_search4;    }        if(s->avctx->me_pre_cmp&FF_CMP_CHROMA){        s->me.pre_motion_search= simple_chroma_epzs_motion_search;    }else{        s->me.pre_motion_search= simple_epzs_motion_search;    }}