comparison tscc.c @ 4364:05e932ddaaa9 libavcodec

rename BE/LE_8/16/32 to AV_RL/B_8/16/32
author alex
date Fri, 19 Jan 2007 22:12:59 +0000
parents c8c591fe26f8
children ce643a22f049
comparison
equal deleted inserted replaced
4363:9b7662fa4905 4364:05e932ddaaa9
119 if(c->bpp == 8 && (p2 & 1)) { 119 if(c->bpp == 8 && (p2 & 1)) {
120 src++; 120 src++;
121 } 121 }
122 } else if (c->bpp == 16) { 122 } else if (c->bpp == 16) {
123 for(i = 0; i < p2; i++) { 123 for(i = 0; i < p2; i++) {
124 pix16 = LE_16(src); 124 pix16 = AV_RL16(src);
125 src += 2; 125 src += 2;
126 *(uint16_t*)output = pix16; 126 *(uint16_t*)output = pix16;
127 output += 2; 127 output += 2;
128 } 128 }
129 } else if (c->bpp == 32) { 129 } else if (c->bpp == 32) {
130 for(i = 0; i < p2; i++) { 130 for(i = 0; i < p2; i++) {
131 pix32 = LE_32(src); 131 pix32 = AV_RL32(src);
132 src += 4; 132 src += 4;
133 *(uint32_t*)output = pix32; 133 *(uint32_t*)output = pix32;
134 output += 4; 134 output += 4;
135 } 135 }
136 } 136 }
138 } else { //Run of pixels 138 } else { //Run of pixels
139 int pix[4]; //original pixel 139 int pix[4]; //original pixel
140 switch(c->bpp){ 140 switch(c->bpp){
141 case 8: pix[0] = *src++; 141 case 8: pix[0] = *src++;
142 break; 142 break;
143 case 16: pix16 = LE_16(src); 143 case 16: pix16 = AV_RL16(src);
144 src += 2; 144 src += 2;
145 *(uint16_t*)pix = pix16; 145 *(uint16_t*)pix = pix16;
146 break; 146 break;
147 case 24: pix[0] = *src++; 147 case 24: pix[0] = *src++;
148 pix[1] = *src++; 148 pix[1] = *src++;
149 pix[2] = *src++; 149 pix[2] = *src++;
150 break; 150 break;
151 case 32: pix32 = LE_32(src); 151 case 32: pix32 = AV_RL32(src);
152 src += 4; 152 src += 4;
153 *(uint32_t*)pix = pix32; 153 *(uint32_t*)pix = pix32;
154 break; 154 break;
155 } 155 }
156 if (output + p1 * (c->bpp / 8) > output_end) 156 if (output + p1 * (c->bpp / 8) > output_end)