Go to the documentation of this file.
73 for (j = 0; j < 2; j++)
74 memset(dst + j * linesize, v[0], 2);
79 for (j = 0; j < 2; j++)
80 for (
i = 0;
i < 2;
i++)
84 for (j = 0; j < 2; j++)
85 for (
i = 0;
i < 2;
i++)
100 for (j = 0; j < 4; j++)
101 memset(dst + j * linesize, v[0], 4);
106 for (j = 2; j >= 0; j -= 2) {
107 for (
i = 0;
i < 4;
i++)
109 for (
i = 0;
i < 4;
i++)
110 dst[(j + 1) * linesize +
i] = v[
get_bits1(gb)];
114 for (j = 0; j < 4; j += 2)
115 for (
i = 0;
i < 4;
i += 2)
116 decode2x2(gb, dst + j * linesize +
i, linesize);
136 for (j = 7; j >= 0; j--)
137 for (
i = 0;
i < 8;
i++)
141 for (j = 0; j < 8; j += 4)
142 for (
i = 0;
i < 8;
i += 4)
143 decode4x4(gb, dst + j * linesize +
i, linesize);
151 const uint8_t *buf = avpkt->
data;
152 const uint8_t *buf_end = buf + avpkt->
size;
153 int video_size, video_type,
i, j,
ret;
163 if (video_size < 0 || video_size > avpkt->
size - 5) {
168 if (video_type == 0 || video_type == 1) {
175 if (avctx->
height/8 * (avctx->
width/8) > 4 * video_size) {
180 for (j = 0; j < avctx->
height; j += 8)
181 for (
i = 0;
i < avctx->
width;
i += 8)
183 s->frame->data[0] + j *
s->frame->linesize[0] +
i,
184 s->frame->linesize[0], &
s->bdsp);
187 }
else if (video_type == 2) {
194 for (j = 0; j < avctx->
height; j++)
195 memset(
s->frame->data[0] + j *
s->frame->linesize[0],
199 "unsupported frame type %i\n", video_type);
207 s->palette[
i] = 0xFF
U << 24 | pal << 2 | ((pal >> 4) & 0x30303);
210 s->palette_has_changed = 1;
214 s->frame->key_frame = 1;
216 s->frame->palette_has_changed =
s->palette_has_changed;
217 s->palette_has_changed = 0;
op_fill_func fill_block_tab[2]
#define AV_LOG_WARNING
Something somehow does not look correct.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
static void decode2x2(GetBitContext *gb, uint8_t *dst, int linesize)
Decode 2x2 block.
This structure describes decoded (raw) audio or video data.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
AVCodec p
The public AVCodec.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define FF_CODEC_DECODE_CB(func)
#define AV_GET_BUFFER_FLAG_REF
The decoder will keep a reference to the frame and may reuse it later.
const FFCodec ff_jv_decoder
@ AV_PICTURE_TYPE_I
Intra.
static unsigned int get_bits1(GetBitContext *s)
static int decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame.
static av_cold int decode_close(AVCodecContext *avctx)
#define i(width, name, range_min, range_max)
uint32_t palette[AVPALETTE_COUNT]
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
void av_frame_unref(AVFrame *frame)
Unreference all the buffers referenced by frame and reset the frame fields.
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
@ AV_PIX_FMT_PAL8
8 bits with AV_PIX_FMT_RGB32 palette
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Identical in function to ff_get_buffer(), except it reuses the existing buffer if available.
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
main external API structure.
static void decode8x8(GetBitContext *gb, uint8_t *dst, int linesize, BlockDSPContext *bdsp)
Decode 8x8 block.
static av_cold int decode_init(AVCodecContext *avctx)
This structure stores compressed data.
int width
picture width / height.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static void decode4x4(GetBitContext *gb, uint8_t *dst, int linesize)
Decode 4x4 block.
av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_RB24