#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include "common.h"#include "avcodec.h"#include "dsputil.h"

Go to the source code of this file.
Data Structures | |
| struct | SmcContext |
Defines | |
| #define | CPAIR 2 |
| #define | CQUAD 4 |
| #define | COCTET 8 |
| #define | COLORS_PER_TABLE 256 |
| #define | GET_BLOCK_COUNT() (opcode & 0x10) ? (1 + s->buf[stream_ptr++]) : 1 + (opcode & 0x0F); |
| #define | ADVANCE_BLOCK() |
Functions | |
| static void | smc_decode_stream (SmcContext *s) |
| static int | smc_decode_init (AVCodecContext *avctx) |
| static int | smc_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
| static int | smc_decode_end (AVCodecContext *avctx) |
Variables | |
| AVCodec | smc_decoder |
The SMC decoder outputs PAL8 colorspace data.
Definition in file smc.c.
| #define ADVANCE_BLOCK | ( | ) |
Value:
{ \
pixel_ptr += 4; \
if (pixel_ptr >= width) \
{ \
pixel_ptr = 0; \
row_ptr += stride * 4; \
} \
total_blocks--; \
if (total_blocks < 0) \
{ \
av_log(s->avctx, AV_LOG_INFO, "warning: block counter just went negative (this should not happen)\n"); \
return; \
} \
}
| #define COCTET 8 |
| #define COLORS_PER_TABLE 256 |
| #define CPAIR 2 |
| #define CQUAD 4 |
| #define GET_BLOCK_COUNT | ( | ) | (opcode & 0x10) ? (1 + s->buf[stream_ptr++]) : 1 + (opcode & 0x0F); |
| static int smc_decode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 471 of file smc.c.
References SmcContext::frame, AVCodecContext::priv_data, AVCodecContext::release_buffer, and s.
| static int smc_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 445 of file smc.c.
References av_log(), AV_LOG_ERROR, SmcContext::avctx, SmcContext::buf, FF_BUFFER_HINTS_PRESERVE, FF_BUFFER_HINTS_READABLE, FF_BUFFER_HINTS_REUSABLE, FF_BUFFER_HINTS_VALID, SmcContext::frame, AVCodecContext::priv_data, AVCodecContext::reget_buffer, s, SmcContext::size, and smc_decode_stream().

| static int smc_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 431 of file smc.c.
References SmcContext::avctx, SmcContext::dsp, dsputil_init(), SmcContext::frame, AVCodecContext::has_b_frames, NULL, AVCodecContext::pix_fmt, PIX_FMT_PAL8, AVCodecContext::priv_data, and s.

| static void smc_decode_stream | ( | SmcContext * | s | ) | [static] |
Definition at line 80 of file smc.c.
References ADVANCE_BLOCK, av_log(), AV_LOG_INFO, SmcContext::avctx, AVPALETTE_SIZE, BE_16, BE_32, SmcContext::buf, COCTET, SmcContext::color_octets, SmcContext::color_pairs, SmcContext::color_quads, COLORS_PER_TABLE, CPAIR, CQUAD, SmcContext::frame, GET_BLOCK_COUNT, AVCodecContext::height, height, memcpy, AVCodecContext::palctrl, AVPaletteControl::palette, AVPaletteControl::palette_changed, pixels, SmcContext::size, stride, AVCodecContext::width, and width.
Referenced by smc_decode_frame().

Initial value:
{
"smc",
CODEC_TYPE_VIDEO,
CODEC_ID_SMC,
sizeof(SmcContext),
smc_decode_init,
NULL,
smc_decode_end,
smc_decode_frame,
CODEC_CAP_DR1,
}
Definition at line 481 of file smc.c.
Referenced by avcodec_register_all().
1.5.5