Logo Search packages:      
Sourcecode: blender version File versions  Download package

imgconvert.c File Reference


Detailed Description

Misc image convertion routines.

Definition in file imgconvert.c.

#include "avcodec.h"
#include "dsputil.h"
#include "imgconvert_template.h"

Go to the source code of this file.

Classes

struct  ConvertEntry
struct  PixFmtInfo

Defines

#define BPP   4
#define BPP   3
#define BPP   3
#define BPP   2
#define BPP   2
#define C_CCIR_TO_JPEG(y)   cm[(((y) - 128) * FIX(127.0/112.0) + (ONE_HALF + (128 << SCALEBITS))) >> SCALEBITS]
#define FF_COLOR_GRAY   1
#define FF_COLOR_RGB   0
#define FF_COLOR_YUV   2
#define FF_COLOR_YUV_JPEG   3
#define FF_PIXEL_PACKED   1
#define FF_PIXEL_PALETTE   2
#define FF_PIXEL_PLANAR   0
#define FIX(x)   ((int) ((x) * (1<<SCALEBITS) + 0.5))
#define FMT_RGB24
#define FMT_RGBA32
#define glue(x, y)   xglue(x, y)
#define ONE_HALF   (1 << (SCALEBITS - 1))
#define RGB_IN(r, g, b, s)
#define RGB_IN(r, g, b, s)
#define RGB_IN(r, g, b, s)
#define RGB_IN(r, g, b, s)
#define RGB_IN(r, g, b, s)
#define RGB_NAME   rgba32
#define RGB_NAME   rgb24
#define RGB_NAME   bgr24
#define RGB_NAME   rgb565
#define RGB_NAME   rgb555
#define RGB_OUT(d, r, g, b)
#define RGB_OUT(d, r, g, b)
#define RGB_OUT(d, r, g, b)
#define RGB_TO_U(r1, g1, b1, shift)
#define RGB_TO_U_CCIR(r1, g1, b1, shift)
#define RGB_TO_V(r1, g1, b1, shift)
#define RGB_TO_V_CCIR(r1, g1, b1, shift)
#define RGB_TO_Y(r, g, b)
#define RGB_TO_Y_CCIR(r, g, b)
#define RGBA_IN(r, g, b, a, s)
#define RGBA_IN(r, g, b, a, s)
#define RGBA_OUT(d, r, g, b, a)
#define RGBA_OUT(d, r, g, b, a)
#define SCALEBITS   10
#define TRANSP_INDEX   (6*6*6)
#define xglue(x, y)   x ## y
#define Y_CCIR_TO_JPEG(y)   cm[((y) * FIX(255.0/219.0) + (ONE_HALF - 16 * FIX(255.0/219.0))) >> SCALEBITS]
#define Y_JPEG_TO_CCIR(y)   (((y) * FIX(219.0/255.0) + (ONE_HALF + (16 << SCALEBITS))) >> SCALEBITS)
#define YUV_TO_RGB1(cb1, cr1)
#define YUV_TO_RGB1_CCIR(cb1, cr1)
#define YUV_TO_RGB2(r, g, b, y1)
#define YUV_TO_RGB2_CCIR(r, g, b, y1)

Functions

