FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_spp.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include "config.h"
#include "mp_msg.h"
#include "cpudetect.h"
#include "libavutil/common.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "img_format.h"
#include "mp_image.h"
#include "vf.h"
#include "av_helpers.h"
#include "libvo/fastmemcpy.h"

Go to the source code of this file.

Data Structures

struct  vf_priv_s
 

Macros

#define XMIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define SHIFT   22
 
#define REQUANT_CORE(dst0, dst1, dst2, dst3, src0, src1, src2, src3)
 
#define REQUANT_CORE(dst0, dst1, dst2, dst3, src0, src1, src2, src3)
 
#define STORE(pos)
 

Functions

static void hardthresh_c (int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation)
 
static void softthresh_c (int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation)
 
static void hardthresh_mmx (int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation)
 
static void softthresh_mmx (int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation)
 
static void add_block (int16_t *dst, int stride, int16_t block[64])
 
static void store_slice_c (uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale)
 
static void store_slice_mmx (uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale)
 
static void filter (struct vf_priv_s *p, uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, uint8_t *qp_store, int qp_stride, int is_luma)
 
static int config (struct vf_instance *vf, int width, int height, int d_width, int d_height, unsigned int flags, unsigned int outfmt)
 
static void get_image (struct vf_instance *vf, mp_image_t *mpi)
 
static int put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
 
static void uninit (struct vf_instance *vf)
 
static int query_format (struct vf_instance *vf, unsigned int fmt)
 
static int control (struct vf_instance *vf, int request, void *data)
 
static int vf_open (vf_instance_t *vf, char *args)
 

Variables

static const uint8_t dither [8][8]
 
static const uint8_t offset [127][2]
 
static void(* store_slice )(uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale) = store_slice_c
 
static void(* requantize )(int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation) = hardthresh_c
 
const vf_info_t ff_vf_info_spp
 

Macro Definition Documentation

#define XMIN (   a,
  b 
)    ((a) < (b) ? (a) : (b))

Definition at line 56 of file vf_spp.c.

Referenced by filter().

#define SHIFT   22

Definition at line 107 of file vf_spp.c.

#define REQUANT_CORE (   dst0,
  dst1,
  dst2,
  dst3,
  src0,
  src1,
  src2,
  src3 
)

Referenced by hardthresh_mmx(), and softthresh_mmx().

#define REQUANT_CORE (   dst0,
  dst1,
  dst2,
  dst3,
  src0,
  src1,
  src2,
  src3 
)
#define STORE (   pos)
Value:
temp= ((src[x + y*src_stride + pos]<<log2_scale) + d[pos])>>6;\
if(temp & 0x100) temp= ~(temp>>31);\
dst[x + y*dst_stride + pos]= temp;

Function Documentation

static void hardthresh_c ( int16_t  dst[64],
int16_t  src[64],
int  qp,
uint8_t permutation 
)
static

Definition at line 109 of file vf_spp.c.

Referenced by vf_open().

static void softthresh_c ( int16_t  dst[64],
int16_t  src[64],
int  qp,
uint8_t permutation 
)
static

Definition at line 129 of file vf_spp.c.

Referenced by vf_open().

static void hardthresh_mmx ( int16_t  dst[64],
int16_t  src[64],
int  qp,
uint8_t permutation 
)
static

Definition at line 153 of file vf_spp.c.

Referenced by vf_open().

static void softthresh_mmx ( int16_t  dst[64],
int16_t  src[64],
int  qp,
uint8_t permutation 
)
static

Definition at line 221 of file vf_spp.c.

Referenced by vf_open().

static void add_block ( int16_t *  dst,
int  stride,
int16_t  block[64] 
)
inlinestatic

Definition at line 298 of file vf_spp.c.

Referenced by filter().

static void store_slice_c ( uint8_t dst,
int16_t *  src,
int  dst_stride,
int  src_stride,
int  width,
int  height,
int  log2_scale 
)
static

Definition at line 309 of file vf_spp.c.

static void store_slice_mmx ( uint8_t dst,
int16_t *  src,
int  dst_stride,
int  src_stride,
int  width,
int  height,
int  log2_scale 
)
static

Definition at line 334 of file vf_spp.c.

Referenced by vf_open().

static void filter ( struct vf_priv_s p,
uint8_t dst,
uint8_t src,
int  dst_stride,
int  src_stride,
int  width,
int  height,
uint8_t qp_store,
int  qp_stride,
int  is_luma 
)
static

