Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-23 18:03:15 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-12-23 18:03:15 +0400
commit8e09e183fc5fbddec153e41bb8f9b30eb6e11add (patch)
tree15ef362af8657ad573185826617e56a257cc69e3 /libavcodec/aura.c
parentdef18e5470bdcddb9d737784cc6ae427c195da7c (diff)
parentb6d7d4efae60845a93be6948ef78482bba1fc291 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: 8bps: cosmetics aasc: cosmetics, reformat ansi: remove an extra return asvdec: cosmetics, reformat aura: cosmetics, reformat Conflicts: libavcodec/aasc.c libavcodec/asvdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aura.c')
-rw-r--r--libavcodec/aura.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/libavcodec/aura.c b/libavcodec/aura.c
index e510a9f64c..cd4e42b609 100644
--- a/libavcodec/aura.c
+++ b/libavcodec/aura.c
@@ -50,8 +50,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *pkt)
{
- AuraDecodeContext *s=avctx->priv_data;
-
+ AuraDecodeContext *s = avctx->priv_data;
uint8_t *Y, *U, *V;
uint8_t val;
int x, y;
@@ -69,12 +68,12 @@ static int aura_decode_frame(AVCodecContext *avctx,
/* pixel data starts 48 bytes in, after 3x16-byte tables */
buf += 48;
- if(s->frame.data[0])
+ if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
s->frame.reference = 0;
- if(ff_get_buffer(avctx, &s->frame) < 0) {
+ if (ff_get_buffer(avctx, &s->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
@@ -86,23 +85,23 @@ static int aura_decode_frame(AVCodecContext *avctx,
/* iterate through each line in the height */
for (y = 0; y < avctx->height; y++) {
/* reset predictors */
- val = *buf++;
+ val = *buf++;
U[0] = val & 0xF0;
Y[0] = val << 4;
- val = *buf++;
+ val = *buf++;
V[0] = val & 0xF0;
Y[1] = Y[0] + delta_table[val & 0xF];
- Y += 2; U++; V++;
+ Y += 2; U++; V++;
/* iterate through the remaining pixel groups (4 pixels/group) */
for (x = 1; x < (avctx->width >> 1); x++) {
- val = *buf++;
+ val = *buf++;
U[0] = U[-1] + delta_table[val >> 4];
Y[0] = Y[-1] + delta_table[val & 0xF];
- val = *buf++;
+ val = *buf++;
V[0] = V[-1] + delta_table[val >> 4];
Y[1] = Y[ 0] + delta_table[val & 0xF];
- Y += 2; U++; V++;
+ Y += 2; U++; V++;
}
Y += s->frame.linesize[0] - avctx->width;
U += s->frame.linesize[1] - (avctx->width >> 1);
@@ -110,7 +109,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
}
*got_frame = 1;
- *(AVFrame*)data= s->frame;
+ *(AVFrame*)data = s->frame;
return pkt->size;
}