Revision d4c5d2ad libavcodec/dsputil.c

View differences:

libavcodec/dsputil.c
2587 2587
    return s;
2588 2588
}
2589 2589

  
2590
static int nsse16_c(/*MpegEncContext*/ void *c, uint8_t *s1, uint8_t *s2, int stride, int h){
2590
static int nsse16_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int h){
2591 2591
    int score1=0;
2592 2592
    int score2=0;
2593 2593
    int x,y;
2594
    
2594

  
2595 2595
    for(y=0; y<h; y++){
2596 2596
        for(x=0; x<16; x++){
2597 2597
            score1+= (s1[x  ] - s2[x ])*(s1[x  ] - s2[x ]);
......
2607 2607
        s1+= stride;
2608 2608
        s2+= stride;
2609 2609
    }
2610
    
2611
    return score1 + ABS(score2)*8;
2610

  
2611
    if(c) return score1 + ABS(score2)*c->avctx->nsse_weight;
2612
    else  return score1 + ABS(score2)*8;
2612 2613
}
2613 2614

  
2614
static int nsse8_c(/*MpegEncContext*/ void *c, uint8_t *s1, uint8_t *s2, int stride, int h){
2615
static int nsse8_c(MpegEncContext *c, uint8_t *s1, uint8_t *s2, int stride, int h){
2615 2616
    int score1=0;
2616 2617
    int score2=0;
2617 2618
    int x,y;
......
2632 2633
        s2+= stride;
2633 2634
    }
2634 2635
    
2635
    return score1 + ABS(score2)*8;
2636
    if(c) return score1 + ABS(score2)*c->avctx->nsse_weight;
2637
    else  return score1 + ABS(score2)*8;
2636 2638
}
2637 2639

  
2638 2640
static int try_8x8basis_c(int16_t rem[64], int16_t weight[64], int16_t basis[64], int scale){

Also available in: Unified diff