22#ifndef IMAGE_CODECS_MSMPEG4_VC1_H
23#define IMAGE_CODECS_MSMPEG4_VC1_H
25#include "common/scummsys.h"
30extern const uint16 ff_msmp4_mb_i_table[64][2];
31extern const uint32 ff_msmp4_dc_tables[2][2][120][2];
43inline void putHalfPixels(
byte *dst,
const byte *src, ptrdiff_t pitch,
int height,
44 int mode,
bool noRounding,
bool average =
false) {
45 for (
int y = 0; y < height; ++y) {
46 for (
int x = 0; x < width; ++x) {
49 value = (src[x] + src[x + 1] + !noRounding) >> 1;
51 value = (src[x] + src[x + pitch] + !noRounding) >> 1;
53 value = (src[x] + src[x + 1] + src[x + pitch] + src[x + pitch + 1] + (noRounding ? 1 : 2)) >> 2;
54 dst[x] = average ? (dst[x] + value + 1) >> 1 : value;