aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-02-26 19:11:21 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-02-26 19:11:21 +0000
commit259630df425c51c7a0a8fca220a3128a6dc21efc (patch)
tree6c3298beb7fd48a239ca4c548bfa62a4cf78c47d
parent8d52ec7eb0cb18ee142c756af64c17f350b661b0 (diff)
downloadffmpeg-259630df425c51c7a0a8fca220a3128a6dc21efc.tar.gz
10l (vdpart fix)
Originally committed as revision 2822 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/mpegvideo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index f208045faf..041291c353 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -408,6 +408,7 @@ static void free_picture(MpegEncContext *s, Picture *pic){
static int init_duplicate_context(MpegEncContext *s, MpegEncContext *base){
int i;
+ // edge emu needs blocksize + filter length - 1 (=17x17 for halfpel / 21x21 for h264)
CHECKED_ALLOCZ(s->allocated_edge_emu_buffer, (s->width+64)*2*17*2); //(width + edge + align)*interlaced*MBsize*tolerance
s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*17;
@@ -2019,10 +2020,11 @@ int MPV_encode_picture(AVCodecContext *avctx,
}
for(i=0; i<avctx->thread_count; i++){
- int y= s->thread_context[i]->start_mb_y;
+ int start_y= s->thread_context[i]->start_mb_y;
+ int end_y= s->thread_context[i]-> end_mb_y;
int h= s->mb_height;
- uint8_t *start= buf + buf_size* y /h;
- uint8_t *end = buf + buf_size*(y+1)/h;
+ uint8_t *start= buf + buf_size*start_y/h;
+ uint8_t *end = buf + buf_size* end_y/h;
init_put_bits(&s->thread_context[i]->pb, start, end - start);
}