[FFmpeg-soc] [soc]: r244 - dirac/dirac.c

Luca Barbato lu_zero at gentoo.org
Sun Jun 10 17:14:14 CEST 2007


marco wrote:
> Add initial code for the decoder, this code is far from finished and
> has not been cleaned up.  Please do not review it yet.

I'll just point cosmetic issues then



> +typedef enum {
> +    pc_access_unit_header = 0x00,
> +    pc_eos = 0x10,
> +    pc_aux_data = 0x20,
> +    pc_padding = 0x60,
> +    pc_intra_ref = 0x0c
> +} parse_code_t;

align the values to stay in a single column

> +
> +typedef enum {
> +    subband_ll = 0,
> +    subband_hl = 1,
> +    subband_lh = 2,
> +    subband_hh = 3
> +} subband_t;
> +

cf previous comment

> +
> +static int parse_access_unit_header (AVCodecContext *avctx, GetBitContext *gb) {
> +    DiracContext *s = avctx->priv_data;
> +    uint32_t version_major;
> +    uint32_t version_minor;
> +    uint32_t video_format;

why uint32_t ? If you do not need *exactly* 32bit int you should use the
generic type.

> +    /* Set custom dimensions.  */
> +    /* Set chroma format.  */

Set or get?

> +    /* Access Unit Source parameters.  */
> +
> +    if (get_bits(gb, 1)) {
> +        /* Interlace.  */
> +        dprintf(avctx, "Interlace!\n");
> +        /* XXX: Currently not supported */
> +    }
> +
> +    /* Framerate.  */
> +    if (get_bits(gb, 1)) {
> +        int idx = dirac_golomb(gb);
> +        if (! idx) {
> +            s->framerate_numer = dirac_golomb(gb);//svq3_get_ue_golomb(gb);
> +            s->framerate_denom = dirac_golomb(gb);//svq3_get_ue_golomb(gb);

what about using AVRational for that?

lu

-- 

Luca Barbato

Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero



More information about the FFmpeg-soc mailing list