[Ffmpeg-devel] MPEG4: handling direct mode prediction for B-frames

Rahul Kumar kr.rahul
Fri Feb 17 19:11:30 CET 2006


Hi Michael,
   My apologies for souding a false alarm, for the macroblock which I
was debugging doesn't seem to get influenced by that. Here are the
details of my setup and the error which I get:

STREAM: I am debugging an ISO stream which can be downloaded from:
http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_IEC_14496-4_2004_Conformance_Testing/video_conformance/advanced_simple/vcon-asp14L4.bits
(note that you need to rename the extn to .m4v for ffmpeg/ISO code)

REF DEC: The ISO decoder which I am using as refrence can be downloaded from:
http://standards.iso.org/ittf/PubliclyAvailableStandards/c039392_ISO_IEC_14496-5_2001_Amd%205_2004(E)_Reference_Software.zip

FFMPEG VER: Latest Ver downloaded today

Error Desc: I get errors in 13th Macroblock of 3rd decoded frame (1st
B frame), which is the 2nd frame is display order.

###################################
The decoded frame sequence for this stream is:
I_frame    S_frame   B_frame  B_frame....
Display order:
I_frame    B_frame  B_frame  S_frame....
#####################################

The first line of the macroblock of the reference decoder is (in hex):
14 11 13 14 0F 0E 13 11 11 19 ..
where as that decoded by FFMPEG is (in hex):
43 43 4D 51 48 46 4D 47 3F 41....

The remaining lines of the macroblock are decoded correctly (more
reason why the problem cannot be with linesize).


In the ISO code this macroblock gets decoded using DIRECT mode where
as in FFMPEG this gets decoded through MV_TYPE_FIELD...

The exact location of start of this mismatch is 0x4A4D0

hopefully you can shed some light on the probable cause of discrepancy.

Warm Regards,
Rahul Kumar

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Message: 6
> Date: Fri, 17 Feb 2006 15:56:44 +0100
> From: Michael Niedermayer <michaelni at gmx.at>
> Subject: Re: [Ffmpeg-devel] MPEG4: Edge emulation for field motion
>        vectors
> To: FFMpeg development discussions and patches
>        <ffmpeg-devel at mplayerhq.hu>
> Message-ID: <20060217145644.GE28239 at MichaelsNB>
> Content-Type: text/plain; charset=us-ascii
>
> Hi
>
> On Fri, Feb 17, 2006 at 02:37:54PM +0000, Rahul Kumar wrote:
> > Hi everyone,
> >   I have a doubt regarding handling of unrestricted motion vectors
> > for field macroblocks  (ie MV_TYPE_FIELD), in a frame picture  (ie
> > s->picture_structure == PICT_FRAME)
> >
> > In such a scenario we call edge emulation routine with the following args:
> > // in function mpeg_motion
> > ff_emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based,
> >  src_x, src_y<<field_based, s->h_edge_pos, s->v_edge_pos);
> >
> > However shouldn't we be calling the above function with (2 * s->linesize)
>
> do you have a file which is decoded incorrectly? if no id assume this is correct
>
> [...]
> --
> Michael
>





More information about the ffmpeg-devel mailing list