Commit b5a093b3 authored by Michael Niedermayer's avatar Michael Niedermayer

different edge positions fixed with edge emu / dr1

Originally committed as revision 814 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent bc4a1ffe
......@@ -1348,6 +1348,8 @@ void mpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
s->y_dc_scale_table= ff_mpeg4_y_dc_scale_table; //FIXME add short header support
s->c_dc_scale_table= ff_mpeg4_c_dc_scale_table;
s->h_edge_pos= s->width;
s->v_edge_pos= s->height;
}
static void h263_dc_scale(MpegEncContext * s)
......@@ -3851,11 +3853,15 @@ int mpeg4_decode_picture_header(MpegEncContext * s)
printf("Error, header damaged or not MPEG4 header (f_code=0)\n");
return -1; // makes no sense to continue, as the MV decoding will break very quickly
}
}
}else
s->f_code=1;
if (s->pict_type == B_TYPE) {
s->b_code = get_bits(&s->gb, 3);
//printf("b-code %d\n", s->b_code);
}
}else
s->b_code=1;
//printf("quant:%d fcode:%d bcode:%d type:%d\n", s->qscale, s->f_code, s->b_code, s->pict_type);
if(!s->scalability){
if (s->shape!=RECT_SHAPE && s->pict_type!=I_TYPE) {
......@@ -3884,6 +3890,10 @@ int mpeg4_decode_picture_header(MpegEncContext * s)
s->y_dc_scale_table= ff_mpeg4_y_dc_scale_table; //FIXME add short header support
s->c_dc_scale_table= ff_mpeg4_c_dc_scale_table;
if(s->divx_version==0 || s->divx_version < 500){
s->h_edge_pos= s->width;
s->v_edge_pos= s->height;
}
return 0;
}
......
This diff is collapsed.
......@@ -130,6 +130,7 @@ typedef struct MpegEncContext {
int picture_in_gop_number; /* 0-> first pic in gop, ... */
int b_frames_since_non_b; /* used for encoding, relative to not yet reordered input */
int mb_width, mb_height; /* number of MBs horizontally & vertically */
int h_edge_pos, v_edge_pos;/* horizontal / vertical position of the right/bottom edge (pixel replicateion)*/
int mb_num; /* number of MBs of a picture */
int linesize; /* line size, in bytes, may be different from width */
int uvlinesize; /* line size, for chroma in bytes, may be different from width */
......
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