[FFmpeg-cvslog] r17345 - trunk/libavcodec/xvmc.h

Michael Niedermayer michaelni
Sun Feb 15 21:36:09 CET 2009


On Sun, Feb 15, 2009 at 09:13:00PM +0100, iive wrote:
> Author: iive
> Date: Sun Feb 15 21:13:00 2009
> New Revision: 17345
> 
> Log:
> Describe all fields in xvmc struct.

[...]
> +    /** Pointer to the block array allocated by XvMCCreateBlocks()
> +        it contins differential pixel data (in MoCo mode)
> +        or coefficients for IDCT.
> +        - application - set during initialization
> +        - libavcodec  - unchanged
> +    */
>      short*          data_blocks;

there are 2 things here
the pointer and the data it points to
why is it not allocated by lavc?


> +
> +    /** Pointer to the macroblock description array allocated by XvMCCreateMacroBlocks().
> +        - application - set during initialization
> +        - libavcodec  - unchanged
> +    */
>      XvMCMacroBlock* mv_blocks;

same


> +
> +    /** Number of all MB descriptions that could be stored in the mv_blocks array.
> +        - application - set during initialization
> +        - libavcodec  - unchanged
> +    */
>      int             total_number_of_mv_blocks;

allocated_num_of_mv_blocks seems a better name


> +
> +    /** Number of all blocks that could be stored at once in the data_blocks array.
> +        - application - set during initialization
> +        - libavcodec  - unchanged
> +    */
>      int             total_number_of_data_blocks;

same


> -    int             idct;                         ///< indicate that IDCT acceleration level is used
> -    int             unsigned_intra;               ///< +-128 for intra pictures after clipping
> -    XvMCSurface*    p_surface;                    ///< pointer to rendered surface, never changed
> +
> +    /** Indicates that the hardware would interpret data_blocks as IDCT cefficients
> +        and perform IDCT on them.
> +        - application - set during initialization
> +        - libavcodec  - unchanged
> +    */
> +    int             idct;

if this is set by the app, why are there 2 PIX_FMT_XVMC_MPEG2 ?

[...]
> +    /** top/bottom field or frame
> +        - application - unchanged
> +        - libavcodec  - set
> +    */
> +    unsigned int    picture_structure;

this should possibly rather be in AVFrame


> +
> +    /**XVMC_SECOND_FIELD - 1st or 2nd field in the sequence
> +        - application - unchanged
> +        - libavcodec  - set
> +    */
> +    unsigned int    flags;

picture_structure & top_field_first is not enough?

anyway this is pretty good alraedy
so +6 (from the remainig 8 for user vs. lavc clarifications)

diego 16
ivan 19.5

PS: its time you break compile again ;)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20090215/f79929b1/attachment.pgp>



More information about the ffmpeg-cvslog mailing list