[MPlayer-dev-eng] PATCH [0/12] CoreAVC support (Take 3)

Alex Beregszaszi alex at rtfs.hu
Tue Feb 27 23:47:21 CET 2007


Hi,

> As a reminder, these patches add support for the CoreAVC directshow 
> filter, which supports AVC1, as well as h264 with MBAFF and PAFF.

What the hell is CoreAVC and why is it so problematic to support it?


> 001mpg2fmt.patch: This adds support for sending the input format in a
> MPEG2Video header, which is required by CoreAVC for AVC1 decoding as it
> seems to only support this format for retrieving the quantization coeffs.

Jeez.

> 002dstfmt.patch: Ignore an error on connecting the output pin on filter 
> loading.  The code will always call SetDestFmt afterwards with a valid 
> output format, so it should succeed or fail at that point.  I tried 
> using EnumMediaFormats, but CoreAVC gets angry if the VIDEOINFOHEADER 
> type changes after initialization, and it outputs VIDEOINFOHEADER2 with 
> EnumMediaFormats.  this solutions just seemed simpler.

Maybe good, but remove the unneded cosmetics.

> 003dshowclose.patch: This fixes a segfault when closing down CoreAVC. It 
> doesn't affect normal mplayer playback but would impact any case where 
> the filter needs to be used multiple times within a session (it is 
> required for the mythTV variant of this patch)

Maybe good.

> 004avc1mov.patch: allow both 'avc1' and 'AVC1' streams to be processed

Anyone familiar with AVC can comment?

> 005pecompact2.patch: adds support for the PECompact2 dll compression
> tool.  We need to hook SIGSEGV because PECompact2 uses this to swap from
> the compressed to uncompressed image on the fly.

Jesus. And how does this works on Windows without such special hooks? I
guess it uses some calls which we dont support to set up this hack.

> 006cpu.patch: adds support for multiple CPUs.  It enables Semaphores and
> Mutexes to work properly as well.

Separate this logically into SMP support and mutex fix.

> 007widereg.patch: adds support for Querying registry items as wide
> strings.  the strings are always stored as standard char strings, so it
> just converts back-and-forth

Maybe.

> 008newfunc.patch: adds several support for several new functions to
> win32.c  Note the 'UNDEFF' macro is used to prevent certain functions
> from being stubbed.  If they are, stubbed, the codec doesn't work properly.

Split this into more parts, UNDEF, new functions, etc.

> 009threaddisp.patch: an optional patch that shows the threadid in win32
> debug messages.  It also changes the return of CreateThread from a
> pointer to the pthread_t element to the element itself (making it easier
> to see which threads are created where)

Are you sure this doesnt breaks anything?

> 010stub.patch: This adds a return value to win32 stubbed apps.  These 
> used to be present in older versions of mplayer, and are required for 
> CoreAVC

Huh? This could cause crashes in case of caller doesnt saves eax.

> 011checkstub.patch: This patch reuses a previously defined stub if one 
> exists for the current function.  The patch isn't needed for mplayer, 
> however for the port to mythtv, the codec is initialized multiple times 
> (each time a new program is started), and we quickly run out of stubs.

Looks good.

> 012regedit.patch: Adds a new file 'modify_reg.c' that can be used to add
> items to the registry.
> build as: gcc -o regedit -I. loader/modify_reg.c

I like this tool but must be cleaned up.

--
Alex Beregszaszi




More information about the MPlayer-dev-eng mailing list