xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Functions | Variables
tdaudioanalyzer.c File Reference
#include <stdio.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/post.h>
#include "visualizations.h"

Data Structures

struct  tdaan_leveller_t
 
struct  post_plugin_tdaan_t
 
union  yuy2_color_t
 

Macros

#define RING_LOG2   13
 
#define RING_SIZE   (1 << RING_LOG2)
 
#define RING_MASK   (RING_SIZE - 1)
 
#define __   255
 
#define __   {{128, 128, 128, 128}}
 
#define _o   {{128, 128, 16, 128}}
 
#define o_   {{ 16, 128, 128, 128}}
 
#define oo   {{ 16, 128, 16, 128}}
 
#define sat16(v)   (((v) + 0x8000) & ~0xffff ? ((v) >> 31) ^ 0x7fff : v)
 

Functions

static void tdaan_video_resize (post_plugin_tdaan_t *this)
 
static void tdaan_draw_text (vo_frame_t *frame, int x, int y, const char *s)
 
static void tdaan_draw_line (vo_frame_t *frame, int x1, int y1, int x2, int y2, uint32_t gray)
 
static void tdaan_draw_rect (vo_frame_t *frame, int x, int y, int width, int height, uint32_t color)
 
static void tdaan_levels_draw (post_plugin_tdaan_t *this, vo_frame_t *frame)
 
static int tdaan_int16todb (int s)
 
static int tdaan_int32todb (uint32_t s)
 
static void tdaan_levels_reset (post_plugin_tdaan_t *this)
 
static void tdaan_levels_get (tdaan_leveller_t *v, const int16_t *data, int len)
 
static uint32_t tdaan_divu_quad_by_short (uint64_t num, uint32_t den)
 
static void tdaan_levels_done (post_plugin_tdaan_t *this)
 
static void tdaan_phaser_start (post_plugin_tdaan_t *this, vo_frame_t *frame)
 
static void tdaan_phaser_draw (post_plugin_tdaan_t *this, vo_frame_t *frame, const uint16_t *data, int len, uint32_t gray)
 
static void tdaan_downmix16_4 (const int16_t *p, int16_t *q, int n)
 
static void tdaan_downmix16_6 (const int16_t *p, int16_t *q, int n)
 
static int tdaan_rewire_video (xine_post_out_t *output_gen, void *data)
 
static int tdaan_port_open (xine_audio_port_t *port_gen, xine_stream_t *stream, uint32_t bits, uint32_t rate, int mode)
 
static void tdaan_port_close (xine_audio_port_t *port_gen, xine_stream_t *stream)
 
static void tdaan_port_put_buffer (xine_audio_port_t *port_gen, audio_buffer_t *buf, xine_stream_t *stream)
 
static void tdaan_dispose (post_plugin_t *this_gen)
 
static post_plugin_ttdaan_open_plugin (post_class_t *class_gen, int inputs, xine_audio_port_t **audio_target, xine_video_port_t **video_target)
 
void * tdaan_init_plugin (xine_t *xine, const void *data)
 

Variables

static const yuy2_color_t tdaan_BLACK = {{ 16, 128, 16, 128}}
 
static const yuy2_color_t tdaan_DARK_RED = {{ 83, 107, 83, 190}}
 
static const yuy2_color_t tdaan_DARK_GREEN = {{124, 87, 124, 76}}
 
static const yuy2_color_t tdaan_DARK_YELLOW = {{155, 66, 155, 138}}
 
static const yuy2_color_t tdaan_GREY = {{128, 128, 128, 128}}
 
static const yuy2_color_t tdaan_LIGHT_GRAY = {{170, 128, 170, 128}}
 
static const yuy2_color_t tdaan_RED = {{103, 101, 103, 209}}
 
static const yuy2_color_t tdaan_GREEN = {{148, 74, 148, 60}}
 
static const yuy2_color_t tdaan_YELLOW = {{195, 47, 195, 141}}
 
static const yuy2_color_t tdaan_WHITE = {{220, 128, 220, 128}}
 

Macro Definition Documentation

◆ __ [1/2]

#define __   255

◆ __ [2/2]

#define __   {{128, 128, 128, 128}}

◆ _o

#define _o   {{128, 128, 16, 128}}

◆ o_

#define o_   {{ 16, 128, 128, 128}}

◆ oo

#define oo   {{ 16, 128, 16, 128}}

◆ RING_LOG2

#define RING_LOG2   13

◆ RING_MASK

#define RING_MASK   (RING_SIZE - 1)

Referenced by tdaan_port_put_buffer().

◆ RING_SIZE

#define RING_SIZE   (1 << RING_LOG2)

Referenced by tdaan_port_put_buffer().

◆ sat16

#define sat16 ( v)    (((v) + 0x8000) & ~0xffff ? ((v) >> 31) ^ 0x7fff : v)

Function Documentation

◆ tdaan_dispose()

static void tdaan_dispose ( post_plugin_t * this_gen)
static

References _x_post_dispose().

Referenced by tdaan_open_plugin().

◆ tdaan_divu_quad_by_short()

static uint32_t tdaan_divu_quad_by_short ( uint64_t num,
uint32_t den )
static