Definition at line 378 of file vf_spp.c.

Referenced by put_image().

static int config ( struct vf_instance *  vf,
int  width,
int  height,
int  d_width,
int  d_height,
unsigned int  flags,
unsigned int  outfmt 
)
static

Definition at line 440 of file vf_spp.c.

Referenced by vf_open().

static void get_image ( struct vf_instance *  vf,
mp_image_t mpi 
)
static

Definition at line 452 of file vf_spp.c.

Referenced by vf_open().

static int put_image ( struct vf_instance *  vf,
mp_image_t mpi,
double  pts 
)
static

Definition at line 469 of file vf_spp.c.

Referenced by vf_open().

static void uninit ( struct vf_instance *  vf)
static

Definition at line 521 of file vf_spp.c.

Referenced by vf_open().

static int query_format ( struct vf_instance *  vf,
unsigned int  fmt 
)
static

Definition at line 538 of file vf_spp.c.

Referenced by vf_open().

static int control ( struct vf_instance *  vf,
int  request,
void data 
)
static

Definition at line 556 of file vf_spp.c.

Referenced by vf_open().

static int vf_open ( vf_instance_t vf,
char *  args 
)
static

Definition at line 567 of file vf_spp.c.

Variable Documentation

const uint8_t dither[8][8]
static
Initial value:
={
{ 0, 48, 12, 60, 3, 51, 15, 63, },
{ 32, 16, 44, 28, 35, 19, 47, 31, },
{ 8, 56, 4, 52, 11, 59, 7, 55, },
{ 40, 24, 36, 20, 43, 27, 39, 23, },
{ 2, 50, 14, 62, 1, 49, 13, 61, },
{ 34, 18, 46, 30, 33, 17, 45, 29, },
{ 10, 58, 6, 54, 9, 57, 5, 53, },
{ 42, 26, 38, 22, 41, 25, 37, 21, },
}

Definition at line 59 of file vf_spp.c.

Referenced by store_slice_c(), and store_slice_mmx().

const uint8_t offset[127][2]
static
Initial value:
= {
{0,0},
{0,0}, {4,4},
{0,0}, {2,2}, {6,4}, {4,6},
{0,0}, {5,1}, {2,2}, {7,3}, {4,4}, {1,5}, {6,6}, {3,7},
{0,0}, {4,0}, {1,1}, {5,1}, {3,2}, {7,2}, {2,3}, {6,3},
{0,4}, {4,4}, {1,5}, {5,5}, {3,6}, {7,6}, {2,7}, {6,7},
{0,0}, {0,2}, {0,4}, {0,6}, {1,1}, {1,3}, {1,5}, {1,7},
{2,0}, {2,2}, {2,4}, {2,6}, {3,1}, {3,3}, {3,5}, {3,7},
{4,0}, {4,2}, {4,4}, {4,6}, {5,1}, {5,3}, {5,5}, {5,7},
{6,0}, {6,2}, {6,4}, {6,6}, {7,1}, {7,3}, {7,5}, {7,7},
{0,0}, {4,4}, {0,4}, {4,0}, {2,2}, {6,6}, {2,6}, {6,2},
{0,2}, {4,6}, {0,6}, {4,2}, {2,0}, {6,4}, {2,4}, {6,0},
{1,1}, {5,5}, {1,5}, {5,1}, {3,3}, {7,7}, {3,7}, {7,3},
{1,3}, {5,7}, {1,7}, {5,3}, {3,1}, {7,5}, {3,5}, {7,1},
{0,1}, {4,5}, {0,5}, {4,1}, {2,3}, {6,7}, {2,7}, {6,3},
{0,3}, {4,7}, {0,7}, {4,3}, {2,1}, {6,5}, {2,5}, {6,1},
{1,0}, {5,4}, {1,4}, {5,0}, {3,2}, {7,6}, {3,6}, {7,2},
{1,2}, {5,6}, {1,6}, {5,2}, {3,0}, {7,4}, {3,4}, {7,0},
}

Definition at line 70 of file vf_spp.c.