int avcodec_find_best_pix_fmt (int pix_fmt_mask, int src_pix_fmt, int has_alpha, int *loss_ptr)
static int avcodec_find_best_pix_fmt1 (int pix_fmt_mask, int src_pix_fmt, int has_alpha, int loss_mask)
void avcodec_get_chroma_sub_sample (int pix_fmt, int *h_shift, int *v_shift)
enum PixelFormat avcodec_get_pix_fmt (const char *name)
int avcodec_get_pix_fmt_loss (int dst_pix_fmt, int src_pix_fmt, int has_alpha)
const char * avcodec_get_pix_fmt_name (int pix_fmt)
static int avg_bits_per_pixel (int pix_fmt)
int avpicture_alloc (AVPicture *picture, int pix_fmt, int width, int height)
int avpicture_deinterlace (AVPicture *dst, const AVPicture *src, int pix_fmt, int width, int height)
int avpicture_fill (AVPicture *picture, uint8_t *ptr, int pix_fmt, int width, int height)
void avpicture_free (AVPicture *picture)
int avpicture_get_size (int pix_fmt, int width, int height)
int avpicture_layout (const AVPicture *src, int pix_fmt, int width, int height, unsigned char *dest, int dest_size)
static unsigned int bitcopy_n (unsigned int a, int n)
static void build_rgb_palette (uint8_t *palette, int has_alpha)
static int C_JPEG_TO_CCIR (int y)
static void conv411 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
static void deinterlace_bottom_field (uint8_t *dst, int dst_wrap, const uint8_t *src1, int src_wrap, int width, int height)
static void deinterlace_bottom_field_inplace (uint8_t *src1, int src_wrap, int width, int height)
static void deinterlace_line (uint8_t *dst, const uint8_t *lum_m4, const uint8_t *lum_m3, const uint8_t *lum_m2, const uint8_t *lum_m1, const uint8_t *lum, int size)
static void deinterlace_line_inplace (uint8_t *lum_m4, uint8_t *lum_m3, uint8_t *lum_m2, uint8_t *lum_m1, uint8_t *lum, int size)
void ff_img_copy_plane (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
void ff_shrink22 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
void ff_shrink44 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
void ff_shrink88 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
static int get_alpha_info_pal8 (const AVPicture *src, int width, int height)
static unsigned char gif_clut_index (uint8_t r, uint8_t g, uint8_t b)
static void gray_to_mono (AVPicture *dst, const AVPicture *src, int width, int height, int xor_mask)
static void gray_to_monoblack (AVPicture *dst, const AVPicture *src, int width, int height)
static void gray_to_monowhite (AVPicture *dst, const AVPicture *src, int width, int height)
static void grow21 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
static void grow21_line (uint8_t *dst, const uint8_t *src, int width)
static void grow22 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
static void grow41 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
static void grow41_line (uint8_t *dst, const uint8_t *src, int width)
static void grow44 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
static void img_apply_table (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height, const uint8_t *table1)
int img_convert (AVPicture *dst, int dst_pix_fmt, const AVPicture *src, int src_pix_fmt, int src_width, int src_height)
static void img_convert_init (void)
void img_copy (AVPicture *dst, const AVPicture *src, int pix_fmt, int width, int height)
int img_crop (AVPicture *dst, const AVPicture *src, int pix_fmt, int top_band, int left_band)
int img_get_alpha_info (const AVPicture *src, int pix_fmt, int width, int height)
int img_pad (AVPicture *dst, const AVPicture *src, int height, int width, int pix_fmt, int padtop, int padbottom, int padleft, int padright, int *color)
static int is_yuv_planar (PixFmtInfo *ps)
static void mono_to_gray (AVPicture *dst, const AVPicture *src, int width, int height, int xor_mask)
static void monoblack_to_gray (AVPicture *dst, const AVPicture *src, int width, int height)
static void monowhite_to_gray (AVPicture *dst, const AVPicture *src, int width, int height)
static void shrink12 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
static void shrink21 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
static void shrink41 (uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height)
static void uyvy411_to_yuv411p (AVPicture *dst, const AVPicture *src, int width, int height)
static void uyvy422_to_yuv420p (AVPicture *dst, const AVPicture *src, int width, int height)
static void uyvy422_to_yuv422p (AVPicture *dst, const AVPicture *src, int width, int height)
static void yuv420p_to_uyvy422 (AVPicture *dst, const AVPicture *src, int width, int height)
static void yuv420p_to_yuv422 (AVPicture *dst, const AVPicture *src, int width, int height)
static void yuv422_to_yuv420p (AVPicture *dst, const AVPicture *src, int width, int height)
static void yuv422_to_yuv422p (AVPicture *dst, const AVPicture *src, int width, int height)
static void yuv422p_to_uyvy422 (AVPicture *dst, const AVPicture *src, int width, int height)
static void yuv422p_to_yuv422 (AVPicture *dst, const AVPicture *src, int width, int height)

Variables

static uint8_t c_ccir_to_jpeg [256]
static uint8_t c_jpeg_to_ccir [256]
static ConvertEntry convert_table [PIX_FMT_NB][PIX_FMT_NB]
static PixFmtInfo pix_fmt_info [PIX_FMT_NB]
static uint8_t y_ccir_to_jpeg [256]
static uint8_t y_jpeg_to_ccir [256]


Generated by  Doxygen 1.6.0   Back to index