libavfilter/libmpcodecs/vf_palette.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
#include "mpbswap.h"
#include "libswscale/swscale.h"
#include "libavutil/avstring.h"

Go to the source code of this file.

Data Structures

struct  vf_priv_s

Functions

static void palette8torgb16 (const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
 Palette is assumed to contain BGR16, see rgb32to16 to convert the palette.
static void palette8tobgr16 (const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
static unsigned int find_best (struct vf_instance *vf, unsigned int fmt)
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 void uninit (vf_instance_t *vf)
static int vf_open (vf_instance_t *vf, char *args)

Variables

static const unsigned int bgr_list []
static const unsigned int rgb_list []
static unsigned int gray_pal [256]
const vf_info_t vf_info_palette


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 100 of file vf_palette.c.

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

Definition at line 76 of file vf_palette.c.

static void palette8tobgr16 ( const uint8_t src,
uint8_t dst,
long  num_pixels,
const uint8_t palette 
) [static]

Definition at line 67 of file vf_palette.c.

Referenced by put_image().

static void palette8torgb16 ( const uint8_t src,
uint8_t dst,
long  num_pixels,
const uint8_t palette 
) [static]

Palette is assumed to contain BGR16, see rgb32to16 to convert the palette.

Definition at line 60 of file vf_palette.c.

Referenced by put_image().

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

Definition at line 114 of file vf_palette.c.

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

Definition at line 190 of file vf_palette.c.

static void uninit ( vf_instance_t vf  )  [static]

Definition at line 196 of file vf_palette.c.

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

Definition at line 200 of file vf_palette.c.


Variable Documentation

const unsigned int bgr_list[] [static]

Initial value:

Definition at line 42 of file vf_palette.c.

Referenced by find_best().

unsigned int gray_pal[256] [static]

Definition at line 74 of file vf_palette.c.

Referenced by put_image(), and vf_open().

const unsigned int rgb_list[] [static]

Initial value:

Definition at line 49 of file vf_palette.c.

Referenced by find_best().

Initial value:

 {
    "8bpp indexed (using palette) -> BGR 15/16/24/32 conversion",
    "palette",
    "A'rpi & Alex",
    "",
    vf_open,
    NULL
}

Definition at line 227 of file vf_palette.c.


Generated on Fri Oct 26 02:48:01 2012 for FFmpeg by  doxygen 1.5.8