[vlc-devel] commit: Added support for AOB files (LPCM/MLP) to our PS demuxer. ( Laurent Aimar )
jpd at videolan.org
jpd at videolan.org
Thu Aug 13 15:55:18 CEST 2009
On Fri, Aug 07, 2009 at 08:53:54PM +0200, git version control wrote:
> vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Aug 7 19:56:14 2009 +0200| [deeb97576811b4d4220d31a3389165da026695f0] | committer: Laurent Aimar
[snip]
> +#define PS_TK_COUNT (256+256+256+8 - 0xc0)
> +#if 0
> #define PS_ID_TO_TK( id ) ((id) <= 0xff ? (id) - 0xc0 : \
> ((id)&0xff) + (((id)&0xff00) == 0xbd00 ? 256-0xC0 : 512-0xc0) )
> +#else
> +static inline int ps_id_to_tk( unsigned i_id )
> +{
> + if( i_id <= 0xff )
> + return i_id - 0xc0;
> + else if( (i_id & 0xff00) == 0xbd00 )
> + return 256-0xC0 + (i_id & 0xff);
> + else if( (i_id & 0xff00) == 0xfd00 )
> + return 512-0xc0 + (i_id & 0xff);
> + else
> + return 768-0xc0 + (i_id & 0x07);
> +}
> +#define PS_ID_TO_TK( id ) ps_id_to_tk( id )
> +#endif
I've been meaning to look at this because it looks a prime candidate
for a switch() instead of some stacked if() statements. But, the input
seems to come from a uint8_t *, so I'm wondering whether this isn't
essentially dead code anyhow.
Could someone clarify this please?
More information about the vlc-devel
mailing list