27 const AVFrame *p,
int *got_packet)
29 uint8_t *bytestream, *bytestream_start, *bytestream_end;
30 int i, h, h1,
c,
n, linesize,
ret;
35 avctx->
height) + 200)) < 0)
39 bytestream = pkt->
data;
40 bytestream_end = pkt->
data + pkt->
size;
47 n = (avctx->
width + 7) >> 3;
82 snprintf(bytestream, bytestream_end - bytestream,
83 "P%c\n%d %d\n", c, avctx->
width, h1);
84 bytestream += strlen(bytestream);
87 snprintf(bytestream, bytestream_end - bytestream,
89 bytestream += strlen(bytestream);
94 for (i = 0; i < h; i++) {
95 memcpy(bytestream, ptr, n);
105 for (i = 0; i < h; i++) {
106 memcpy(bytestream, ptr1, n);
108 memcpy(bytestream, ptr2, n);
114 pkt->
size = bytestream - bytestream_start;
139 #if CONFIG_PGM_ENCODER
154 #if CONFIG_PGMYUV_ENCODER
169 #if CONFIG_PPM_ENCODER
184 #if CONFIG_PBM_ENCODER