Go to the documentation of this file.
43 #define SCREEN_WIDE 640
44 #define SCREEN_HIGH 429
54 #define NEXT_BYTE(v) (v) = forward ? (v) + 1 : (v) - 1;
58 unsigned val, saved_val = 0;
60 const uint8_t *
src, *source_end =
source + src_len;
62 uint8_t *dst, *dst_end;
65 int read_two_nibbles,
flag;
93 if (!
mode || (tmplen == 4)) {
94 if (src < source || src >= source_end)
100 read_two_nibbles = 0;
106 if (!read_two_nibbles) {
107 if (src < source || src >= source_end)
116 read_two_nibbles = 0;
137 advance_mode =
val & 1;
140 mode += 1 + advance_mode;
154 dst[
i] = dst[frame_off +
i];
163 for (
i =
len - 1;
i >= 0;
i--)
164 dst[
i] = dst[frame_off +
i];
205 uint8_t *srcptr, *outptr;
208 type = bytestream_get_byte(&
c->stream);
210 int blobs = bytestream_get_byte(&
c->stream);
211 if (
pkt->
size < blobs * 65 + 2) {
215 c->stream += blobs * 65;
223 c->stream += command_size;
230 for (
i = 0;
i < 256;
i++)
231 c->pal[
i] = 0xFFU << 24 | bytestream_get_be24(&
c->stream);
238 scr_off = (int16_t)bytestream_get_le16(&
c->stream);
256 outptr =
frame->data[0];
260 memcpy(outptr, srcptr, avctx->
width);
261 srcptr += avctx->
width;
262 outptr +=
frame->linesize[0];
283 c->frame =
c->frame_base + 640;
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *pkt)
This structure describes decoded (raw) audio or video data.
static double val(void *priv, double ch)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame, int frame_off)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const uint16_t mask[17]
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static av_cold int decode_init(AVCodecContext *avctx)
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a source
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.
static int forward(AudioFWTDNContext *s, const double *in, int in_length, double **out, int *out_length, int ch, uint64_t sn)
uint8_t frame_base[SCREEN_WIDE *(SCREEN_HIGH+1)]
#define i(width, name, range_min, range_max)
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
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
main external API structure.
static void frame_end(MpegEncContext *s)
static int shift(int a, int b)
This structure stores compressed data.
int width
picture width / height.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
const AVCodec ff_bmv_video_decoder