tiny_ssim.c File Reference
#include <inttypes.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
Include dependency graph for tiny_ssim.c:

Go to the source code of this file.

Macros

#define FFSWAP(type, a, b)   do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)
 
#define FFMIN(a, b)   ((a) > (b) ? (b) : (a))
 
#define BIT_DEPTH   8
 
#define PIXEL_MAX   ((1 << BIT_DEPTH)-1)
 
#define type   int
 

Typedefs

typedef uint8_t pixel
 

Functions

static void ssim_4x4x2_core (const pixel *pix1, intptr_t stride1, const pixel *pix2, intptr_t stride2, int sums[2][4])
 
static float ssim_end1 (int s1, int s2, int ss, int s12)
 
static float ssim_end4 (int sum0[5][4], int sum1[5][4], int width)
 
float ssim_plane (pixel *pix1, intptr_t stride1, pixel *pix2, intptr_t stride2, int width, int height, void *buf, int *cnt)
 
uint64_t ssd_plane (const uint8_t *pix1, const uint8_t *pix2, int size)
 
double ssd_to_psnr (uint64_t ssd, uint64_t denom)
 
int main (int argc, char *argv[])
 

Macro Definition Documentation

#define BIT_DEPTH   8

Definition at line 38 of file tiny_ssim.c.

#define FFMIN (   a,
  b 
)    ((a) > (b) ? (b) : (a))

Definition at line 36 of file tiny_ssim.c.

Referenced by ssim_plane().

#define FFSWAP (   type,
  a,
  b 
)    do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)

Definition at line 35 of file tiny_ssim.c.

Referenced by ssim_plane().

#define PIXEL_MAX   ((1 << BIT_DEPTH)-1)

Definition at line 39 of file tiny_ssim.c.

Referenced by ssim_end1().

#define type   int

Referenced by aac_decode_close(), add_interval(), asf_read_picture(), asf_read_stream_properties(), ass_split_section(), ast_read_packet(), av_frame_new_side_data(), av_log_default_callback(), av_packet_new_side_data(), avformat_match_stream_specifier(), avs_decode_frame(), avs_read_packet(), avs_read_video_packet(), bmv_read_packet(), che_configure(), compute_status(), create(), DECLARE_QUERYINTERFACE(), decode_13(), decode_cabac_b_mb_sub_type(), decode_channel_map(), decode_frame(), decode_info_header(), decode_q_branch(), decode_subframe(), default_query_formats_common(), dshow_add_device(), dshow_cycle_formats(), dshow_cycle_pins(), dshow_set_audio_buffer_size(), encode_picture(), ff_dxva2_commit_buffer(), ff_estimate_b_frame_motion(), ff_h263_round_chroma(), ff_h264_decode_sei(), ff_id3v2_parse(), ff_id3v2_write_apic(), ff_j2k_dwt_init(), ff_print_debug_info2(), ff_rtmp_packet_create(), ff_rtmp_packet_read_internal(), ff_rtp_send_jpeg(), ff_voc_get_packet(), filter(), filter_query_formats(), find_and_decode_index(), find_stream(), flush(), flv_data_packet(), flv_read_metabody(), flv_read_packet(), frame_configure_elements(), generate_transition(), get_che(), get_geokey_type(), GET_TOK(), gxf_resync_media(), h264_handle_packet(), h264_probe(), init(), init_input_filter(), iterative_me(), jpeg_parse_packet(), lavfi_read_header(), libAVEnumMediaTypes_Clone(), libAVEnumMediaTypes_Setup(), libAVFilter_Cleanup(), libAVFilter_Setup(), main(), make_eval_expr(), mkv_query_codec(), mm_decode_frame(), mmap_close(), mmap_start(), mms_safe_send_recv(), mov_write_isml_manifest(), mpegps_psm_parse(), mpegps_read_packet(), mxf_read_local_tags(), nal_send(), new_output_stream(), nut_read_header(), open_output_file(), output_configure(), output_server_manifest(), parse_device_name(), parse_ffconfig(), parse_fmtp(), parse_legacy_attrib(), parse_picture(), parse_timestamp(), print_report(), probe(), qdm2_decode_fft_packets(), qdm2_parse_subpacket(), query_formats(), read_header(), read_packet(), rm_assemble_video_frame(), rtmp_handshake(), rtmp_write_amf_data(), rv34_parse(), rv34_pred_mv_b(), select_input_picture(), select_reference_stream(), set_codec_from_probe_data(), show_filters(), sol_read_header(), spectral_to_sample(), ssim_end1(), sunrast_decode_frame(), svq3_decode_block(), svq3_decode_mb(), tak_get_nb_samples(), tak_read_header(), targa_decode_rle(), tiff_decode_tag(), tm2_decode_blocks(), tnput(), udp_resolve_host(), vmd_read_header(), vp3_decode_frame(), vp56_decode_4mv(), vp56_parse_mb_type_models(), w_c(), wmv2_pred_motion(), and write_fragments().

Typedef Documentation

typedef uint8_t pixel

Definition at line 40 of file tiny_ssim.c.

Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 157 of file tiny_ssim.c.

uint64_t ssd_plane ( const uint8_t pix1,
const uint8_t pix2,
int  size 
)

Definition at line 140 of file tiny_ssim.c.

Referenced by main().

double ssd_to_psnr ( uint64_t  ssd,
uint64_t  denom 
)

Definition at line 152 of file tiny_ssim.c.

Referenced by main().

static void ssim_4x4x2_core ( const pixel pix1,
intptr_t  stride1,
const pixel pix2,
intptr_t  stride2,
int  sums[2][4] 
)
static

Definition at line 45 of file tiny_ssim.c.

Referenced by ssim_plane().

static float ssim_end1 ( int  s1,
int  s2,
int  ss,
int  s12 
)
static

Definition at line 74 of file tiny_ssim.c.

Referenced by ssim_end4().

static float ssim_end4 ( int  sum0[5][4],
int  sum1[5][4],
int  width 
)
static

Definition at line 99 of file tiny_ssim.c.

Referenced by ssim_plane().

float ssim_plane ( pixel pix1,
intptr_t  stride1,
pixel pix2,
intptr_t  stride2,
int  width,
int  height,
void buf,
int *  cnt 
)

Definition at line 112 of file tiny_ssim.c.

Referenced by main().