[SCM] libav/experimental: Replacing the constant with a macro
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:36:26 UTC 2013
The following commit has been merged in the experimental branch:
commit b25d439233d1024a911bbb4a0f4f571d65607bc4
Author: Roman Shaposhnik <roman at shaposhnik.org>
Date: Sat Jan 31 01:34:44 2009 +0000
Replacing the constant with a macro
Originally committed as revision 16872 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 6568e86..7b52e7a 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -982,8 +982,8 @@ static int dv_encode_video_segment(AVCodecContext *avctx, DVwork_chunk *work_chu
uint8_t* dif;
int do_edge_wrap;
DECLARE_ALIGNED_16(DCTELEM, block[64]);
- EncBlockInfo enc_blks[5*6];
- PutBitContext pbs[5*6];
+ EncBlockInfo enc_blks[5*DV_MAX_BPM];
+ PutBitContext pbs[5*DV_MAX_BPM];
PutBitContext* pb;
EncBlockInfo* enc_blk;
int vs_bit_size = 0;
@@ -1096,28 +1096,28 @@ static int dv_encode_video_segment(AVCodecContext *avctx, DVwork_chunk *work_chu
}
/* First pass over individual cells only */
- for (j = 0; j < 5 * 6; j++)
+ for (j = 0; j < 5 * s->sys->bpm; j++)
dv_encode_ac(&enc_blks[j], &pbs[j], &pbs[j+1]);
/* Second pass over each MB space */
- for (j = 0; j < 5 * 6; j += 6) {
+ for (j=0; j<5*s->sys->bpm; j+=s->sys->bpm) {
pb = &pbs[j];
- for (i = 0; i < 6; i++) {
+ for (i=0; i<s->sys->bpm; i++) {
if (enc_blks[i+j].partial_bit_count)
- pb = dv_encode_ac(&enc_blks[i+j], pb, &pbs[j+6]);
+ pb = dv_encode_ac(&enc_blks[i+j], pb, &pbs[j+s->sys->bpm]);
}
}
/* Third and final pass over the whole video segment space */
pb = &pbs[0];
- for (j = 0; j < 5 * 6; j++) {
+ for (j=0; j<5*s->sys->bpm; j++) {
if (enc_blks[j].partial_bit_count)
- pb = dv_encode_ac(&enc_blks[j], pb, &pbs[6*5]);
+ pb = dv_encode_ac(&enc_blks[j], pb, &pbs[s->sys->bpm*5]);
if (enc_blks[j].partial_bit_count)
av_log(NULL, AV_LOG_ERROR, "ac bitstream overflow\n");
}
- for (j = 0; j < 5 * 6; j++)
+ for (j=0; j<5*s->sys->bpm; j++)
flush_put_bits(&pbs[j]);
return 0;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list