summaryrefslogtreecommitdiff
path: root/libavcodec/a64multienc.c
diff options
context:
space:
mode:
authorTobias Bindhammer <tobias.bindhammer@uni-ulm.de>2010-08-25 11:47:47 +0000
committerTobias Bindhammer <tobias.bindhammer@uni-ulm.de>2010-08-25 11:47:47 +0000
commit9f63810491682b7a600590dbcdc39e6a2246fd97 (patch)
tree7fc272acadfc1934929ccf7aa51c6ba616d0b590 /libavcodec/a64multienc.c
parent7f3468d3923b1703e0e4f7f534e7c68728f4393e (diff)
added/extended some comments in a64multi_encode_frame()
Originally committed as revision 24913 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/a64multienc.c')
-rw-r--r--libavcodec/a64multienc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index 9deab93ff2..1b281ec5f2 100644
--- a/libavcodec/a64multienc.c
+++ b/libavcodec/a64multienc.c
@@ -283,28 +283,35 @@ static int a64multi_encode_frame(AVCodecContext *avctx, unsigned char *buf,
req_size = 0;
+ /* copy charset to buf */
//XXX this all should maybe move to the muxer? as well as teh chunked/not chunked thing?
/* either write charset as a whole (more comfy when playing from mem) */
/* copy charset chunk if exists */
if(c->mc_lifetime) {
memcpy(buf,charset,0x800*(INTERLACED+1));
+
+ /* advance pointers */
buf += 0x800*(INTERLACED+1);
charset += 0x800*(INTERLACED+1);
req_size += 0x800*(INTERLACED+1);
}
+ /* no charset so clean buf */
else memset(buf,0,0x800*(INTERLACED+1));
/* write x frames to buf */
for (frame = 0; frame < c->mc_lifetime; frame++) {
- /* buf is uchar*, charmap is int*, so no memcpy here, sorry */
+ /* copy charmap to buf. buf is uchar*, charmap is int*, so no memcpy here, sorry */
for (a = 0; a < 1000; a++) {
buf[a] = charmap[a];
}
+ /* advance pointers */
buf += 0x400;
req_size += 0x400;
+ /* compress and copy colram to buf */
if(c->mc_use_5col) {
a64_compress_colram(buf,charmap,colram);
+ /* advance pointers */
buf += 0x100;
req_size += 0x100;
}