diff options
author | Diego Biurrun <diego@biurrun.de> | 2011-07-15 15:55:19 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2011-07-16 00:27:15 +0200 |
commit | 0686515cb49c813eedbb5f9caee3903056060e3b (patch) | |
tree | 7db1ca1743dea7e9e6bdae8bb6c34538ec26a22d /libavcodec/flashsvenc.c | |
parent | 59ef6bded5d01e4debf08dc65cfd4a088652759b (diff) | |
download | ffmpeg-0686515cb49c813eedbb5f9caee3903056060e3b.tar.gz |
flashsvenc: improve some variable names and fix corresponding comments
Diffstat (limited to 'libavcodec/flashsvenc.c')
-rw-r--r-- | libavcodec/flashsvenc.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index 7082040670..681d6c9b1c 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -156,25 +156,27 @@ static int encode_bitstream(FlashSVContext *s, AVFrame *p, uint8_t *buf, /* loop over all block columns */ for (j = 0; j < v_blocks + (v_part ? 1 : 0); j++) { - int hp = j * block_height; // horizontal position in frame - int hs = (j < v_blocks) ? block_height : v_part; // size of block + int y_pos = j * block_height; // vertical position in frame + int cur_blk_height = (j < v_blocks) ? block_height : v_part; /* loop over all block rows */ for (i = 0; i < h_blocks + (h_part ? 1 : 0); i++) { - int wp = i * block_width; // vertical position in frame - int ws = (i < h_blocks) ? block_width : h_part; // size of block + int x_pos = i * block_width; // horizontal position in frame + int cur_blk_width = (i < h_blocks) ? block_width : h_part; int ret = Z_OK; uint8_t *ptr = buf + buf_pos; /* copy the block to the temp buffer before compression * (if it differs from the previous frame's block) */ res = copy_region_enc(p->data[0], s->tmpblock, - s->image_height - (hp + hs + 1), - wp, hs, ws, p->linesize[0], previous_frame); + s->image_height - (y_pos + cur_blk_height + 1), + x_pos, cur_blk_height, cur_blk_width, + p->linesize[0], previous_frame); if (res || *I_frame) { unsigned long zsize = 3 * block_width * block_height; - ret = compress2(ptr + 2, &zsize, s->tmpblock, 3 * ws * hs, 9); + ret = compress2(ptr + 2, &zsize, s->tmpblock, + 3 * cur_blk_width * cur_blk_height, 9); //ret = deflateReset(&s->zstream); if (ret != Z_OK) |