32 int buf_size = avpkt->
size;
36 int i, j, n, linesize, h, upgrade = 0, is_mono = 0;
38 int components, sample_len, ret;
103 n = (avctx->
width + 7) >> 3;
112 if(s->
type < 4 || (is_mono && s->
type==7)){
113 for (i=0; i<avctx->
height; i++) {
116 for(j=0; j<avctx->
width * components; j++){
140 for (i = 0; i < avctx->
height; i++) {
143 else if (upgrade == 1) {
144 unsigned int j, f = (255 * 128 + s->
maxval / 2) / s->
maxval;
145 for (j = 0; j < n; j++)
147 }
else if (upgrade == 2) {
148 unsigned int j,
v, f = (65535 * 32768 + s->
maxval / 2) / s->
maxval;
149 for (j = 0; j < n / 2; j++) {
151 ((uint16_t *)ptr)[j] = (v * f + 16384) >> 15;
163 unsigned char *ptr1, *ptr2;
172 for (i = 0; i < avctx->
height; i++) {
181 for (i = 0; i < h; i++) {
193 uint16_t *ptr1, *ptr2;
194 const int f = (65535 * 32768 + s->
maxval / 2) / s->
maxval;
197 n = avctx->
width * 2;
202 for (i = 0; i < avctx->
height; i++) {
203 for (j = 0; j < n / 2; j++) {
205 ((uint16_t *)ptr)[j] = (
v * f + 16384) >> 15;
210 ptr1 = (uint16_t*)p->
data[1];
211 ptr2 = (uint16_t*)p->
data[2];
214 for (i = 0; i < h; i++) {
215 for (j = 0; j < n / 2; j++) {
217 ptr1[j] = (
v * f + 16384) >> 15;
221 for (j = 0; j < n / 2; j++) {
223 ptr2[j] = (
v * f + 16384) >> 15;
240 #if CONFIG_PGM_DECODER
254 #if CONFIG_PGMYUV_DECODER
268 #if CONFIG_PPM_DECODER
282 #if CONFIG_PBM_DECODER
296 #if CONFIG_PAM_DECODER