Revision 6d4c49a2 libavcodec/dsputil.c

View differences:

libavcodec/dsputil.c
38 38
#include "config.h"
39 39
#include "ac3dec.h"
40 40
#include "vorbis.h"
41
#include "png.h"
42 41

  
43 42
uint8_t ff_cropTbl[256 + 2 * MAX_NEG_CROP] = {0, };
44 43
uint32_t ff_squareTbl[512] = {0, };
......
1924 1923
        dst[i+0] += src[i+0];
1925 1924
}
1926 1925

  
1927
static void add_bytes_l2_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
1928
    long i;
1929
    for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
1930
        long a = *(long*)(src1+i);
1931
        long b = *(long*)(src2+i);
1932
        *(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
1933
    }
1934
    for(; i<w; i++)
1935
        dst[i] = src1[i]+src2[i];
1936
}
1937

  
1938 1926
static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
1939 1927
    long i;
1940 1928
#if !HAVE_FAST_UNALIGNED
......
3087 3075
    c->ssd_int8_vs_int16 = ssd_int8_vs_int16_c;
3088 3076

  
3089 3077
    c->add_bytes= add_bytes_c;
3090
    c->add_bytes_l2= add_bytes_l2_c;
3091 3078
    c->diff_bytes= diff_bytes_c;
3092 3079
    c->add_hfyu_median_prediction= add_hfyu_median_prediction_c;
3093 3080
    c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_c;
......
3095 3082
    c->add_hfyu_left_prediction_bgr32 = add_hfyu_left_prediction_bgr32_c;
3096 3083
    c->bswap_buf= bswap_buf;
3097 3084
    c->bswap16_buf = bswap16_buf;
3098
#if CONFIG_PNG_DECODER
3099
    c->add_png_paeth_prediction= ff_add_png_paeth_prediction;
3100
#endif
3101 3085

  
3102 3086
    if (CONFIG_H263_DECODER || CONFIG_H263_ENCODER) {
3103 3087
        c->h263_h_loop_filter= h263_h_loop_filter_c;

Also available in: Unified diff