Commit bb7b155b authored by michael's avatar michael

alignment fix


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4059 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4f873bca
...@@ -677,8 +677,8 @@ void ff_er_frame_end(MpegEncContext *s){ ...@@ -677,8 +677,8 @@ void ff_er_frame_end(MpegEncContext *s){
for(i=0; i<2; i++){ for(i=0; i<2; i++){
pic->ref_index[i]= av_mallocz(size * sizeof(uint8_t)); pic->ref_index[i]= av_mallocz(size * sizeof(uint8_t));
pic->motion_val_base[i]= av_mallocz((size+2) * 2 * sizeof(uint16_t)); pic->motion_val_base[i]= av_mallocz((size+4) * 2 * sizeof(uint16_t));
pic->motion_val[i]= pic->motion_val_base[i]+2; pic->motion_val[i]= pic->motion_val_base[i]+4;
} }
pic->motion_subsample_log2= 3; pic->motion_subsample_log2= 3;
s->current_picture= *s->current_picture_ptr; s->current_picture= *s->current_picture_ptr;
......
...@@ -385,15 +385,15 @@ static int alloc_picture(MpegEncContext *s, Picture *pic, int shared){ ...@@ -385,15 +385,15 @@ static int alloc_picture(MpegEncContext *s, Picture *pic, int shared){
pic->mb_type= pic->mb_type_base + s->mb_stride+1; pic->mb_type= pic->mb_type_base + s->mb_stride+1;
if(s->out_format == FMT_H264){ if(s->out_format == FMT_H264){
for(i=0; i<2; i++){ for(i=0; i<2; i++){
CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b4_array_size+2) * sizeof(int16_t)) CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b4_array_size+4) * sizeof(int16_t))
pic->motion_val[i]= pic->motion_val_base[i]+2; pic->motion_val[i]= pic->motion_val_base[i]+4;
CHECKED_ALLOCZ(pic->ref_index[i], b8_array_size * sizeof(uint8_t)) CHECKED_ALLOCZ(pic->ref_index[i], b8_array_size * sizeof(uint8_t))
} }
pic->motion_subsample_log2= 2; pic->motion_subsample_log2= 2;
}else if(s->out_format == FMT_H263 || s->encoding || (s->avctx->debug&FF_DEBUG_MV) || (s->avctx->debug_mv)){ }else if(s->out_format == FMT_H263 || s->encoding || (s->avctx->debug&FF_DEBUG_MV) || (s->avctx->debug_mv)){
for(i=0; i<2; i++){ for(i=0; i<2; i++){
CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b8_array_size+2) * sizeof(int16_t)) CHECKED_ALLOCZ(pic->motion_val_base[i], 2 * (b8_array_size+4) * sizeof(int16_t))
pic->motion_val[i]= pic->motion_val_base[i]+2; pic->motion_val[i]= pic->motion_val_base[i]+4;
CHECKED_ALLOCZ(pic->ref_index[i], b8_array_size * sizeof(uint8_t)) CHECKED_ALLOCZ(pic->ref_index[i], b8_array_size * sizeof(uint8_t))
} }
pic->motion_subsample_log2= 3; pic->motion_subsample_log2= 3;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment