QT SMC Video Decoder by Mike Melanson (melan.nosp@m.son@.nosp@m.pcisy.nosp@m.s.ne.nosp@m.t) For more information about the SMC format, visit: http://www.pcisys.net/~melanson/codecs/.
More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
Go to the source code of this file.
QT SMC Video Decoder by Mike Melanson (melan.nosp@m.son@.nosp@m.pcisy.nosp@m.s.ne.nosp@m.t) For more information about the SMC format, visit: http://www.pcisys.net/~melanson/codecs/.
The SMC decoder outputs PAL8 colorspace data.
Definition in file smc.c.
◆ CPAIR
Definition at line 40 of file smc.c.
◆ CQUAD
Definition at line 41 of file smc.c.
◆ COCTET
Definition at line 42 of file smc.c.
◆ COLORS_PER_TABLE
#define COLORS_PER_TABLE 256 |
Definition at line 44 of file smc.c.
◆ GET_BLOCK_COUNT
#define GET_BLOCK_COUNT |
( |
| ) |
(opcode & 0x10) ? (1 + bytestream2_get_byte(&s->gb)) : 1 + (opcode & 0x0F); |
Definition at line 61 of file smc.c.
◆ ADVANCE_BLOCK
#define ADVANCE_BLOCK |
( |
| ) |
|
Value:{ \
pixel_ptr += 4; \
if (pixel_ptr >=
width) \
{ \
pixel_ptr = 0; \
} \
total_blocks--; \
if (total_blocks < !!n_blocks) \
{ \
av_log(
s->avctx,
AV_LOG_INFO,
"warning: block counter just went negative (this should not happen)\n"); \
return; \
} \
}
#define AV_LOG_INFO
Standard information.
Definition at line 64 of file smc.c.
◆ smc_decode_stream()
◆ smc_decode_init()
◆ smc_decode_frame()
◆ smc_decode_end()
◆ ff_smc_decoder
Initial value:= {
.name = "smc",
}
static av_cold int init(AVCodecContext *avctx)
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static int smc_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static av_cold int smc_decode_init(AVCodecContext *avctx)
static av_cold int smc_decode_end(AVCodecContext *avctx)
Definition at line 477 of file smc.c.