comparison dwt.c @ 11486:1bf7af4db35a libavcodec

Add ff_ prefix to dwt functions
author mru
date Sun, 14 Mar 2010 17:50:16 +0000
parents 0f0cd6b5791f
children c71384779e14
comparison
equal deleted inserted replaced
11485:0f0cd6b5791f 11486:1bf7af4db35a
20 20
21 #include "libavutil/attributes.h" 21 #include "libavutil/attributes.h"
22 #include "dsputil.h" 22 #include "dsputil.h"
23 #include "dwt.h" 23 #include "dwt.h"
24 24
25 void slice_buffer_init(slice_buffer * buf, int line_count, int max_allocated_lines, int line_width, IDWTELEM * base_buffer) 25 void ff_slice_buffer_init(slice_buffer * buf, int line_count, int max_allocated_lines, int line_width, IDWTELEM * base_buffer)
26 { 26 {
27 int i; 27 int i;
28 28
29 buf->base_buffer = base_buffer; 29 buf->base_buffer = base_buffer;
30 buf->line_count = line_count; 30 buf->line_count = line_count;
38 } 38 }
39 39
40 buf->data_stack_top = max_allocated_lines - 1; 40 buf->data_stack_top = max_allocated_lines - 1;
41 } 41 }
42 42
43 IDWTELEM * slice_buffer_load_line(slice_buffer * buf, int line) 43 IDWTELEM * ff_slice_buffer_load_line(slice_buffer * buf, int line)
44 { 44 {
45 IDWTELEM * buffer; 45 IDWTELEM * buffer;
46 46
47 assert(buf->data_stack_top >= 0); 47 assert(buf->data_stack_top >= 0);
48 // assert(!buf->line[line]); 48 // assert(!buf->line[line]);
54 buf->line[line] = buffer; 54 buf->line[line] = buffer;
55 55
56 return buffer; 56 return buffer;
57 } 57 }
58 58
59 void slice_buffer_release(slice_buffer * buf, int line) 59 void ff_slice_buffer_release(slice_buffer * buf, int line)
60 { 60 {
61 IDWTELEM * buffer; 61 IDWTELEM * buffer;
62 62
63 assert(line >= 0 && line < buf->line_count); 63 assert(line >= 0 && line < buf->line_count);
64 assert(buf->line[line]); 64 assert(buf->line[line]);
67 buf->data_stack_top++; 67 buf->data_stack_top++;
68 buf->data_stack[buf->data_stack_top] = buffer; 68 buf->data_stack[buf->data_stack_top] = buffer;
69 buf->line[line] = NULL; 69 buf->line[line] = NULL;
70 } 70 }
71 71
72 void slice_buffer_flush(slice_buffer * buf) 72 void ff_slice_buffer_flush(slice_buffer * buf)
73 { 73 {
74 int i; 74 int i;
75 for(i = 0; i < buf->line_count; i++){ 75 for(i = 0; i < buf->line_count; i++){
76 if (buf->line[i]) 76 if (buf->line[i])
77 slice_buffer_release(buf, i); 77 ff_slice_buffer_release(buf, i);
78 } 78 }
79 } 79 }
80 80
81 void slice_buffer_destroy(slice_buffer * buf) 81 void ff_slice_buffer_destroy(slice_buffer * buf)
82 { 82 {
83 int i; 83 int i;
84 slice_buffer_flush(buf); 84 ff_slice_buffer_flush(buf);
85 85
86 for(i = buf->data_count - 1; i >= 0; i--){ 86 for(i = buf->data_count - 1; i >= 0; i--){
87 av_freep(&buf->data_stack[i]); 87 av_freep(&buf->data_stack[i]);
88 } 88 }
89 av_freep(&buf->data_stack); 89 av_freep(&buf->data_stack);
815 815
816 static int w97_16_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h){ 816 static int w97_16_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h){
817 return w_c(v, pix1, pix2, line_size, 16, h, 0); 817 return w_c(v, pix1, pix2, line_size, 16, h, 0);
818 } 818 }
819 819
820 int w53_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h){ 820 int ff_w53_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h){
821 return w_c(v, pix1, pix2, line_size, 32, h, 1); 821 return w_c(v, pix1, pix2, line_size, 32, h, 1);
822 } 822 }
823 823
824 int w97_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h){ 824 int ff_w97_32_c(void *v, uint8_t * pix1, uint8_t * pix2, int line_size, int h){
825 return w_c(v, pix1, pix2, line_size, 32, h, 0); 825 return w_c(v, pix1, pix2, line_size, 32, h, 0);
826 } 826 }
827 827
828 void ff_dsputil_init_dwt(DSPContext *c) 828 void ff_dsputil_init_dwt(DSPContext *c)
829 { 829 {