bmpenc.c File Reference
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "bmp.h"

Go to the source code of this file.

Macros

#define SIZE_BITMAPFILEHEADER   14
 
#define SIZE_BITMAPINFOHEADER   40
 

Functions

static av_cold int bmp_encode_init (AVCodecContext *avctx)
 
static int bmp_encode_frame (AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data)
 

Variables

static const uint32_t monoblack_pal [] = { 0x000000, 0xFFFFFF }
 
static const uint32_t rgb565_masks [] = { 0xF800, 0x07E0, 0x001F }
 
static const uint32_t rgb444_masks [] = { 0x0F00, 0x00F0, 0x000F }
 
AVCodec ff_bmp_encoder
 

Macro Definition Documentation

#define SIZE_BITMAPFILEHEADER   14

Referenced by bmp_encode_frame().

#define SIZE_BITMAPINFOHEADER   40

Referenced by bmp_encode_frame().

Function Documentation

static int bmp_encode_frame ( AVCodecContext avctx,
unsigned char *  buf,
int  buf_size,
void data 
)
static

Definition at line 66 of file bmpenc.c.

static av_cold int bmp_encode_init ( AVCodecContext avctx)
static

Definition at line 32 of file bmpenc.c.

Variable Documentation

AVCodec ff_bmp_encoder
Initial value:
= {
.name = "bmp",
.id = CODEC_ID_BMP,
.priv_data_size = sizeof(BMPContext),
.encode = bmp_encode_frame,
.pix_fmts = (const enum PixelFormat[]){
.long_name = NULL_IF_CONFIG_SMALL("BMP image"),
}
packed RGB 3:3:2, 8bpp, (msb)2R 3G 3B(lsb)
Definition: pixfmt.h:86
#define PIX_FMT_RGB555
Definition: pixfmt.h:177
Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb...
Definition: pixfmt.h:74
static int init(AVCodecParserContext *s)
Definition: h264_parser.c:336
struct BMPContext BMPContext
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:191
packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
Definition: pixfmt.h:85
#define PIX_FMT_RGB565
Definition: pixfmt.h:176
packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
Definition: pixfmt.h:88
static av_cold int bmp_encode_init(AVCodecContext *avctx)
Definition: bmpenc.c:32
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
Definition: pixfmt.h:83
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:67
PixelFormat
Pixel format.
Definition: pixfmt.h:62
static int bmp_encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data)
Definition: bmpenc.c:66
8 bit with PIX_FMT_RGB32 palette
Definition: pixfmt.h:75
#define PIX_FMT_RGB444
Definition: pixfmt.h:178
Y , 8bpp.
Definition: pixfmt.h:72

Definition at line 157 of file bmpenc.c.

const uint32_t monoblack_pal[] = { 0x000000, 0xFFFFFF }
static

Definition at line 28 of file bmpenc.c.

Referenced by bmp_encode_frame().

const uint32_t rgb444_masks[] = { 0x0F00, 0x00F0, 0x000F }
static

Definition at line 30 of file bmpenc.c.

Referenced by bmp_encode_frame().

const uint32_t rgb565_masks[] = { 0xF800, 0x07E0, 0x001F }
static

Definition at line 29 of file bmpenc.c.

Referenced by bmp_encode_frame().