Go to the documentation of this file.
44 #define SCREEN_WIDE 640
45 #define SCREEN_HIGH 429
55 #define NEXT_BYTE(v) (v) = forward ? (v) + 1 : (v) - 1;
59 unsigned val, saved_val = 0;
61 const uint8_t *
src, *source_end =
source + src_len;
63 uint8_t *dst, *dst_end;
66 int read_two_nibbles,
flag;
94 if (!
mode || (tmplen == 4)) {
95 if (src < source || src >= source_end)
101 read_two_nibbles = 0;
107 if (!read_two_nibbles) {
108 if (src < source || src >= source_end)
117 read_two_nibbles = 0;
138 advance_mode =
val & 1;
141 mode += 1 + advance_mode;
155 dst[
i] = dst[frame_off +
i];
164 for (
i =
len - 1;
i >= 0;
i--)
165 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);
254 #if FF_API_PALETTE_HAS_CHANGED
264 memcpy(outptr, srcptr, avctx->
width);
265 srcptr += avctx->
width;
287 c->frame =
c->frame_base + 640;
293 .
p.
name =
"bmv_video",
#define FF_ENABLE_DEPRECATION_WARNINGS
attribute_deprecated int palette_has_changed
Tell user application that palette has changed from previous frame.
This structure describes decoded (raw) audio or video data.
const FFCodec ff_bmv_video_decoder
static int decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
AVCodec p
The public AVCodec.
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)
static int64_t frame_end(const SyncQueue *sq, SyncQueueFrame frame, int nb_samples)
Compute the end timestamp of a frame.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static const uint16_t mask[17]
#define FF_CODEC_DECODE_CB(func)
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static av_cold int decode_init(AVCodecContext *avctx)
#define CODEC_LONG_NAME(str)
#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.
int(* init)(AVBSFContext *ctx)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
static int shift(int a, int b)
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
main external API structure.
#define FF_DISABLE_DEPRECATION_WARNINGS
This structure stores compressed data.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.