Referenced by adx_decode(), aiff_read_header(), alloc_and_copy(), ape_decode_frame(), apply_window_and_mdct(), assign_pair(), av_probe_input_buffer(), avio_seek(), avpriv_adx_decode_header(), avpriv_copy_pce_data(), aw_parse_coords(), bfi_decode_frame(), bidir_sal(), bitplane_decoding(), biweight_h264_W_altivec(), bl_intrp(), buffer_offset(), bytestream2_seek(), bytestream2_seek_p(), chroma_4mv_motion(), chroma_4mv_motion_lowres(), cin_decode_lzss(), comp_block(), comp_interp_index(), comp_ppf_coeff(), compute_pkt_fields(), cook_decode_frame(), copy_cell(), decode_0(), decode_8_pulses_35bits(), decode_blockcode(), decode_blocks(), decode_bytes_and_gain(), decode_cell(), decode_dds1(), decode_decorrelation_matrix(), decode_dsw1(), decode_fixed_sparse(), decode_frame(), decode_init(), decode_init_static(), decode_log_area(), decode_rgb_frame(), decode_scalefactors(), decode_subframe(), decode_tilehdr(), decode_tsw1(), dnxhd_encode_picture(), dnxhd_init_vlc(), dnxhd_setup_threads_slices(), draw_slice(), dv_frame_offset(), dv_read_seek(), dyn_buf_seek(), encode_422_bitstream(), encode_block(), encode_frame(), encode_init(), encode_plane(), encode_rgb_frame(), estimate_timings_from_pts(), ff_asf_parse_packet(), ff_copy_and_dup(), ff_cos(), ff_draw_horiz_band(), ff_h264_chroma422_dc_dequant_idct(), ff_h264_decode_init_vlc(), ff_h264_draw_horiz_band(), ff_h264_filter_mb(), ff_h264_luma_dc_dequant_idct(), ff_huff_gen_len_table(), ff_mpa_synth_filter_TMPL(), ff_mpeg4_encode_mb(), ff_mspel_motion(), ff_rtmp_packet_read_internal(), ff_rtmpe_gen_pub_key(), ff_rtp_send_latm(), ff_rv34_decode_frame(), ff_spdif_probe(), ff_spdif_read_packet(), ff_svq3_luma_dc_dequant_idct_c(), filter(), filter_frame(), find_headers_search_validate(), fixup_vorbis_headers(), flac_fifo_read(), flac_fifo_read_wrap(), flac_read_header(), flv_read_header(), gen_fcb_excitation(), get_intra_count(), get_p_cbp(), get_residual(), gmc1_motion(), gsm_decode_block(), h263_mv4_search(), h_block_filter(), hashNext(), horizontal_fill(), init_ref(), ism_seek(), lag_decode_arith_plane(), lsp2lpc(), matroska_parse_frame(), matroska_parse_seekhead_entry(), mc_dir_part(), md5_finish(), mjpeg_decode_scan(), mkv_write_block(), motion_search(), mov_probe(), mov_read_trun(), mp_read_changes_map(), mxf_absolute_bodysid_offset(), mxf_compute_ptses_fake_index(), nsv_probe(), ogg_write_vorbiscomment(), oggvorbis_decode_init(), oggvorbis_encode_init(), pop_integer(), postProcess_TMPL(), ptx_decode_frame(), qdm2_fft_decode_tones(), qdm2_fft_init_coefficient(), qdm2_fft_tone_synthesizer(), radix_count(), read_braindead_odml_indx(), read_frame_data(), read_header(), read_packet(), read_uncompressed_sgi(), read_var_block_data(), revert_channel_correlation(), rpl_read_header(), rv10_decode_frame(), seq_decode_op3(), svq1_decode_init(), svq1_encode_plane(), svq3_decode_init(), tgv_decode_inter(), unpack(), unpack_parse_unit(), v_block_filter(), vb_decode_framedata(), vble_decode_frame(), vble_restore_plane(), vcr1_decode_frame(), vorbis_floor1_decode(), vp3_draw_horiz_band(), vp56_get_vectors_predictors(), weight_h264_W_altivec(), write_mb_info(), writer_print_data(), wtvfile_seek(), x11grab_read_header(), x8_vlc_init(), xan_decode_chroma(), yae_flush(), yuv2NBPS(), yuv2plane1_8_c(), yuv2planeX_u(), and yuv2yuvX_TMPL().

void(* store_slice)(uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale) = store_slice_c
static

Definition at line 374 of file vf_spp.c.

Referenced by filter(), and vf_open().

void(* requantize)(int16_t dst[64], int16_t src[64], int qp, uint8_t *permutation) = hardthresh_c
static

Definition at line 376 of file vf_spp.c.

Referenced by filter(), and vf_open().

const vf_info_t ff_vf_info_spp
Initial value:
= {
"simple postprocess",
"spp",
"Michael Niedermayer",
"",
}

Definition at line 614 of file vf_spp.c.