26static 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)
const FFCodec ff_wbmp_encoder
Libavcodec external API header.
static av_always_inline void bytestream_put_buffer(uint8_t **b, const uint8_t *src, unsigned int size)
#define CODEC_PIXFMTS(...)
#define FF_CODEC_ENCODE_CB(func)
#define CODEC_LONG_NAME(str)
int ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags)
Get a buffer for a packet.
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
void av_shrink_packet(AVPacket *pkt, int size)
Reduce packet size, correctly zeroing padding.
@ AV_PIX_FMT_MONOBLACK
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb.
main external API structure.
int width
picture width / height.
This structure describes decoded (raw) audio or video data.
This structure stores compressed data.
static void putv(uint8_t **bufp, unsigned int v)
static int wbmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
static void writebits(uint8_t **bufp, const uint8_t *src, int width, int height, int linesize)