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;
112 n = avctx->
width * 4;
120 n = (avctx->
width + 7) >> 3;
129 if(s->
type < 4 || (is_mono && s->
type==7)){
130 for (i=0; i<avctx->
height; i++) {
133 for(j=0; j<avctx->
width * components; j++){
151 if (sample_len == 16) {
152 ((uint16_t*)ptr)[j] = (((1<<sample_len)-1)*v + (s->
maxval>>1))/s->
maxval;
156 if (sample_len != 16)
161 for (i = 0; i < avctx->
height; i++) {
164 else if (upgrade == 1) {
165 unsigned int j, f = (255 * 128 + s->
maxval / 2) / s->
maxval;
166 for (j = 0; j <
n; j++)
168 }
else if (upgrade == 2) {
169 unsigned int j,
v, f = (65535 * 32768 + s->
maxval / 2) / s->
maxval;
170 for (j = 0; j < n / 2; j++) {
172 ((uint16_t *)ptr)[j] = (v * f + 16384) >> 15;
184 unsigned char *ptr1, *ptr2;
193 for (i = 0; i < avctx->
height; i++) {
202 for (i = 0; i < h; i++) {
214 uint16_t *ptr1, *ptr2;
215 const int f = (65535 * 32768 + s->
maxval / 2) / s->
maxval;
218 n = avctx->
width * 2;
223 for (i = 0; i < avctx->
height; i++) {
224 for (j = 0; j < n / 2; j++) {
226 ((uint16_t *)ptr)[j] = (
v * f + 16384) >> 15;
231 ptr1 = (uint16_t*)p->
data[1];
232 ptr2 = (uint16_t*)p->
data[2];
235 for (i = 0; i < h; i++) {
236 for (j = 0; j < n / 2; j++) {
238 ptr1[j] = (
v * f + 16384) >> 15;
242 for (j = 0; j < n / 2; j++) {
244 ptr2[j] = (
v * f + 16384) >> 15;
260 #if CONFIG_PGM_DECODER
272 #if CONFIG_PGMYUV_DECODER
284 #if CONFIG_PPM_DECODER
296 #if CONFIG_PBM_DECODER
308 #if CONFIG_PAM_DECODER