libavfilter/libmpcodecs/vf_2xsai.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include "config.h"
#include "mp_msg.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"

Go to the source code of this file.

Defines

#define makecol(r, g, b)   (r+(g<<8)+(b<<16))
#define makecol_depth(d, r, g, b)   (r+(g<<8)+(b<<16))
#define GET_RESULT(A, B, C, D)   ((A != C || A != D) - (B != C || B != D))
#define INTERPOLATE(A, B)   (((A & colorMask) >> 1) + ((B & colorMask) >> 1) + (A & B & lowPixelMask))
#define Q_INTERPOLATE(A, B, C, D)

Functions

static int Init_2xSaI (int d)
static void Super2xSaI_ex (uint8_t *src, uint32_t src_pitch, uint8_t *dst, uint32_t dst_pitch, uint32_t width, uint32_t height, int sbpp)
static int config (struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt)
static int put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
static int query_format (struct vf_instance *vf, unsigned int fmt)
static int vf_open (vf_instance_t *vf, char *args)

Variables

static uint32_t colorMask = 0xF7DEF7DE
static uint32_t lowPixelMask = 0x08210821
static uint32_t qcolorMask = 0xE79CE79C
static uint32_t qlowpixelMask = 0x18631863
static uint32_t redblueMask = 0xF81F
static uint32_t greenMask = 0x7E0
static int PixelsPerMask = 2
const vf_info_t vf_info_2xsai


Define Documentation

#define GET_RESULT ( A,
B,
C,
 )     ((A != C || A != D) - (B != C || B != D))

Definition at line 90 of file vf_2xsai.c.

Referenced by Super2xSaI_ex().

#define INTERPOLATE ( A,
 )     (((A & colorMask) >> 1) + ((B & colorMask) >> 1) + (A & B & lowPixelMask))

Definition at line 92 of file vf_2xsai.c.

#define makecol ( r,
g,
 )     (r+(g<<8)+(b<<16))

Definition at line 43 of file vf_2xsai.c.

Referenced by Init_2xSaI().

#define makecol_depth ( d,
r,
g,
 )     (r+(g<<8)+(b<<16))

Definition at line 44 of file vf_2xsai.c.

Referenced by Init_2xSaI().

#define Q_INTERPOLATE ( A,
B,
C,
 ) 

Value:

((A & qcolorMask) >> 2) + ((B & qcolorMask) >> 2) + ((C & qcolorMask) >> 2) + ((D & qcolorMask) >> 2) \
        + ((((A & qlowpixelMask) + (B & qlowpixelMask) + (C & qlowpixelMask) + (D & qlowpixelMask)) >> 2) & qlowpixelMask)

Definition at line 94 of file vf_2xsai.c.

Referenced by Super2xSaI_ex().


Function Documentation

static int config ( struct vf_instance vf,
int  width,
int  height,
int  d_width,
int  d_height,
unsigned int  flags,
unsigned int  outfmt 
) [static]

Definition at line 284 of file vf_2xsai.c.

Referenced by dshow_cycle_formats(), parse_fmtp_config(), and vf_open().

static int Init_2xSaI ( int  d  )  [static]

Definition at line 46 of file vf_2xsai.c.

Referenced by config().

static int put_image ( struct vf_instance vf,
mp_image_t mpi,
double  pts 
) [static]

Definition at line 293 of file vf_2xsai.c.

Referenced by control(), open(), and vf_open().

static int query_format ( struct vf_instance vf,
unsigned int  fmt 
) [static]

Definition at line 310 of file vf_2xsai.c.

Referenced by vf_open().

static void Super2xSaI_ex ( uint8_t *  src,
uint32_t  src_pitch,
uint8_t *  dst,
uint32_t  dst_pitch,
uint32_t  width,
uint32_t  height,
int  sbpp 
) [static]

Definition at line 98 of file vf_2xsai.c.

Referenced by put_image().

static int vf_open ( vf_instance_t vf,
char *  args 
) [static]

Definition at line 320 of file vf_2xsai.c.


Variable Documentation

uint32_t colorMask = 0xF7DEF7DE [static]

Definition at line 35 of file vf_2xsai.c.

Referenced by Init_2xSaI().

uint32_t greenMask = 0x7E0 [static]

Definition at line 40 of file vf_2xsai.c.

Referenced by Init_2xSaI().

uint32_t lowPixelMask = 0x08210821 [static]

Definition at line 36 of file vf_2xsai.c.

Referenced by Init_2xSaI().

int PixelsPerMask = 2 [static]

Definition at line 41 of file vf_2xsai.c.

Referenced by Init_2xSaI(), and Super2xSaI_ex().

uint32_t qcolorMask = 0xE79CE79C [static]

Definition at line 37 of file vf_2xsai.c.

Referenced by Init_2xSaI().

uint32_t qlowpixelMask = 0x18631863 [static]

Definition at line 38 of file vf_2xsai.c.

Referenced by Init_2xSaI().

uint32_t redblueMask = 0xF81F [static]

Definition at line 39 of file vf_2xsai.c.

Referenced by Init_2xSaI().

Initial value:

 {
    "2xSai BGR bitmap 2x scaler",
    "2xsai",
    "A'rpi",
    "http://elektron.its.tudelft.nl/~dalikifa/",
    vf_open,
    NULL
}

Definition at line 327 of file vf_2xsai.c.


Generated on Thu Apr 12 19:21:13 2012 for FFmpeg by  doxygen 1.5.8