libavcodec/imgconvert.c File Reference

misc image conversion routines More...

#include "avcodec.h"
#include "dsputil.h"
#include "internal.h"
#include "imgconvert.h"
#include "libavutil/colorspace.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"

Go to the source code of this file.

Data Structures

struct  PixFmtInfo

Defines

#define FF_COLOR_RGB   0
 RGB color space.
#define FF_COLOR_GRAY   1
 gray color space
#define FF_COLOR_YUV   2
 YUV color space.
#define FF_COLOR_YUV_JPEG   3
 YUV color space.
#define deinterlace_line_inplace   deinterlace_line_inplace_c
#define deinterlace_line   deinterlace_line_c
#define pixdesc_has_alpha(pixdesc)   ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & PIX_FMT_PAL)

Functions

void avcodec_get_chroma_sub_sample (enum PixelFormat pix_fmt, int *h_shift, int *v_shift)
int ff_is_hwaccel_pix_fmt (enum PixelFormat pix_fmt)
 Determine whether pix_fmt is a hardware accelerated format.
int avpicture_fill (AVPicture *picture, uint8_t *ptr, enum PixelFormat pix_fmt, int width, int height)
 Fill in the AVPicture fields.
int avpicture_layout (const AVPicture *src, enum PixelFormat pix_fmt, int width, int height, unsigned char *dest, int dest_size)
 Copy pixel data from an AVPicture into a buffer.
int avpicture_get_size (enum PixelFormat pix_fmt, int width, int height)
 Calculate the size in bytes that a picture of the given width and height would occupy if stored in the given picture format.
static int get_pix_fmt_depth (int *min, int *max, enum PixelFormat pix_fmt)
int avcodec_get_pix_fmt_loss (enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt, int has_alpha)
 Compute what kind of losses will occur when converting from one specific pixel format to another.
static int avg_bits_per_pixel (enum PixelFormat pix_fmt)
enum PixelFormat avcodec_find_best_pix_fmt (int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
 Find the best pixel format to convert to given a certain source pixel format.
enum PixelFormat avcodec_find_best_pix_fmt2 (enum PixelFormat dst_pix_fmt1, enum PixelFormat dst_pix_fmt2, enum PixelFormat src_pix_fmt, int has_alpha, int *loss_ptr)
 Find the best pixel format to convert to given a certain source pixel format and a selection of two destination pixel formats.
void av_picture_copy (AVPicture *dst, const AVPicture *src, enum PixelFormat pix_fmt, int width, int height)
 Copy image src to dst.
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)
int avpicture_alloc (AVPicture *picture, enum PixelFormat pix_fmt, int width, int height)
 Allocate memory for a picture.
void avpicture_free (AVPicture *picture)
 Free a picture previously allocated by avpicture_alloc().
static int is_yuv_planar (enum PixelFormat fmt)
int av_picture_crop (AVPicture *dst, const AVPicture *src, enum PixelFormat pix_fmt, int top_band, int left_band)
 Crop image top and left side.
int av_picture_pad (AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt, int padtop, int padbottom, int padleft, int padright, int *color)
 Pad image.
static void deinterlace_line_c (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_c (uint8_t *lum_m4, uint8_t *lum_m3, uint8_t *lum_m2, uint8_t *lum_m1, uint8_t *lum, int size)
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)
int avpicture_deinterlace (AVPicture *dst, const AVPicture *src, enum PixelFormat pix_fmt, int width, int height)
 deinterlace - if not supported return -1

Variables

static const PixFmtInfo pix_fmt_info [PIX_FMT_NB]


Detailed Description

misc image conversion routines

Definition in file imgconvert.c.


Define Documentation

#define deinterlace_line   deinterlace_line_c

Definition at line 55 of file imgconvert.c.

Referenced by deinterlace_bottom_field().

#define deinterlace_line_inplace   deinterlace_line_inplace_c

Definition at line 54 of file imgconvert.c.

Referenced by deinterlace_bottom_field_inplace().

#define FF_COLOR_GRAY   1

gray color space

Definition at line 46 of file imgconvert.c.

Referenced by avcodec_get_pix_fmt_loss().

#define FF_COLOR_RGB   0

RGB color space.

Definition at line 45 of file imgconvert.c.

Referenced by avcodec_get_pix_fmt_loss().

#define FF_COLOR_YUV   2

YUV color space.

16 <= Y <= 235, 16 <= U, V <= 240

Definition at line 47 of file imgconvert.c.

Referenced by avcodec_get_pix_fmt_loss(), and is_yuv_planar().

#define FF_COLOR_YUV_JPEG   3

YUV color space.

0 <= Y <= 255, 0 <= U, V <= 255

Definition at line 48 of file imgconvert.c.

Referenced by avcodec_get_pix_fmt_loss(), and is_yuv_planar().

#define pixdesc_has_alpha ( pixdesc   )     ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & PIX_FMT_PAL)

Definition at line 58 of file imgconvert.c.

Referenced by avcodec_get_pix_fmt_loss().


Function Documentation

static int avg_bits_per_pixel ( enum PixelFormat  pix_fmt  )  [static]

Definition at line 454 of file imgconvert.c.

Referenced by avcodec_find_best_pix_fmt2().

static void deinterlace_bottom_field ( uint8_t dst,
int  dst_wrap,
const uint8_t src1,
int  src_wrap,
int  width,
int  height 
) [static]

Definition at line 800 of file imgconvert.c.

Referenced by avpicture_deinterlace().

static void deinterlace_bottom_field_inplace ( uint8_t src1,
int  src_wrap,
int  width,
int  height 
) [static]

Definition at line 829 of file imgconvert.c.

Referenced by avpicture_deinterlace().

static void deinterlace_line_c ( 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]

Definition at line 748 of file imgconvert.c.

static void deinterlace_line_inplace_c ( uint8_t lum_m4,
uint8_t lum_m3,
uint8_t lum_m2,
uint8_t lum_m1,
uint8_t lum,
int  size 
) [static]

Definition at line 773 of file imgconvert.c.

int ff_is_hwaccel_pix_fmt ( enum PixelFormat  pix_fmt  ) 

Determine whether pix_fmt is a hardware accelerated format.

Definition at line 291 of file imgconvert.c.

Referenced by avcodec_default_get_format().

void ff_shrink22 ( uint8_t dst,
int  dst_wrap,
const uint8_t src,
int  src_wrap,
int  width,
int  height 
)

Definition at line 529 of file imgconvert.c.

Referenced by ff_dsputil_init().

void ff_shrink44 ( uint8_t dst,
int  dst_wrap,
const uint8_t src,
int  src_wrap,
int  width,
int  height 
)

Definition at line 562 of file imgconvert.c.

Referenced by ff_dsputil_init().

void ff_shrink88 ( uint8_t dst,
int  dst_wrap,
const uint8_t src,
int  src_wrap,
int  width,
int  height 
)

Definition at line 593 of file imgconvert.c.

Referenced by ff_dsputil_init().

static int get_pix_fmt_depth ( int *  min,
int *  max,
enum PixelFormat  pix_fmt 
) [static]

Definition at line 367 of file imgconvert.c.

Referenced by avcodec_get_pix_fmt_loss().

static int is_yuv_planar ( enum PixelFormat  fmt  )  [inline, static]

Definition at line 634 of file imgconvert.c.

Referenced by av_picture_crop(), and av_picture_pad().


Variable Documentation

const PixFmtInfo pix_fmt_info[PIX_FMT_NB] [static]

Definition at line 67 of file imgconvert.c.


Generated on Fri Oct 26 02:47:57 2012 for FFmpeg by  doxygen 1.5.8