jvdec: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
pull/43/merge
Vittorio Giovara 11 years ago committed by Diego Biurrun
parent 1f097d168d
commit d509ae5be0
  1. 18
      libavcodec/jvdec.c
  2. 4
      libavformat/jvdec.c

@ -25,11 +25,12 @@
* @author Peter Ross <pross@xvid.org>
*/
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
#include "internal.h"
#include "libavutil/intreadwrite.h"
typedef struct JvContext {
DSPContext dsp;
@ -111,7 +112,8 @@ static inline void decode4x4(GetBitContext *gb, uint8_t *dst, int linesize)
/**
* Decode 8x8 block
*/
static inline void decode8x8(GetBitContext *gb, uint8_t *dst, int linesize, DSPContext *dsp)
static inline void decode8x8(GetBitContext *gb, uint8_t *dst, int linesize,
DSPContext *dsp)
{
int i, j, v[2];
@ -134,8 +136,7 @@ static inline void decode8x8(GetBitContext *gb, uint8_t *dst, int linesize, DSPC
}
}
static int decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt)
{
JvContext *s = avctx->priv_data;
@ -160,7 +161,8 @@ static int decode_frame(AVCodecContext *avctx,
for (j = 0; j < avctx->height; j += 8)
for (i = 0; i < avctx->width; i += 8)
decode8x8(&gb, s->frame->data[0] + j*s->frame->linesize[0] + i,
decode8x8(&gb,
s->frame->data[0] + j * s->frame->linesize[0] + i,
s->frame->linesize[0], &s->dsp);
buf += video_size;
@ -168,10 +170,12 @@ static int decode_frame(AVCodecContext *avctx,
if (buf + 1 <= buf_end) {
int v = *buf++;
for (j = 0; j < avctx->height; j++)
memset(s->frame->data[0] + j*s->frame->linesize[0], v, avctx->width);
memset(s->frame->data[0] + j * s->frame->linesize[0],
v, avctx->width);
}
} else {
av_log(avctx, AV_LOG_WARNING, "unsupported frame type %i\n", video_type);
av_log(avctx, AV_LOG_WARNING,
"unsupported frame type %i\n", video_type);
return AVERROR_INVALIDDATA;
}
}

@ -27,6 +27,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "internal.h"
@ -106,7 +107,8 @@ static int read_header(AVFormatContext *s)
avio_skip(pb, 10);
ast->index_entries = av_malloc(ast->nb_index_entries * sizeof(*ast->index_entries));
ast->index_entries = av_malloc(ast->nb_index_entries *
sizeof(*ast->index_entries));
if (!ast->index_entries)
return AVERROR(ENOMEM);

Loading…
Cancel
Save