avcodec/pnmdec: Fix indentation
Forgotten after ff1450e449f848ad4b37b3cf448315ba4581364e. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
22ca2ef018
commit
e4547c136a
@ -166,17 +166,17 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p,
|
|||||||
ptr+= linesize;
|
ptr+= linesize;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
for (i = 0; i < avctx->height; i++) {
|
for (int i = 0; i < avctx->height; i++) {
|
||||||
if (!upgrade)
|
if (!upgrade)
|
||||||
samplecpy(ptr, s->bytestream, n, s->maxval);
|
samplecpy(ptr, s->bytestream, n, s->maxval);
|
||||||
else if (upgrade == 1) {
|
else if (upgrade == 1) {
|
||||||
unsigned int j, f = (255 * 128 + s->maxval / 2) / s->maxval;
|
unsigned int f = (255 * 128 + s->maxval / 2) / s->maxval;
|
||||||
for (j = 0; j < n; j++)
|
for (unsigned j = 0; j < n; j++)
|
||||||
ptr[j] = (s->bytestream[j] * f + 64) >> 7;
|
ptr[j] = (s->bytestream[j] * f + 64) >> 7;
|
||||||
} else if (upgrade == 2) {
|
} else if (upgrade == 2) {
|
||||||
unsigned int j, v, f = (65535 * 32768 + s->maxval / 2) / s->maxval;
|
unsigned int f = (65535 * 32768 + s->maxval / 2) / s->maxval;
|
||||||
for (j = 0; j < n / 2; j++) {
|
for (unsigned j = 0; j < n / 2; j++) {
|
||||||
v = AV_RB16(s->bytestream + 2*j);
|
unsigned v = AV_RB16(s->bytestream + 2*j);
|
||||||
((uint16_t *)ptr)[j] = (v * f + 16384) >> 15;
|
((uint16_t *)ptr)[j] = (v * f + 16384) >> 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -358,7 +358,8 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p,
|
|||||||
g += p->linesize[0] / 4;
|
g += p->linesize[0] / 4;
|
||||||
b += p->linesize[1] / 4;
|
b += p->linesize[1] / 4;
|
||||||
}
|
}
|
||||||
} }
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case AV_PIX_FMT_GRAYF32:
|
case AV_PIX_FMT_GRAYF32:
|
||||||
if (!s->half) {
|
if (!s->half) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user