33 for (i=0; i<n/2; i++) {
34 ((uint16_t *)dst)[i] =
AV_RB16(src+2*i);
43 int buf_size = avpkt->
size;
46 int i, j,
n, linesize, h, upgrade = 0, is_mono = 0;
48 int components, sample_len,
ret;
100 n = avctx->
width * 2;
105 n = avctx->
width * 2;
113 n = (avctx->
width + 7) >> 3;
122 if(s->
type < 4 || (is_mono && s->
type==7)){
123 for (i=0; i<avctx->
height; i++) {
126 for(j=0; j<avctx->
width * components; j++){
144 if (sample_len == 16) {
145 ((uint16_t*)ptr)[j] = (((1<<sample_len)-1)*v + (s->
maxval>>1))/s->
maxval;
149 if (sample_len != 16)
154 for (i = 0; i < avctx->
height; i++) {
157 else if (upgrade == 1) {
158 unsigned int j, f = (255 * 128 + s->
maxval / 2) / s->
maxval;
159 for (j = 0; j <
n; j++)
161 }
else if (upgrade == 2) {
162 unsigned int j,
v, f = (65535 * 32768 + s->
maxval / 2) / s->
maxval;
163 for (j = 0; j < n / 2; j++) {
165 ((uint16_t *)ptr)[j] = (v * f + 16384) >> 15;
177 unsigned char *ptr1, *ptr2;
186 for (i = 0; i < avctx->
height; i++) {
195 for (i = 0; i < h; i++) {
207 uint16_t *ptr1, *ptr2;
208 const int f = (65535 * 32768 + s->
maxval / 2) / s->
maxval;
211 n = avctx->
width * 2;
216 for (i = 0; i < avctx->
height; i++) {
217 for (j = 0; j < n / 2; j++) {
219 ((uint16_t *)ptr)[j] = (
v * f + 16384) >> 15;
224 ptr1 = (uint16_t*)p->
data[1];
225 ptr2 = (uint16_t*)p->
data[2];
228 for (i = 0; i < h; i++) {
229 for (j = 0; j < n / 2; j++) {
231 ptr1[j] = (
v * f + 16384) >> 15;
235 for (j = 0; j < n / 2; j++) {
237 ptr2[j] = (
v * f + 16384) >> 15;
253 #if CONFIG_PGM_DECODER
265 #if CONFIG_PGMYUV_DECODER
277 #if CONFIG_PPM_DECODER
289 #if CONFIG_PBM_DECODER
301 #if CONFIG_PAM_DECODER