Revision 05aec7bb libavcodec/x86/snowdsp_mmx.c

View differences:

libavcodec/x86/snowdsp_mmx.c
22 22
#include "libavutil/x86_cpu.h"
23 23
#include "libavcodec/avcodec.h"
24 24
#include "libavcodec/snow.h"
25
#include "libavcodec/dwt.h"
25 26
#include "dsputil_mmx.h"
26 27

  
27
void ff_snow_horizontal_compose97i_sse2(IDWTELEM *b, int width){
28
static void ff_snow_horizontal_compose97i_sse2(IDWTELEM *b, int width){
28 29
    const int w2= (width+1)>>1;
29 30
    DECLARE_ALIGNED(16, IDWTELEM, temp)[width>>1];
30 31
    const int w_l= (width>>1);
......
213 214
    }
214 215
}
215 216

  
216
void ff_snow_horizontal_compose97i_mmx(IDWTELEM *b, int width){
217
static void ff_snow_horizontal_compose97i_mmx(IDWTELEM *b, int width){
217 218
    const int w2= (width+1)>>1;
218 219
    IDWTELEM temp[width >> 1];
219 220
    const int w_l= (width>>1);
......
436 437
        "movdqa %%"s2", %%"t2" \n\t"\
437 438
        "movdqa %%"s3", %%"t3" \n\t"
438 439

  
439
void ff_snow_vertical_compose97i_sse2(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width){
440
static void ff_snow_vertical_compose97i_sse2(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width){
440 441
    x86_reg i = width;
441 442

  
442 443
    while(i & 0x1F)
......
534 535
        "movq %%"s3", %%"t3" \n\t"
535 536

  
536 537

  
537
void ff_snow_vertical_compose97i_mmx(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width){
538
static void ff_snow_vertical_compose97i_mmx(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width){
538 539
    x86_reg i = width;
539 540
    while(i & 15)
540 541
    {
......
847 848
snow_inner_add_yblock_mmx_end("32")
848 849
}
849 850

  
850
void ff_snow_inner_add_yblock_sse2(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h,
851
static void ff_snow_inner_add_yblock_sse2(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h,
851 852
                           int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8){
852 853

  
853 854
    if (b_w == 16)
......
861 862
         ff_snow_inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y, src_stride, sb, add, dst8);
862 863
}
863 864

  
864
void ff_snow_inner_add_yblock_mmx(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h,
865
static void ff_snow_inner_add_yblock_mmx(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h,
865 866
                          int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8){
866 867
    if (b_w == 16)
867 868
        inner_add_yblock_bw_16_obmc_32_mmx(obmc, obmc_stride, block, b_w, b_h, src_x,src_y, src_stride, sb, add, dst8);
......
870 871
    else
871 872
        ff_snow_inner_add_yblock(obmc, obmc_stride, block, b_w, b_h, src_x,src_y, src_stride, sb, add, dst8);
872 873
}
874

  
875
void ff_dwt_init_x86(DWTContext *c)
876
{
877
    mm_flags = mm_support();
878

  
879
    if (mm_flags & FF_MM_MMX) {
880
        if(mm_flags & FF_MM_SSE2 & 0){
881
            c->horizontal_compose97i = ff_snow_horizontal_compose97i_sse2;
882
#if HAVE_7REGS
883
            c->vertical_compose97i = ff_snow_vertical_compose97i_sse2;
884
#endif
885
            c->inner_add_yblock = ff_snow_inner_add_yblock_sse2;
886
        }
887
        else{
888
            if(mm_flags & FF_MM_MMX2){
889
            c->horizontal_compose97i = ff_snow_horizontal_compose97i_mmx;
890
#if HAVE_7REGS
891
            c->vertical_compose97i = ff_snow_vertical_compose97i_mmx;
892
#endif
893
            }
894
            c->inner_add_yblock = ff_snow_inner_add_yblock_mmx;
895
        }
896
    }
897
}

Also available in: Unified diff