Referenced by tdaan_levels_done().

◆ tdaan_downmix16_4()

static void tdaan_downmix16_4 ( const int16_t * p,
int16_t * q,
int n )
static

References sat16, and v.

Referenced by tdaan_port_put_buffer().

◆ tdaan_downmix16_6()

static void tdaan_downmix16_6 ( const int16_t * p,
int16_t * q,
int n )
static

References sat16.

Referenced by tdaan_port_put_buffer().

◆ tdaan_draw_line()

static void tdaan_draw_line ( vo_frame_t * frame,
int x1,
int y1,
int x2,
int y2,
uint32_t gray )
static

◆ tdaan_draw_rect()

static void tdaan_draw_rect ( vo_frame_t * frame,
int x,
int y,
int width,
int height,
uint32_t color )
static

◆ tdaan_draw_text()

static void tdaan_draw_text ( vo_frame_t * frame,
int x,
int y,
const char * s )
static

◆ tdaan_init_plugin()

void * tdaan_init_plugin ( xine_t * xine,
const void * data )

◆ tdaan_int16todb()

static int tdaan_int16todb ( int s)
static

Referenced by tdaan_levels_done().

◆ tdaan_int32todb()

static int tdaan_int32todb ( uint32_t s)
static

Referenced by tdaan_levels_done().

◆ tdaan_levels_done()

static void tdaan_levels_done ( post_plugin_tdaan_t * this)
static

◆ tdaan_levels_draw()

static void tdaan_levels_draw ( post_plugin_tdaan_t * this,
vo_frame_t * frame )
static

◆ tdaan_levels_get()

static void tdaan_levels_get ( tdaan_leveller_t * v,
const int16_t * data,
int len )
static

References v.

Referenced by tdaan_port_put_buffer().

◆ tdaan_levels_reset()

static void tdaan_levels_reset ( post_plugin_tdaan_t * this)
static

Referenced by tdaan_port_put_buffer().

◆ tdaan_open_plugin()

static post_plugin_t * tdaan_open_plugin ( post_class_t * class_gen,
int inputs,
xine_audio_port_t ** audio_target,
xine_video_port_t ** video_target )
static

◆ tdaan_phaser_draw()

static void tdaan_phaser_draw ( post_plugin_tdaan_t * this,
vo_frame_t * frame,
const uint16_t * data,
int len,
uint32_t gray )
static

References tdaan_draw_line().

Referenced by tdaan_port_put_buffer().

◆ tdaan_phaser_start()

static void tdaan_phaser_start ( post_plugin_tdaan_t * this,
vo_frame_t * frame )
static

◆ tdaan_port_close()

static void tdaan_port_close ( xine_audio_port_t * port_gen,
xine_stream_t * stream )
static

◆ tdaan_port_open()

static int tdaan_port_open ( xine_audio_port_t * port_gen,
xine_stream_t * stream,
uint32_t bits,
uint32_t rate,
int mode )
static

◆ tdaan_port_put_buffer()

static void tdaan_port_put_buffer ( xine_audio_port_t * port_gen,
audio_buffer_t * buf,
xine_stream_t * stream )
static

◆ tdaan_rewire_video()

static int tdaan_rewire_video ( xine_post_out_t * output_gen,
void * data )
static

◆ tdaan_video_resize()

static void tdaan_video_resize ( post_plugin_tdaan_t * this)
static

Referenced by tdaan_port_open().

Variable Documentation

◆ tdaan_BLACK

const yuy2_color_t tdaan_BLACK = {{ 16, 128, 16, 128}}
static

◆ tdaan_DARK_GREEN

const yuy2_color_t tdaan_DARK_GREEN = {{124, 87, 124, 76}}
static

Referenced by tdaan_levels_draw().

◆ tdaan_DARK_RED

const yuy2_color_t tdaan_DARK_RED = {{ 83, 107, 83, 190}}
static

Referenced by tdaan_levels_draw().

◆ tdaan_DARK_YELLOW

const yuy2_color_t tdaan_DARK_YELLOW = {{155, 66, 155, 138}}
static

Referenced by tdaan_levels_draw().

◆ tdaan_GREEN

const yuy2_color_t tdaan_GREEN = {{148, 74, 148, 60}}
static

Referenced by tdaan_levels_draw().

◆ tdaan_GREY

const yuy2_color_t tdaan_GREY = {{128, 128, 128, 128}}
static

Referenced by tdaan_port_put_buffer().

◆ tdaan_LIGHT_GRAY

const yuy2_color_t tdaan_LIGHT_GRAY = {{170, 128, 170, 128}}
static

Referenced by tdaan_port_put_buffer().

◆ tdaan_RED

const yuy2_color_t tdaan_RED = {{103, 101, 103, 209}}
static

Referenced by tdaan_levels_draw().

◆ tdaan_WHITE

const yuy2_color_t tdaan_WHITE = {{220, 128, 220, 128}}
static

Referenced by tdaan_port_put_buffer().

◆ tdaan_YELLOW

const yuy2_color_t tdaan_YELLOW = {{195, 47, 195, 141}}
static

Referenced by tdaan_levels_draw().