Commit 8e09e183 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents def18e54 b6d7d4ef
...@@ -44,9 +44,6 @@ ...@@ -44,9 +44,6 @@
static const enum AVPixelFormat pixfmt_rgb24[] = { static const enum AVPixelFormat pixfmt_rgb24[] = {
AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE }; AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE };
/*
* Decoder context
*/
typedef struct EightBpsContext { typedef struct EightBpsContext {
AVCodecContext *avctx; AVCodecContext *avctx;
AVFrame pic; AVFrame pic;
...@@ -57,12 +54,6 @@ typedef struct EightBpsContext { ...@@ -57,12 +54,6 @@ typedef struct EightBpsContext {
uint32_t pal[256]; uint32_t pal[256];
} EightBpsContext; } EightBpsContext;
/*
*
* Decode a frame
*
*/
static int decode_frame(AVCodecContext *avctx, void *data, static int decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt) int *got_frame, AVPacket *avpkt)
{ {
...@@ -151,12 +142,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, ...@@ -151,12 +142,6 @@ static int decode_frame(AVCodecContext *avctx, void *data,
return buf_size; return buf_size;
} }
/*
*
* Init 8BPS decoder
*
*/
static av_cold int decode_init(AVCodecContext *avctx) static av_cold int decode_init(AVCodecContext *avctx)
{ {
EightBpsContext * const c = avctx->priv_data; EightBpsContext * const c = avctx->priv_data;
...@@ -202,14 +187,6 @@ static av_cold int decode_init(AVCodecContext *avctx) ...@@ -202,14 +187,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
return 0; return 0;
} }
/*
*
* Uninit 8BPS decoder
*
*/
static av_cold int decode_end(AVCodecContext *avctx) static av_cold int decode_end(AVCodecContext *avctx)
{ {
EightBpsContext * const c = avctx->priv_data; EightBpsContext * const c = avctx->priv_data;
...@@ -220,8 +197,6 @@ static av_cold int decode_end(AVCodecContext *avctx) ...@@ -220,8 +197,6 @@ static av_cold int decode_end(AVCodecContext *avctx)
return 0; return 0;
} }
AVCodec ff_eightbps_decoder = { AVCodec ff_eightbps_decoder = {
.name = "8bps", .name = "8bps",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
......
...@@ -105,11 +105,11 @@ static int aasc_decode_frame(AVCodecContext *avctx, ...@@ -105,11 +105,11 @@ static int aasc_decode_frame(AVCodecContext *avctx,
ff_msrle_decode(avctx, (AVPicture*)&s->frame, 8, &s->gb); ff_msrle_decode(avctx, (AVPicture*)&s->frame, 8, &s->gb);
break; break;
case MKTAG('A', 'A', 'S', 'C'): case MKTAG('A', 'A', 'S', 'C'):
switch(compr){ switch (compr) {
case 0: case 0:
stride = (avctx->width * psize + psize) & ~psize; stride = (avctx->width * psize + psize) & ~psize;
for(i = avctx->height - 1; i >= 0; i--){ for (i = avctx->height - 1; i >= 0; i--) {
if(avctx->width * psize > buf_size){ if (avctx->width * psize > buf_size) {
av_log(avctx, AV_LOG_ERROR, "Next line is beyond buffer bounds\n"); av_log(avctx, AV_LOG_ERROR, "Next line is beyond buffer bounds\n");
break; break;
} }
......
This diff is collapsed.
...@@ -50,8 +50,7 @@ static int aura_decode_frame(AVCodecContext *avctx, ...@@ -50,8 +50,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
void *data, int *got_frame, void *data, int *got_frame,
AVPacket *pkt) AVPacket *pkt)
{ {
AuraDecodeContext *s=avctx->priv_data; AuraDecodeContext *s = avctx->priv_data;
uint8_t *Y, *U, *V; uint8_t *Y, *U, *V;
uint8_t val; uint8_t val;
int x, y; int x, y;
...@@ -69,12 +68,12 @@ static int aura_decode_frame(AVCodecContext *avctx, ...@@ -69,12 +68,12 @@ static int aura_decode_frame(AVCodecContext *avctx,
/* pixel data starts 48 bytes in, after 3x16-byte tables */ /* pixel data starts 48 bytes in, after 3x16-byte tables */
buf += 48; buf += 48;
if(s->frame.data[0]) if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame); avctx->release_buffer(avctx, &s->frame);
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
s->frame.reference = 0; 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"); av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1; return -1;
} }
...@@ -110,7 +109,7 @@ static int aura_decode_frame(AVCodecContext *avctx, ...@@ -110,7 +109,7 @@ static int aura_decode_frame(AVCodecContext *avctx,
} }
*got_frame = 1; *got_frame = 1;
*(AVFrame*)data= s->frame; *(AVFrame*)data = s->frame;
return pkt->size; return pkt->size;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment