Go to the documentation of this file.
26 static void putv(uint8_t ** bufp,
unsigned int v)
32 vv += v & (0x7F << 7 * n++);
35 bytestream_put_byte(bufp, 0x80 | (v & (0x7F << 7 * n)) >> 7 * n);
37 bytestream_put_byte(bufp, v & 0x7F);
42 int wpad = (
width + 7) / 8;
43 for (
int j = 0; j <
height; j++) {
44 memcpy(*bufp,
src, wpad);
63 bytestream_put_byte(&buf, 0);
67 if (
frame->linesize[0] == (avctx->
width + 7) / 8)
AVPixelFormat
Pixel format.
static int wbmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
This structure describes decoded (raw) audio or video data.
AVCodec p
The public AVCodec.
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
#define FF_CODEC_ENCODE_CB(func)
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
#define CODEC_LONG_NAME(str)
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
static void putv(uint8_t **bufp, unsigned int v)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
static av_always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size)
const char * name
Name of the codec implementation.
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.
int ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags)
Get a buffer for a packet.
This structure stores compressed data.
const FFCodec ff_wbmp_encoder
int width
picture width / height.
static void writebits(uint8_t **bufp, const uint8_t *src, int width, int height, int linesize)