X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Favs.c;h=a53a068c152144ed5ecb220b5b48e4120c77724f;hb=5e12701c5c881722f28379a15a60d5a20698b10f;hp=79bfeb1e4475c8e7c3e620b03ffa30a9afe54f2a;hpb=162d4fc99d07fcd3322aee9bcc99f045463da2b7;p=ffmpeg diff --git a/libavcodec/avs.c b/libavcodec/avs.c index 79bfeb1e447..a53a068c152 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -20,40 +20,42 @@ */ #include "avcodec.h" -#include "bitstream.h" +#include "get_bits.h" typedef struct { AVFrame picture; -} avs_context_t; +} AvsContext; typedef enum { AVS_VIDEO = 0x01, AVS_AUDIO = 0x02, AVS_PALETTE = 0x03, AVS_GAME_DATA = 0x04, -} avs_block_type_t; +} AvsBlockType; typedef enum { AVS_I_FRAME = 0x00, AVS_P_FRAME_3X3 = 0x01, AVS_P_FRAME_2X2 = 0x02, AVS_P_FRAME_2X3 = 0x03, -} avs_video_sub_type_t; +} AvsVideoSubType; static int avs_decode_frame(AVCodecContext * avctx, - void *data, int *data_size, const uint8_t * buf, int buf_size) + void *data, int *data_size, AVPacket *avpkt) { - avs_context_t *const avs = avctx->priv_data; + const uint8_t *buf = avpkt->data; + int buf_size = avpkt->size; + AvsContext *const avs = avctx->priv_data; AVFrame *picture = data; AVFrame *const p = (AVFrame *) & avs->picture; const uint8_t *table, *vect; uint8_t *out; int i, j, x, y, stride, vect_w = 3, vect_h = 3; - int sub_type; - avs_block_type_t type; + AvsVideoSubType sub_type; + AvsBlockType type; GetBitContext change_map; if (avctx->reget_buffer(avctx, p)) { @@ -152,11 +154,11 @@ AVCodec avs_decoder = { "avs", CODEC_TYPE_VIDEO, CODEC_ID_AVS, - sizeof(avs_context_t), + sizeof(AvsContext), avs_decode_init, NULL, NULL, avs_decode_frame, CODEC_CAP_DR1, - .long_name = "AVS (Audio Video Standard) video", + .long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"), };