|
|
@ -33,8 +33,8 @@ static const uint32_t rgb444_masks[] = { 0x0F00, 0x00F0, 0x000F }; |
|
|
|
static av_cold int bmp_encode_init(AVCodecContext *avctx){ |
|
|
|
static av_cold int bmp_encode_init(AVCodecContext *avctx){ |
|
|
|
BMPContext *s = avctx->priv_data; |
|
|
|
BMPContext *s = avctx->priv_data; |
|
|
|
|
|
|
|
|
|
|
|
avcodec_get_frame_defaults((AVFrame*)&s->picture); |
|
|
|
avcodec_get_frame_defaults(&s->picture); |
|
|
|
avctx->coded_frame = (AVFrame*)&s->picture; |
|
|
|
avctx->coded_frame = &s->picture; |
|
|
|
|
|
|
|
|
|
|
|
switch (avctx->pix_fmt) { |
|
|
|
switch (avctx->pix_fmt) { |
|
|
|
case PIX_FMT_BGR24: |
|
|
|
case PIX_FMT_BGR24: |
|
|
@ -68,7 +68,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, |
|
|
|
const AVFrame *pict, int *got_packet) |
|
|
|
const AVFrame *pict, int *got_packet) |
|
|
|
{ |
|
|
|
{ |
|
|
|
BMPContext *s = avctx->priv_data; |
|
|
|
BMPContext *s = avctx->priv_data; |
|
|
|
AVFrame * const p= (AVFrame*)&s->picture; |
|
|
|
AVFrame * const p = &s->picture; |
|
|
|
int n_bytes_image, n_bytes_per_row, n_bytes, i, n, hsize, ret; |
|
|
|
int n_bytes_image, n_bytes_per_row, n_bytes, i, n, hsize, ret; |
|
|
|
const uint32_t *pal = NULL; |
|
|
|
const uint32_t *pal = NULL; |
|
|
|
int pad_bytes_per_row, pal_entries = 0, compression = BMP_RGB; |
|
|
|
int pad_bytes_per_row, pal_entries = 0, compression = BMP_RGB; |
|
|
|