FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
utils.c File Reference
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Macros

#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
 

Macro Definition Documentation

#define SCALEBITS   8

Definition at line 26 of file utils.c.

Referenced by rgb24_to_yuv420p().

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

Definition at line 27 of file utils.c.

Referenced by rgb24_to_yuv420p().

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

Definition at line 28 of file utils.c.

Referenced by rgb24_to_yuv420p().

#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 DEFAULT_WIDTH   352

Definition at line 102 of file utils.c.

Referenced by main().

#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().

Function Documentation

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().

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().

Variable Documentation

unsigned char* rgb_tab
static

Definition at line 157 of file utils.c.

Referenced by main(), and put_pixel().

int width
static
Examples:
doc/examples/muxing.c, and doc/examples/scaling_video.c.

Definition at line 158 of file utils.c.

Referenced by abgrToA_c(), add_rect_clamped_c(), apply_loop_filter(), av_parse_video_size(), avcodec_set_dimensions(), avfilter_graph_dump_to_buf(), avfilter_transform(), avg_tpel_pixels_mc01_c(), avg_tpel_pixels_mc02_c(), avg_tpel_pixels_mc10_c(), avg_tpel_pixels_mc11_c(), avg_tpel_pixels_mc12_c(), avg_tpel_pixels_mc20_c(), avg_tpel_pixels_mc21_c(), avg_tpel_pixels_mc22_c(), bgr24ToUV_c(), bgr24ToUV_half_c(), bgr24ToY_c(), bink_decode_plane(), bitplane_decoding(), bktr_init(), bmp_decode_frame(), bswap16UV_c(), bswap16Y_c(), build_feed_streams(), calculate_display_rect(), calculate_visual_weight(), cdxl_read_packet(), chrRangeFromJpeg16_c(), chrRangeFromJpeg_c(), chrRangeToJpeg16_c(), chrRangeToJpeg_c(), codec_reinit(), codecctl_int(), config(), copy_block(), copy_frame(), count_usage(), dc1394_read_common(), decode_bdlt(), decode_block(), decode_clnpass(), decode_colskip(), decode_dds1(), decode_frame(), decode_frame_header(), decode_frame_headers(), decode_header(), decode_i2_frame(), decode_i_frame(), decode_p_frame(), decode_ppc(), decode_refpass(), decode_region(), decode_region_masked(), decode_rowskip(), decode_seq_header(), decode_sigpass(), decode_slice(), decode_subband_internal(), decode_vol_header(), decode_wdlt(), DEFINE_BLEND(), device_init(), dirac_hpel_filter(), draw_edges(), draw_n_color(), dump_enc_cfg(), duplicate_right_border_pixels(), encode_15_7_sl(), encode_cblk(), encode_clnpass(), encode_frame(), encode_picture_lossless(), encode_picture_ls(), encode_plane(), encode_refpass(), encode_sigpass(), encode_slice(), execute_code(), ff_flv_decode_picture_header(), ff_gmc_c(), ff_gradfun_blur_line_c(), ff_gradfun_filter_line_c(), ff_h263_decode_picture_header(), ff_jpegls_decode_picture(), ff_mjpeg_decode_sof(), ff_print_debug_info2(), ff_rtjpeg_decode_init(), ff_shrink88(), ff_snow_vertical_compose97i(), ff_spatial_idwt_init2(), ff_vda_create_decoder(), ff_vf_next_config(), fill_yuv_image(), filter(), gbr24ptopacked24(), gbr24ptopacked32(), gbr24pToUV_half_c(), gif_image_write_image(), gif_read_header(), gif_read_image(), gif_write_header(), idcin_read_header(), img_read_header(), init_sizes(), inter_predict(), interleaveBytes_c(), interleaveBytes_TMPL(), INTERPOLATE_METHOD(), jpeg_parse_packet(), lag_decode_arith_plane(), lag_pred_line_yuy2(), left_predict(), libopenjpeg_copy_unpacked16(), libopenjpeg_copy_unpacked8(), libopenjpeg_decode_frame(), loco_decode_plane(), lumRangeFromJpeg16_c(), lumRangeFromJpeg_c(), lumRangeToJpeg16_c(), lumRangeToJpeg_c(), main(), mangle_rgb_planes(), matroska_read_header(), mca(), median_predict(), mimic_decode_frame(), monoblack2Y_c(), monowhite2Y_c(), mov_read_tkhd(), mov_write_tapt_tag(), mpeg1_decode_sequence(), msnwc_tcp_probe(), msrle_decode_8_16_24_32(), mss4_decode_frame(), mvc_decode_init(), nuv_header(), nvXXtoUV_c(), old_codec37(), old_codec47(), op(), optimum_block_width(), packedtogbr24p(), paint_mouse_pointer(), palToA_c(), palToUV_c(), palToY_c(), parse_picture(), parse_picture_segment(), planar_rgb16_to_uv(), planar_rgb16_to_y(), planar_rgb_to_uv(), planar_rgb_to_y(), png_get_interlaced_row(), png_put_interlaced_row(), postProcess_TMPL(), pp_postprocess(), process_frame_uyvy422(), process_frame_yuv420p(), process_frame_yuv422p(), process_ipmovie_chunk(), put_line(), put_pixel(), put_signed_rect_clamped_c(), put_tpel_pixels_mc01_c(), put_tpel_pixels_mc02_c(), put_tpel_pixels_mc10_c(), put_tpel_pixels_mc11_c(), put_tpel_pixels_mc12_c(), put_tpel_pixels_mc20_c(), put_tpel_pixels_mc21_c(), put_tpel_pixels_mc22_c(), qpeg_decode_inter(), qtrle_encode_line(), rawvideo_read_header(), rawvideo_read_packet(), read_header(), rgb16_32ToUV_c_template(), rgb16_32ToUV_half_c_template(), rgb24_to_yuv420p(), rgb24ToUV_c(), rgb24ToUV_half_c(), rgb24ToY_c(), rgb48funcs(), rgb48ToUV_c_template(), rgb48ToUV_half_c_template(), rgb64funcs(), rgb64ToUV_c_template(), rgb64ToUV_half_c_template(), rgb64ToY_c_template(), rgba64ToA_c(), rgbaToA_c(), rpza_decode_stream(), rv34_mc(), siff_parse_vbv1(), smc_decode_stream(), smush_read_header(), snow_interleave_line_header(), spatial_compose53i_dy_buffered(), store_slice2_mmx(), store_slice_c(), store_slice_mmx(), super2xsai(), svq1_decode_block_intra(), svq1_decode_block_non_intra(), svq1_decode_frame(), svq1_decode_frame_header(), svq1_encode_plane(), swf_read_packet(), swf_write_header(), theora_header(), tiff_unpack_strip(), to_meta_with_crop(), utvideo_encode_frame(), uyvyToUV_c(), uyvyToY_c(), uyvytoyuv420_c(), uyvytoyuv420_TMPL(), uyvytoyuv422_c(), uyvytoyuv422_TMPL(), vb_decode_framedata(), vble_restore_plane(), vc1_mc_4mv_luma(), vertical_compose53iH0(), vertical_compose53iL0(), vertical_compose97iH0(), vertical_compose97iH1(), vertical_compose97iL0(), vertical_compose97iL1(), vertical_compose_daub97iH0(), vertical_compose_daub97iH1(), vertical_compose_daub97iL0(), vertical_compose_daub97iL1(), vertical_compose_dd137iL0(), vertical_compose_dd97iH0(), vertical_compose_dirac53iH0(), vertical_compose_fidelityiH0(), vertical_compose_fidelityiL0(), vertical_compose_haar(), vertical_decompose53iH0(), vertical_decompose53iL0(), vertical_decompose97iH0(), vertical_decompose97iH1(), vertical_decompose97iL0(), vertical_decompose97iL1(), write_huff_codes(), write_plane(), xan_decode_frame_type0(), xan_decode_frame_type1(), xan_wc3_copy_pixel_run(), xan_wc3_decode_frame(), xan_wc3_output_pixel_run(), xsub_encode(), yuv422ptouyvy_TMPL(), yuv422ptoyuy2_TMPL(), yuv4_read_header(), yuv4_read_packet(), yuvPlanartouyvy_TMPL(), yuvPlanartoyuy2_TMPL(), yuy2ToUV_c(), yuy2ToY_c(), yuy2toyv12_TMPL(), yuyvtoyuv420_c(), yuyvtoyuv420_TMPL(), yuyvtoyuv422_c(), yuyvtoyuv422_TMPL(), yv12touyvy_TMPL(), yv12touyvy_unscaled_altivec(), yv12toyuy2_TMPL(), yv12toyuy2_unscaled_altivec(), and zero12v_decode_frame().

int height
static

Definition at line 158 of file utils.c.

int wrap
static

Definition at line 158 of file utils.c.