| 70 | } |
| 71 | |
| 72 | static int targa_encode_normal(uint8_t *outbuf, const AVFrame *pic, int bpp, int w, int h) |
| 73 | { |
| 74 | int i, n = bpp * w; |
| 75 | uint8_t *out = outbuf; |
| 76 | const uint8_t *ptr = pic->data[0]; |
| 77 | |
| 78 | for(i=0; i < h; i++) { |
| 79 | memcpy(out, ptr, n); |
| 80 | out += n; |
| 81 | ptr += pic->linesize[0]; |
| 82 | } |
| 83 | |
| 84 | return out - outbuf; |
| 85 | } |
| 86 | |
| 87 | static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt, |
| 88 | const AVFrame *p, int *got_packet) |
no outgoing calls
no test coverage detected