summaryrefslogtreecommitdiff
path: root/libavcodec/huffyuvdec.c
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-05-29 09:10:39 +0000
committerMichael Niedermayer <michaelni@gmx.at>2014-05-29 14:46:21 +0200
commit25e6310a3ec96ce991c73f50c411736f4c80de11 (patch)
tree0abeb6b4f7711a3c14454f7bad0c515e2e79c576 /libavcodec/huffyuvdec.c
parentc609f803e1c1689e8a557a9a9d624bf53aa4b7d3 (diff)
huffyuv: change left prediction access in BGRA
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/huffyuvdec.c')
-rw-r--r--libavcodec/huffyuvdec.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c
index ab345330b8..40cac8a7e5 100644
--- a/libavcodec/huffyuvdec.c
+++ b/libavcodec/huffyuvdec.c
@@ -1028,19 +1028,19 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
}
} else {
int y;
- int leftr, leftg, leftb, lefta;
+ uint8_t left[4];
const int last_line = (height - 1) * p->linesize[0];
if (s->bitstream_bpp == 32) {
- lefta = p->data[0][last_line+A] = get_bits(&s->gb, 8);
- leftr = p->data[0][last_line+R] = get_bits(&s->gb, 8);
- leftg = p->data[0][last_line+G] = get_bits(&s->gb, 8);
- leftb = p->data[0][last_line+B] = get_bits(&s->gb, 8);
+ left[A] = p->data[0][last_line+A] = get_bits(&s->gb, 8);
+ left[R] = p->data[0][last_line+R] = get_bits(&s->gb, 8);
+ left[G] = p->data[0][last_line+G] = get_bits(&s->gb, 8);
+ left[B] = p->data[0][last_line+B] = get_bits(&s->gb, 8);
} else {
- leftr = p->data[0][last_line+R] = get_bits(&s->gb, 8);
- leftg = p->data[0][last_line+G] = get_bits(&s->gb, 8);
- leftb = p->data[0][last_line+B] = get_bits(&s->gb, 8);
- lefta = p->data[0][last_line+A] = 255;
+ left[R] = p->data[0][last_line+R] = get_bits(&s->gb, 8);
+ left[G] = p->data[0][last_line+G] = get_bits(&s->gb, 8);
+ left[B] = p->data[0][last_line+B] = get_bits(&s->gb, 8);
+ left[A] = p->data[0][last_line+A] = 255;
skip_bits(&s->gb, 8);
}
@@ -1049,14 +1049,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
case LEFT:
case PLANE:
decode_bgr_bitstream(s, width - 1);
- s->hdsp.add_hfyu_left_pred_bgr32(p->data[0] + last_line + 4, s->temp[0], width - 1, &leftr, &leftg, &leftb, &lefta);
+ s->hdsp.add_hfyu_left_pred_bgr32(p->data[0] + last_line + 4, s->temp[0], width - 1, left);
for (y = s->height - 2; y >= 0; y--) { //Yes it is stored upside down.
decode_bgr_bitstream(s, width);
- s->hdsp.add_hfyu_left_pred_bgr32(p->data[0] + p->linesize[0] * y, s->temp[0], width, &leftr, &leftg, &leftb, &lefta);
+ s->hdsp.add_hfyu_left_pred_bgr32(p->data[0] + p->linesize[0] * y, s->temp[0], width, left);
if (s->predictor == PLANE) {
- if (s->bitstream_bpp != 32) lefta = 0;
+ if (s->bitstream_bpp != 32) left[A] = 0;
if ((y & s->interlaced) == 0 &&
y < s->height - 1 - s->interlaced) {
s->hdsp.add_bytes(p->data[0] + p->linesize[0] * y,