Harlequin RIP SDK
gfiltrav.c File Reference

The averaging filter for anti-aliasing and reduced roam. More...

#include "std.h"
#include "gfiltrav.h"
#include "hqmemset.h"
#include "hqmemcpy.h"
#include "rowsum.h"

Data Structures

struct  averaging_info
 

Macros

#define ROUND(dividend, divisor)   (((dividend) + (divisor)/2) / (divisor))
 
#define CLIPPED_ADD8(sum, a, b)
 
#define CLIPPED_SUB8(diff, a, b)
 
#define NEXT_MASK_WORD()
 
#define STORE_COMP(comp)
 
#define STORE_COUNT()
 

Detailed Description

The averaging filter for anti-aliasing and reduced roam.

Copyright (c) 2017 Global Graphics Software Ltd. All Rights Reserved.

This example is provided on an "as is" basis and without warranty of any kind. Global Graphics Software Ltd. does not warrant or make any representations regarding the use or results of use of this example.

Macro Definition Documentation

◆ CLIPPED_ADD8

#define CLIPPED_ADD8 (   sum,
  a,
 
)
Value:
MACRO_START \
unsigned int sumraw_ = (a) + (b); \
(sum) = (sumraw_ > 0xFF) ? 0xFF : (uint8)sumraw_; \
MACRO_END
uint8_t uint8
8-bit unsigned integer
Definition: hqtypes.h:88

Add two unsigned 8-bit values, clipping to 8-bit range.

◆ CLIPPED_SUB8

#define CLIPPED_SUB8 (   diff,
  a,
 
)
Value:
MACRO_START \
int diffraw_ = (a) - (b); \
(diff) = (diffraw_ < 0) ? 0 : (uint8)diffraw_; \
MACRO_END

Subtract two unsigned 8-bit values, clipping to 8-bit range.

◆ NEXT_MASK_WORD

#define NEXT_MASK_WORD ( )
Value:
MACRO_START \
if ( 0 == andMask ) { \
andMask = andMaskInit; \
currMask = *++mask; \
} \
MACRO_END

Step mask at a word boundary.

Helper for sum_partial_row_*.

◆ ROUND

#define ROUND (   dividend,
  divisor 
)    (((dividend) + (divisor)/2) / (divisor))

Division with rounding.

◆ STORE_COMP

#define STORE_COMP (   comp)
Value:
MACRO_START \
if ( acc##comp > 0 ) \
*to += acc##comp; \
++to; \
MACRO_END

Store accumulator component into output accumulator.

Helper for sum_partial_row_*.

◆ STORE_COUNT

#define STORE_COUNT ( )
Value:
MACRO_START \
if ( count > 0 ) \
*pCount += (uint8)count; \
++pCount; \
MACRO_END

Store accumulated count into output counter array.

Helper for sum_partial_row_*.