|
|
|
@@ -32,7 +32,7 @@ static int xbm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, |
|
|
|
|
|
|
|
linesize = (avctx->width + 7) / 8; |
|
|
|
commas = avctx->height * linesize; |
|
|
|
size = avctx->height * (linesize * 7 + 2) + 109; |
|
|
|
size = avctx->height * (linesize * 6 + 1) + 106; |
|
|
|
if ((ret = ff_alloc_packet2(avctx, pkt, size, 0)) < 0) |
|
|
|
return ret; |
|
|
|
|
|
|
|
@@ -41,7 +41,7 @@ static int xbm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, |
|
|
|
|
|
|
|
buf += snprintf(buf, 32, "#define image_width %u\n", avctx->width); |
|
|
|
buf += snprintf(buf, 33, "#define image_height %u\n", avctx->height); |
|
|
|
buf += snprintf(buf, 40, "static unsigned char image_bits[] = {\n"); |
|
|
|
buf += snprintf(buf, 39, "static unsigned char image_bits[] = {\n"); |
|
|
|
for (i = 0; i < avctx->height; i++) { |
|
|
|
for (j = 0; j < linesize; j++) { |
|
|
|
buf += snprintf(buf, 6, " 0x%02X", ff_reverse[*ptr++]); |
|
|
|
|