tests/utils.c File Reference

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Defines

#define SCALEBITS   8
#define ONE_HALF   (1 << (SCALEBITS - 1))
#define FIX(x)   ((int) ((x) * (1L << SCALEBITS) + 0.5))
#define err_if(expr)
#define DEFAULT_WIDTH   352
#define DEFAULT_HEIGHT   288
#define DEFAULT_NB_PICT   50

Functions

static void rgb24_to_yuv420p (unsigned char *lum, unsigned char *cb, unsigned char *cr, unsigned char *src, int width, int height)
static void pgmyuv_save (const char *filename, int w, int h, unsigned char *rgb_tab)
static void put_pixel (int x, int y, int r, int g, int b)

Variables

static unsigned char * rgb_tab
static int width
static int height
static int wrap


Define Documentation

#define DEFAULT_HEIGHT   288

Definition at line 103 of file utils.c.

Referenced by main().

#define DEFAULT_NB_PICT   50

Definition at line 104 of file utils.c.

Referenced by main().

#define DEFAULT_WIDTH   352

Definition at line 102 of file utils.c.

Referenced by main().

#define err_if ( expr   ) 

Value:

do {                                              \
    if (expr) {                                                        \
        fprintf(stderr, "%s\n", strerror(errno));                      \
        exit(1);                                                       \
    }                                                                  \
} while (0)

Definition at line 30 of file utils.c.

Referenced by pgmyuv_save().

#define FIX (  )     ((int) ((x) * (1L << SCALEBITS) + 0.5))

Definition at line 28 of file utils.c.

#define ONE_HALF   (1 << (SCALEBITS - 1))

Definition at line 27 of file utils.c.

#define SCALEBITS   8

Definition at line 26 of file utils.c.


Function Documentation

static void pgmyuv_save ( const char *  filename,
int  w,
int  h,
unsigned char *  rgb_tab 
) [static]

Definition at line 106 of file utils.c.

Referenced by main().

static void put_pixel ( int  x,
int  y,
int  r,
int  g,
int  b 
) [static]

Definition at line 160 of file utils.c.

Referenced by gen_image().

static void rgb24_to_yuv420p ( unsigned char *  lum,
unsigned char *  cb,
unsigned char *  cr,
unsigned char *  src,
int  width,
int  height 
) [static]

Definition at line 37 of file utils.c.

Referenced by pgmyuv_save().


Variable Documentation

int height [static]

Definition at line 158 of file utils.c.

unsigned char* rgb_tab [static]

Definition at line 157 of file utils.c.

Referenced by main(), and put_pixel().

int width [static]

Definition at line 158 of file utils.c.

Referenced by apply_loop_filter(), av_parse_video_size(), avfilter_graph_dump_to_buf(), bink_decode_plane(), bitplane_decoding(), blend_slice(), bmp_decode_frame(), build_feed_streams(), calculate_display_rect(), cdxl_read_packet(), codecctl_int(), copy_block(), copy_frame(), dc1394_read_common(), decode_block(), decode_frame(), decode_frame_header(), decode_frame_headers(), decode_header(), decode_i2_frame(), decode_i_frame(), decode_p_frame(), decode_ppc(), decode_seq_header(), decode_subband_internal(), decode_vol_header(), draw_edges(), dump_enc_cfg(), encode_frame(), encode_picture_lossless(), encode_picture_ls(), execute_code(), ff_flv_decode_picture_header(), ff_h263_decode_picture_header(), ff_jpegls_decode_picture(), ff_mjpeg_decode_sof(), ff_print_debug_info(), ff_raw_read_header(), ff_vda_create_decoder(), gif_read_image(), gif_write_header(), idcin_read_header(), inter_predict(), INTERPOLATE_METHOD(), jpeg_parse_packet(), libopenjpeg_copy_unpacked16(), libopenjpeg_copy_unpacked8(), libopenjpeg_decode_frame(), main(), matroska_read_header(), mca(), mimic_decode_frame(), mov_read_tkhd(), mov_write_tapt_tag(), mpeg1_decode_sequence(), msnwc_tcp_probe(), msrle_decode_8_16_24_32(), mss4_decode_frame(), nuv_header(), optimum_block_width(), paint_mouse_pointer(), parse_picture(), parse_picture_segment(), process_frame_uyvy422(), process_frame_yuv420p(), process_frame_yuv422p(), process_ipmovie_chunk(), put_pixel(), qtrle_encode_line(), rawvideo_read_packet(), read_header(), rpza_decode_stream(), siff_parse_vbv1(), smc_decode_stream(), smush_read_header(), svq1_decode_block_intra(), svq1_decode_block_non_intra(), svq1_decode_frame(), swf_write_header(), theora_header(), tiff_unpack_strip(), to_meta_with_crop(), utvideo_encode_frame(), vb_decode_framedata(), vc1_mc_4mv_luma(), xan_wc3_copy_pixel_run(), xan_wc3_decode_frame(), xan_wc3_output_pixel_run(), xsub_encode(), yuv422ptouyvy_TMPL(), yuv422ptoyuy2_TMPL(), yuvPlanartouyvy_TMPL(), yuvPlanartoyuy2_TMPL(), yuy2toyv12_TMPL(), yv12touyvy_TMPL(), yv12touyvy_unscaled_altivec(), yv12toyuy2_TMPL(), and yv12toyuy2_unscaled_altivec().

int wrap [static]

Definition at line 158 of file utils.c.


Generated on Fri Oct 26 02:50:08 2012 for FFmpeg by  doxygen 1.5.8