break; default: av_log(s->avctx, AV_LOG_ERROR,"internal error in cmp function selection\n");
static void set_cmp(MpegEncContext *s, me_cmp_func *cmp, int type){    DSPContext* c= &s->dsp;    int i;        memset(cmp, 0, sizeof(void*)*11);    switch(type&0xFF){    case FF_CMP_SAD:        cmp[0]= c->sad[0];        cmp[1]= c->sad[1];        break;    case FF_CMP_SATD:        cmp[0]= c->hadamard8_diff[0];        cmp[1]= c->hadamard8_diff[1];        break;    case FF_CMP_SSE:        cmp[0]= c->sse[0];        cmp[1]= c->sse[1];        break;    case FF_CMP_DCT:        cmp[0]= c->dct_sad[0];        cmp[1]= c->dct_sad[1];        break;    case FF_CMP_PSNR:        cmp[0]= c->quant_psnr[0];        cmp[1]= c->quant_psnr[1];        break;    case FF_CMP_BIT:        cmp[0]= c->bit[0];        cmp[1]= c->bit[1];        break;    case FF_CMP_RD:        cmp[0]= c->rd[0];        cmp[1]= c->rd[1];        break;    case FF_CMP_ZERO:        for(i=0; i<7; i++){            cmp[i]= zero_cmp;        }        break;    default:        av_log(s->avctx, AV_LOG_ERROR,"internal error in cmp function selection\n");    }}