Mercurial > libavcodec.hg
comparison cscd.c @ 6312:5f4bdfd1aa0e libavcodec
Some consts for cscd decoder helper functions
author | reimar |
---|---|
date | Sat, 02 Feb 2008 14:34:43 +0000 |
parents | 8d57e5a33dbd |
children | 48759bfbd073 |
comparison
equal
deleted
inserted
replaced
6311:985f4195bb69 | 6312:5f4bdfd1aa0e |
---|---|
33 int linelen, height, bpp; | 33 int linelen, height, bpp; |
34 unsigned int decomp_size; | 34 unsigned int decomp_size; |
35 unsigned char* decomp_buf; | 35 unsigned char* decomp_buf; |
36 } CamStudioContext; | 36 } CamStudioContext; |
37 | 37 |
38 static void copy_frame_default(AVFrame *f, uint8_t *src, | 38 static void copy_frame_default(AVFrame *f, const uint8_t *src, |
39 int linelen, int height) { | 39 int linelen, int height) { |
40 int i; | 40 int i; |
41 uint8_t *dst = f->data[0]; | 41 uint8_t *dst = f->data[0]; |
42 dst += (height - 1) * f->linesize[0]; | 42 dst += (height - 1) * f->linesize[0]; |
43 for (i = height; i; i--) { | 43 for (i = height; i; i--) { |
45 src += linelen; | 45 src += linelen; |
46 dst -= f->linesize[0]; | 46 dst -= f->linesize[0]; |
47 } | 47 } |
48 } | 48 } |
49 | 49 |
50 static void add_frame_default(AVFrame *f, uint8_t *src, | 50 static void add_frame_default(AVFrame *f, const uint8_t *src, |
51 int linelen, int height) { | 51 int linelen, int height) { |
52 int i, j; | 52 int i, j; |
53 uint8_t *dst = f->data[0]; | 53 uint8_t *dst = f->data[0]; |
54 dst += (height - 1) * f->linesize[0]; | 54 dst += (height - 1) * f->linesize[0]; |
55 for (i = height; i; i--) { | 55 for (i = height; i; i--) { |
63 #define copy_frame_16 copy_frame_default | 63 #define copy_frame_16 copy_frame_default |
64 #define copy_frame_32 copy_frame_default | 64 #define copy_frame_32 copy_frame_default |
65 #define add_frame_16 add_frame_default | 65 #define add_frame_16 add_frame_default |
66 #define add_frame_32 add_frame_default | 66 #define add_frame_32 add_frame_default |
67 #else | 67 #else |
68 static void copy_frame_16(AVFrame *f, uint8_t *src, | 68 static void copy_frame_16(AVFrame *f, const uint8_t *src, |
69 int linelen, int height) { | 69 int linelen, int height) { |
70 int i, j; | 70 int i, j; |
71 uint8_t *dst = f->data[0]; | 71 uint8_t *dst = f->data[0]; |
72 dst += (height - 1) * f->linesize[0]; | 72 dst += (height - 1) * f->linesize[0]; |
73 for (i = height; i; i--) { | 73 for (i = height; i; i--) { |
79 } | 79 } |
80 dst -= f->linesize[0] + linelen; | 80 dst -= f->linesize[0] + linelen; |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 static void copy_frame_32(AVFrame *f, uint8_t *src, | 84 static void copy_frame_32(AVFrame *f, const uint8_t *src, |
85 int linelen, int height) { | 85 int linelen, int height) { |
86 int i, j; | 86 int i, j; |
87 uint8_t *dst = f->data[0]; | 87 uint8_t *dst = f->data[0]; |
88 dst += (height - 1) * f->linesize[0]; | 88 dst += (height - 1) * f->linesize[0]; |
89 for (i = height; i; i--) { | 89 for (i = height; i; i--) { |
97 } | 97 } |
98 dst -= f->linesize[0] + linelen; | 98 dst -= f->linesize[0] + linelen; |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 static void add_frame_16(AVFrame *f, uint8_t *src, | 102 static void add_frame_16(AVFrame *f, const uint8_t *src, |
103 int linelen, int height) { | 103 int linelen, int height) { |
104 int i, j; | 104 int i, j; |
105 uint8_t *dst = f->data[0]; | 105 uint8_t *dst = f->data[0]; |
106 dst += (height - 1) * f->linesize[0]; | 106 dst += (height - 1) * f->linesize[0]; |
107 for (i = height; i; i--) { | 107 for (i = height; i; i--) { |
113 } | 113 } |
114 dst -= f->linesize[0] + linelen; | 114 dst -= f->linesize[0] + linelen; |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
118 static void add_frame_32(AVFrame *f, uint8_t *src, | 118 static void add_frame_32(AVFrame *f, const uint8_t *src, |
119 int linelen, int height) { | 119 int linelen, int height) { |
120 int i, j; | 120 int i, j; |
121 uint8_t *dst = f->data[0]; | 121 uint8_t *dst = f->data[0]; |
122 dst += (height - 1) * f->linesize[0]; | 122 dst += (height - 1) * f->linesize[0]; |
123 for (i = height; i; i--) { | 123 for (i = height; i; i--) { |