[FFmpeg-devel] [PATCH 3/4] VP4 data tables

Carl Eugen Hoyos ceffmpeg at gmail.com
Sun Jan 6 14:02:32 EET 2019


2019-01-06 8:43 GMT+01:00, Peter Ross <pross at xvid.org>:

> +static const uint32_t vp4_generic_dequant[64] = {
> +    16, 17, 18, 20, 22, 24, 26, 28,
> +    17, 18, 20, 22, 24, 26, 28, 32,
> +    18, 20, 22, 24, 26, 28, 32, 36,
> +    20, 22, 24, 26, 28, 32, 36, 40,
> +    22, 24, 26, 28, 32, 36, 40, 44,
> +    24, 26, 28, 32, 36, 40, 44, 48,
> +    26, 28, 32, 36, 40, 44, 48, 52,
> +    28, 32, 36, 40, 44, 48, 52, 56
> +};
> +
> +static const uint32_t vp4_y_dc_scale_factor[64] = {
> +    180, 180, 180, 180, 180, 180, 175, 170,
> +    165, 160, 157, 155, 152, 150, 147, 145,
> +    142, 140, 137, 135, 132, 130, 127, 125,
> +    122, 120, 117, 115, 112, 110, 107, 105,
> +    102, 100,  97,  95,  92,  90,  87,  85,
> +     82,  80,  77,  75,  72,  70,  67,  65,
> +     62,  60,  57,  55,  52,  50,  47,  45,
> +     42,  40,  37,  35,  32,  30,  27,  25
> +};
> +
> +static const uint32_t vp4_uv_dc_scale_factor[64] = {
> +    150, 150, 150, 150, 150, 150, 150, 150,
> +    150, 150, 150, 150, 150, 150, 147, 145,
> +    142, 140, 137, 135, 132, 130, 127, 125,
> +    122, 120, 117, 115, 112, 110, 107, 105,
> +    102, 100,  97,  95,  92,  90,  87,  85,
> +     82,  80,  77,  75,  72,  70,  67,  65,
> +     62,  60,  57,  55,  52,  50,  47,  45,
> +     42,  40,  37,  35,  32,  30,  27,  25
> +};

If there is a performance reason why they are not uint8_t,
please mention it in a comment.

Carl Eugen


More information about the ffmpeg-devel mailing list