[FFmpeg-devel] [PATCH] Indeo 5 decoder
Alexander Strange
astrange
Mon Feb 1 08:38:33 CET 2010
On Feb 1, 2010, at 2:17 AM, Kostya wrote:
> $subj
> <indeo5.patch>
> +/**
> + * standard picture dimensions (width, height)
> + */
> +static uint16_t ivi5_common_pic_sizes[30] ...
static const, and the table's floated off to the right.
> + int buf_switch; ///< used to switch between three buffers
> + int dst_buf;
> + int ref_buf;
These are FFSWAPed lower down using uint8_t.
> + /* decode block and macroblock sizes */
> + mb_size = get_bits1(&ctx->gb);
> + blk_size = get_bits1(&ctx->gb) ? 4 : 8;
4 << get_bits1() if you want.
> + /* select transform function and scan pattern according with plane and band number */
> + switch ((p << 2) + i) {
"according with" -> "according to"
p * 4 + i saves parens.
> + /* select dequant matrix according with plane and band number */
Same.
> + band1 = &ctx->planes[1].bands[i];
> + band2 = &ctx->planes[2].bands[i];
> +
> + band2->width = band1->width;
> + band2->height = band1->height;
> + band2->mb_size = band1->mb_size;
> + band2->blk_size = band1->blk_size;
> + band2->is_halfpel = band1->is_halfpel;
> + band2->quant_mat = band1->quant_mat;
> + band2->scan = band1->scan;
> + band2->inv_transform = band1->inv_transform;
> + band2->dc_transform = band1->dc_transform;
> + band2->is_2d_trans = band1->is_2d_trans;
memcpy them?
> + /* decode rvmap probability corrections if any */
> + band->num_corr = 0; /* there is no corrections */
"there are"
IVIBandDesc in ivi_common seems to have a lot of int variables with bools stored in them too, but it's always hard to tell if those should be uint8_t or not.
More information about the ffmpeg-devel
mailing list