c4d7e5e67e
This eliminates a large set of warnings exposed by the Mozilla build system (Use of C++ comments in ISO C90 source, commas at the end of enum lists, a couple incomplete initializers, and signed/unsigned comparisons). It also eliminates many (but not all) of the warnings expose by newer GCC versions and _FORTIFY_SOURCE (e.g., calling fread and fwrite without checking the return values). There are a few spurious warnings left on my system: ../vp8/encoder/encodemb.c:274:9: warning: 'sz' may be used uninitialized in this function gcc seems to be unable to figure out that the value shortcut doesn't change between the two if blocks that test it here. ../vp8/encoder/onyx_if.c:5314:5: warning: comparison of unsigned expression >= 0 is always true ../vp8/encoder/onyx_if.c:5319:5: warning: comparison of unsigned expression >= 0 is always true This is true, so far as it goes, but it's comparing against an enum, and the C standard does not mandate that enums be unsigned, so the checks can't be removed. Change-Id: Iaf689ae3e3d0ddc5ade00faa474debe73b8d3395
100 lines
2.7 KiB
C
100 lines
2.7 KiB
C
/*
|
|
* Copyright (c) 2010 The WebM project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
|
|
#ifndef __INC_RECON_H
|
|
#define __INC_RECON_H
|
|
|
|
#include "blockd.h"
|
|
|
|
#define prototype_copy_block(sym) \
|
|
void sym(unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch)
|
|
|
|
#define prototype_recon_block(sym) \
|
|
void sym(unsigned char *pred, short *diff, unsigned char *dst, int pitch)
|
|
|
|
#define prototype_recon_macroblock(sym) \
|
|
void sym(const struct vp8_recon_rtcd_vtable *rtcd, MACROBLOCKD *x)
|
|
|
|
struct vp8_recon_rtcd_vtable;
|
|
|
|
#if ARCH_X86 || ARCH_X86_64
|
|
#include "x86/recon_x86.h"
|
|
#endif
|
|
|
|
#if ARCH_ARM
|
|
#include "arm/recon_arm.h"
|
|
#endif
|
|
|
|
#ifndef vp8_recon_copy16x16
|
|
#define vp8_recon_copy16x16 vp8_copy_mem16x16_c
|
|
#endif
|
|
extern prototype_copy_block(vp8_recon_copy16x16);
|
|
|
|
#ifndef vp8_recon_copy8x8
|
|
#define vp8_recon_copy8x8 vp8_copy_mem8x8_c
|
|
#endif
|
|
extern prototype_copy_block(vp8_recon_copy8x8);
|
|
|
|
#ifndef vp8_recon_copy8x4
|
|
#define vp8_recon_copy8x4 vp8_copy_mem8x4_c
|
|
#endif
|
|
extern prototype_copy_block(vp8_recon_copy8x4);
|
|
|
|
#ifndef vp8_recon_recon
|
|
#define vp8_recon_recon vp8_recon_b_c
|
|
#endif
|
|
extern prototype_recon_block(vp8_recon_recon);
|
|
|
|
#ifndef vp8_recon_recon2
|
|
#define vp8_recon_recon2 vp8_recon2b_c
|
|
#endif
|
|
extern prototype_recon_block(vp8_recon_recon2);
|
|
|
|
#ifndef vp8_recon_recon4
|
|
#define vp8_recon_recon4 vp8_recon4b_c
|
|
#endif
|
|
extern prototype_recon_block(vp8_recon_recon4);
|
|
|
|
#ifndef vp8_recon_recon_mb
|
|
#define vp8_recon_recon_mb vp8_recon_mb_c
|
|
#endif
|
|
extern prototype_recon_macroblock(vp8_recon_recon_mb);
|
|
|
|
#ifndef vp8_recon_recon_mby
|
|
#define vp8_recon_recon_mby vp8_recon_mby_c
|
|
#endif
|
|
extern prototype_recon_macroblock(vp8_recon_recon_mby);
|
|
|
|
typedef prototype_copy_block((*vp8_copy_block_fn_t));
|
|
typedef prototype_recon_block((*vp8_recon_fn_t));
|
|
typedef prototype_recon_macroblock((*vp8_recon_mb_fn_t));
|
|
typedef struct vp8_recon_rtcd_vtable
|
|
{
|
|
vp8_copy_block_fn_t copy16x16;
|
|
vp8_copy_block_fn_t copy8x8;
|
|
vp8_copy_block_fn_t copy8x4;
|
|
vp8_recon_fn_t recon;
|
|
vp8_recon_fn_t recon2;
|
|
vp8_recon_fn_t recon4;
|
|
vp8_recon_mb_fn_t recon_mb;
|
|
vp8_recon_mb_fn_t recon_mby;
|
|
} vp8_recon_rtcd_vtable_t;
|
|
|
|
#if CONFIG_RUNTIME_CPU_DETECT
|
|
#define RECON_INVOKE(ctx,fn) (ctx)->fn
|
|
#else
|
|
#define RECON_INVOKE(ctx,fn) vp8_recon_##fn
|
|
#endif
|
|
|
|
void vp8_recon_intra4x4mb(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
|
|
void vp8_recon_intra_mbuv(const vp8_recon_rtcd_vtable_t *rtcd, MACROBLOCKD *x);
|
|
#endif
|