Revision 5cf08f23 libavcodec/dsputil.c

View differences:

libavcodec/dsputil.c
2643 2643
    }
2644 2644
}
2645 2645

  
2646
static inline void h264_loop_filter_luma_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta, int *tc0)
2646
static inline void h264_loop_filter_luma_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta, int8_t *tc0)
2647 2647
{
2648 2648
    int i, d;
2649 2649
    for( i = 0; i < 4; i++ ) {
......
2683 2683
        }
2684 2684
    }
2685 2685
}
2686
static void h264_v_loop_filter_luma_c(uint8_t *pix, int stride, int alpha, int beta, int *tc0)
2686
static void h264_v_loop_filter_luma_c(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0)
2687 2687
{
2688 2688
    h264_loop_filter_luma_c(pix, stride, 1, alpha, beta, tc0);
2689 2689
}
2690
static void h264_h_loop_filter_luma_c(uint8_t *pix, int stride, int alpha, int beta, int *tc0)
2690
static void h264_h_loop_filter_luma_c(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0)
2691 2691
{
2692 2692
    h264_loop_filter_luma_c(pix, 1, stride, alpha, beta, tc0);
2693 2693
}
2694 2694

  
2695
static inline void h264_loop_filter_chroma_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta, int *tc0)
2695
static inline void h264_loop_filter_chroma_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta, int8_t *tc0)
2696 2696
{
2697 2697
    int i, d;
2698 2698
    for( i = 0; i < 4; i++ ) {
......
2720 2720
        }
2721 2721
    }
2722 2722
}
2723
static void h264_v_loop_filter_chroma_c(uint8_t *pix, int stride, int alpha, int beta, int *tc0)
2723
static void h264_v_loop_filter_chroma_c(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0)
2724 2724
{
2725 2725
    h264_loop_filter_chroma_c(pix, stride, 1, alpha, beta, tc0);
2726 2726
}
2727
static void h264_h_loop_filter_chroma_c(uint8_t *pix, int stride, int alpha, int beta, int *tc0)
2727
static void h264_h_loop_filter_chroma_c(uint8_t *pix, int stride, int alpha, int beta, int8_t *tc0)
2728 2728
{
2729 2729
    h264_loop_filter_chroma_c(pix, 1, stride, alpha, beta, tc0);
2730 2730
}
2731 2731

  
2732
static inline void h264_loop_filter_chroma_intra_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta)
2733
{
2734
    int d;
2735
    for( d = 0; d < 8; d++ ) {
2736
        const int p0 = pix[-1*xstride];
2737
        const int p1 = pix[-2*xstride];
2738
        const int q0 = pix[0];
2739
        const int q1 = pix[1*xstride];
2740

  
2741
        if( ABS( p0 - q0 ) < alpha &&
2742
            ABS( p1 - p0 ) < beta &&
2743
            ABS( q1 - q0 ) < beta ) {
2744

  
2745
            pix[-xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2;   /* p0' */
2746
            pix[0]        = ( 2*q1 + q0 + p1 + 2 ) >> 2;   /* q0' */
2747
        }
2748
        pix += ystride;
2749
    }
2750
}
2751
static void h264_v_loop_filter_chroma_intra_c(uint8_t *pix, int stride, int alpha, int beta)
2752
{
2753
    h264_loop_filter_chroma_intra_c(pix, stride, 1, alpha, beta);
2754
}
2755
static void h264_h_loop_filter_chroma_intra_c(uint8_t *pix, int stride, int alpha, int beta)
2756
{
2757
    h264_loop_filter_chroma_intra_c(pix, 1, stride, alpha, beta);
2758
}
2759

  
2732 2760
static inline int pix_abs16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
2733 2761
{
2734 2762
    int s, i;
......
3834 3862
    c->h264_h_loop_filter_luma= h264_h_loop_filter_luma_c;
3835 3863
    c->h264_v_loop_filter_chroma= h264_v_loop_filter_chroma_c;
3836 3864
    c->h264_h_loop_filter_chroma= h264_h_loop_filter_chroma_c;
3865
    c->h264_v_loop_filter_chroma_intra= h264_v_loop_filter_chroma_intra_c;
3866
    c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_c;
3837 3867
    
3838 3868
    c->h263_h_loop_filter= h263_h_loop_filter_c;
3839 3869
    c->h263_v_loop_filter= h263_v_loop_filter_c;

Also available in: Unified diff