aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-04-27 02:25:42 +0100
committerMans Rullgard <mans@mansr.com>2012-05-01 00:21:30 +0100
commitc75eca9d37d692dcbd2c80af0f37e33b10ac333b (patch)
treefd918e7b9c43ddc82883c44903a1227b66ac7a9e
parentf7ff0999976c2a00c704a0f9faa2a1801c593910 (diff)
downloadffmpeg-c75eca9d37d692dcbd2c80af0f37e33b10ac333b.tar.gz
dvenc: do not call dsputil functions with stride not a multiple of 16
Allowing dsputil functions to assume the stride is a multiple of 16 even for smaller block sizes can simplify their implementation. This appears to be the only place this guarantee is not met. Signed-off-by: Mans Rullgard <mans@mansr.com>
-rw-r--r--libavcodec/dv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 79e73dd125..16be0eddc0 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -662,7 +662,7 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg)
int mb_x, mb_y, c_offset, linesize, y_stride;
uint8_t* y_ptr;
uint8_t* dif;
- LOCAL_ALIGNED_8(uint8_t, scratch, [64]);
+ LOCAL_ALIGNED_8(uint8_t, scratch, [128]);
EncBlockInfo enc_blks[5*DV_MAX_BPM];
PutBitContext pbs[5*DV_MAX_BPM];
PutBitContext* pb;
@@ -717,10 +717,10 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg)
b[0] = c_ptr[0]; b[1] = c_ptr[1]; b[2] = c_ptr[2]; b[3] = c_ptr[3];
b[4] = d[0]; b[5] = d[1]; b[6] = d[2]; b[7] = d[3];
c_ptr += linesize;
- b += 8;
+ b += 16;
}
c_ptr = scratch;
- linesize = 8;
+ linesize = 16;
}
vs_bit_size += dv_init_enc_block( enc_blk++, c_ptr , linesize, s, 1);