Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs
drm_fixed.h File Reference

Go to the source code of this file.

Data Structures

union  dfixed
 

Macros

#define dfixed_const(A)   (u32)(((A) << 12))/* + ((B + 0.000122)*4096)) */
 
#define dfixed_const_half(A)   (u32)(((A) << 12) + 2048)
 
#define dfixed_const_666(A)   (u32)(((A) << 12) + 2731)
 
#define dfixed_const_8(A)   (u32)(((A) << 12) + 3277)
 
#define dfixed_mul(A, B)   ((u64)((u64)(A).full * (B).full + 2048) >> 12)
 
#define dfixed_init(A)   { .full = dfixed_const((A)) }
 
#define dfixed_init_half(A)   { .full = dfixed_const_half((A)) }
 
#define dfixed_trunc(A)   ((A).full >> 12)
 
#define dfixed_frac(A)   ((A).full & ((1 << 12) - 1))
 

Typedefs

typedef union dfixed fixed20_12
 

Macro Definition Documentation

#define dfixed_const (   A)    (u32)(((A) << 12))/* + ((B + 0.000122)*4096)) */

Definition at line 32 of file drm_fixed.h.

#define dfixed_const_666 (   A)    (u32)(((A) << 12) + 2731)

Definition at line 34 of file drm_fixed.h.

#define dfixed_const_8 (   A)    (u32)(((A) << 12) + 3277)

Definition at line 35 of file drm_fixed.h.

#define dfixed_const_half (   A)    (u32)(((A) << 12) + 2048)

Definition at line 33 of file drm_fixed.h.

#define dfixed_frac (   A)    ((A).full & ((1 << 12) - 1))

Definition at line 40 of file drm_fixed.h.

#define dfixed_init (   A)    { .full = dfixed_const((A)) }

Definition at line 37 of file drm_fixed.h.

#define dfixed_init_half (   A)    { .full = dfixed_const_half((A)) }

Definition at line 38 of file drm_fixed.h.

#define dfixed_mul (   A,
  B 
)    ((u64)((u64)(A).full * (B).full + 2048) >> 12)

Definition at line 36 of file drm_fixed.h.

#define dfixed_trunc (   A)    ((A).full >> 12)

Definition at line 39 of file drm_fixed.h.

Typedef Documentation

typedef union dfixed fixed20_12