32 int buf_size = avpkt->
size;
35 int i, j,
n, linesize, h, upgrade = 0, is_mono = 0;
37 int components, sample_len,
ret;
96 n = (avctx->
width + 7) >> 3;
105 if(s->
type < 4 || (is_mono && s->
type==7)){
106 for (i=0; i<avctx->
height; i++) {
109 for(j=0; j<avctx->
width * components; j++){
133 for (i = 0; i < avctx->
height; i++) {
136 else if (upgrade == 1) {
137 unsigned int j, f = (255 * 128 + s->
maxval / 2) / s->
maxval;
138 for (j = 0; j <
n; j++)
140 }
else if (upgrade == 2) {
141 unsigned int j,
v, f = (65535 * 32768 + s->
maxval / 2) / s->
maxval;
142 for (j = 0; j < n / 2; j++) {
144 ((uint16_t *)ptr)[j] = (v * f + 16384) >> 15;
156 unsigned char *ptr1, *ptr2;
165 for (i = 0; i < avctx->
height; i++) {
174 for (i = 0; i < h; i++) {
186 uint16_t *ptr1, *ptr2;
187 const int f = (65535 * 32768 + s->
maxval / 2) / s->
maxval;
190 n = avctx->
width * 2;
195 for (i = 0; i < avctx->
height; i++) {
196 for (j = 0; j < n / 2; j++) {
198 ((uint16_t *)ptr)[j] = (
v * f + 16384) >> 15;
203 ptr1 = (uint16_t*)p->
data[1];
204 ptr2 = (uint16_t*)p->
data[2];
207 for (i = 0; i < h; i++) {
208 for (j = 0; j < n / 2; j++) {
210 ptr1[j] = (
v * f + 16384) >> 15;
214 for (j = 0; j < n / 2; j++) {
216 ptr2[j] = (
v * f + 16384) >> 15;
232 #if CONFIG_PGM_DECODER
244 #if CONFIG_PGMYUV_DECODER
256 #if CONFIG_PPM_DECODER
268 #if CONFIG_PBM_DECODER
280 #if CONFIG_PAM_DECODER