[MPlayer-dev-eng] weird al hotfix :)
Michael Niedermayer
michaelni at gmx.at
Tue Jan 1 18:11:58 CET 2002
Hi
On Tuesday 01 January 2002 17:20, Michael Niedermayer wrote:
[...]
>
> no w.asf has 0x17 like every other file i tried ... except one :)
> .... and that is left_edge_artifacts_in_ffmpeg.avi it has 0x18
> now things starting to make sense
> 0x18 means that the image is encoded as 2 slices so there can be no ac/dc
> prediction between them i guess
heres the real fix :)))))
-----Hand made diff from libavcodec/msmpeg4.c----
/* special slice handling */
if (s->mb_x == 0) {
if (s->slice_height && (s->mb_y % s->slice_height) == 0) {
int wrap;
/* reset DC pred (set previous line to 1024) */
wrap = 2 * s->mb_width + 2;
memsetw(&s->dc_val[0][(1) + (2 * s->mb_y) * wrap],
1024, 2 * s->mb_width);
wrap = s->mb_width + 2;
memsetw(&s->dc_val[1][(1) + (s->mb_y) * wrap],
1024, s->mb_width);
memsetw(&s->dc_val[2][(1) + (s->mb_y) * wrap],
1024, s->mb_width);
+ /* reset AC pred (set previous line to 0) */
+ wrap = s->mb_width * 2 + 2;
+ memsetw(s->ac_val[0][0] + (1 + (2 * s->mb_y) * wrap)*16,
+ 0, 2 * s->mb_width*16);
+ wrap = s->mb_width + 2;
+ memsetw(s->ac_val[1][0] + (1 + (s->mb_y) * wrap)*16,
+ 0, s->mb_width*16);
+ memsetw(s->ac_val[2][0] + (1 + (s->mb_y) * wrap)*16,
+ 0, s->mb_width*16);
s->first_slice_line = 1;
} else {
s->first_slice_line = 0;
}
}
--------end-------
[...]
ill test it a bit, and if its ok than ill send a patch to the ffmpeg list in
case noone has applied it earlier
Michael
More information about the MPlayer-dev-eng
mailing list