MythTV  master
Macros | Functions
pullup.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "pullup.h"
#include "config.h"
#include "../mm_arch.h"
Include dependency graph for pullup.c:

Go to the source code of this file.

Macros

#define ABS(a)   (((a)^((a)>>31))-((a)>>31))
 
#define F_HAVE_BREAKS   1
 
#define F_HAVE_AFFINITY   2
 
#define BREAK_LEFT   1
 
#define BREAK_RIGHT   2
 

Functions

static int diff_y (const unsigned char *a, const unsigned char *b, int s)
 
static int licomb_y (const unsigned char *a, const unsigned char *b, int s)
 
static int qpcomb_y (const unsigned char *a, const unsigned char *b, int s) __attribute__((unused))
 
static int var_y (const unsigned char *a, const unsigned char *b, int s)
 
static void alloc_buffer (struct pullup_context *c, struct pullup_buffer *b)
 
struct pullup_bufferpullup_lock_buffer (struct pullup_buffer *b, int parity)
 
void pullup_release_buffer (struct pullup_buffer *b, int parity)
 
struct pullup_bufferpullup_get_buffer (struct pullup_context *c, int parity)
 
static void compute_metric (struct pullup_context *c, struct pullup_field *fa, int pa, struct pullup_field *fb, int pb, int(*func)(const unsigned char *, const unsigned char *, int), int *dest)
 
static void alloc_metrics (struct pullup_context *c, struct pullup_field *f)
 
static struct pullup_fieldmake_field_queue (struct pullup_context *c, int len)
 
static void check_field_queue (struct pullup_context *c)
 
void pullup_submit_field (struct pullup_context *c, struct pullup_buffer *b, int parity)
 
void pullup_flush_fields (struct pullup_context *c)
 
static int queue_length (struct pullup_field *begin, struct pullup_field *end)
 
static int find_first_break (struct pullup_field *f, int max)
 
static void compute_breaks (struct pullup_context *c, struct pullup_field *f0)
 
static void compute_affinity (struct pullup_context *c, struct pullup_field *f)
 
static void foo (struct pullup_context *c)
 
static int decide_frame_length (struct pullup_context *c)
 
static void print_aff_and_breaks (struct pullup_context *c, struct pullup_field *f)
 
struct pullup_framepullup_get_frame (struct pullup_context *c)
 
static void copy_field (struct pullup_context *c, struct pullup_buffer *dest, struct pullup_buffer *src, int parity)
 
void pullup_pack_frame (struct pullup_context *c, struct pullup_frame *fr)
 
void pullup_release_frame (struct pullup_frame *fr)
 
struct pullup_contextpullup_alloc_context (void)
 
void pullup_preinit_context (struct pullup_context *c)
 
void pullup_init_context (struct pullup_context *c)
 
void pullup_free_context (struct pullup_context *c)
 

Macro Definition Documentation

◆ ABS

#define ABS (   a)    (((a)^((a)>>31))-((a)>>31))

Definition at line 203 of file pullup.c.

◆ F_HAVE_BREAKS

#define F_HAVE_BREAKS   1

Definition at line 444 of file pullup.c.

◆ F_HAVE_AFFINITY

#define F_HAVE_AFFINITY   2

Definition at line 445 of file pullup.c.

◆ BREAK_LEFT

#define BREAK_LEFT   1

Definition at line 448 of file pullup.c.

◆ BREAK_RIGHT

#define BREAK_RIGHT   2

Definition at line 449 of file pullup.c.

Function Documentation

◆ diff_y()

static int diff_y ( const unsigned char *  a,
const unsigned char *  b,
int  s 
)
static

Definition at line 205 of file pullup.c.

Referenced by pullup_init_context().

◆ licomb_y()

static int licomb_y ( const unsigned char *  a,
const unsigned char *  b,
int  s 
)
static

Definition at line 216 of file pullup.c.

Referenced by pullup_init_context().

◆ qpcomb_y()

static int qpcomb_y ( const unsigned char *  a,
const unsigned char *  b,
int  s 
)
static

Definition at line 231 of file pullup.c.

◆ var_y()

static int var_y ( const unsigned char *  a,
const unsigned char *  b,
int  s 
)
static

Definition at line 252 of file pullup.c.

Referenced by pullup_init_context().

◆ alloc_buffer()

static void alloc_buffer ( struct pullup_context c,
struct pullup_buffer b 
)
static

Definition at line 272 of file pullup.c.

Referenced by pullup_get_buffer().

◆ pullup_lock_buffer()

struct pullup_buffer* pullup_lock_buffer ( struct pullup_buffer b,
int  parity 
)

◆ pullup_release_buffer()

void pullup_release_buffer ( struct pullup_buffer b,
int  parity 
)

Definition at line 291 of file pullup.c.

Referenced by IvtcFilter(), pullup_flush_fields(), and pullup_release_frame().

◆ pullup_get_buffer()

struct pullup_buffer* pullup_get_buffer ( struct pullup_context c,
int  parity 
)

Definition at line 298 of file pullup.c.

Referenced by IvtcFilter(), and pullup_pack_frame().

◆ compute_metric()

static void compute_metric ( struct pullup_context c,
struct pullup_field fa,
int  pa,
struct pullup_field fb,
int  pb,
int(*)(const unsigned char *, const unsigned char *, int)  func,
int *  dest 
)
static

Definition at line 333 of file pullup.c.

Referenced by pullup_submit_field().

◆ alloc_metrics()

static void alloc_metrics ( struct pullup_context c,
struct pullup_field f 
)
static

Definition at line 367 of file pullup.c.

Referenced by check_field_queue(), and make_field_queue().

◆ make_field_queue()

static struct pullup_field* make_field_queue ( struct pullup_context c,
int  len 
)
static

Definition at line 375 of file pullup.c.

Referenced by pullup_init_context().

◆ check_field_queue()

static void check_field_queue ( struct pullup_context c)
static

Definition at line 391 of file pullup.c.

Referenced by pullup_submit_field().

◆ pullup_submit_field()

void pullup_submit_field ( struct pullup_context c,
struct pullup_buffer b,
int  parity 
)

Definition at line 403 of file pullup.c.

Referenced by IvtcFilter().

◆ pullup_flush_fields()

void pullup_flush_fields ( struct pullup_context c)

Definition at line 428 of file pullup.c.

◆ queue_length()

static int queue_length ( struct pullup_field begin,
struct pullup_field end 
)
static

Definition at line 454 of file pullup.c.

Referenced by decide_frame_length(), and foo().

◆ find_first_break()

static int find_first_break ( struct pullup_field f,
int  max 
)
static

Definition at line 464 of file pullup.c.

Referenced by decide_frame_length().

◆ compute_breaks()

static void compute_breaks ( struct pullup_context c,
struct pullup_field f0 
)
static

Definition at line 474 of file pullup.c.

Referenced by foo().

◆ compute_affinity()

static void compute_affinity ( struct pullup_context c,
struct pullup_field f 
)
static

Definition at line 509 of file pullup.c.

Referenced by foo().

◆ foo()

static void foo ( struct pullup_context c)
static

Definition at line 550 of file pullup.c.

Referenced by decide_frame_length().

◆ decide_frame_length()

static int decide_frame_length ( struct pullup_context c)
static

Definition at line 561 of file pullup.c.

Referenced by pullup_get_frame().

◆ print_aff_and_breaks()

static void print_aff_and_breaks ( struct pullup_context c,
struct pullup_field f 
)
static

Definition at line 605 of file pullup.c.

Referenced by pullup_get_frame().

◆ pullup_get_frame()

struct pullup_frame* pullup_get_frame ( struct pullup_context c)

Definition at line 633 of file pullup.c.

Referenced by IvtcFilter().

◆ copy_field()

static void copy_field ( struct pullup_context c,
struct pullup_buffer dest,
struct pullup_buffer src,
int  parity 
)
static

Definition at line 682 of file pullup.c.

Referenced by pullup_pack_frame().

◆ pullup_pack_frame()

void pullup_pack_frame ( struct pullup_context c,
struct pullup_frame fr 
)

Definition at line 696 of file pullup.c.

Referenced by IvtcFilter().

◆ pullup_release_frame()

void pullup_release_frame ( struct pullup_frame fr)

Definition at line 715 of file pullup.c.

Referenced by IvtcFilter().

◆ pullup_alloc_context()

struct pullup_context* pullup_alloc_context ( void  )

Definition at line 730 of file pullup.c.

Referenced by NewIvtcFilter().

◆ pullup_preinit_context()

void pullup_preinit_context ( struct pullup_context c)

Definition at line 735 of file pullup.c.

Referenced by NewIvtcFilter().

◆ pullup_init_context()

void pullup_init_context ( struct pullup_context c)

Definition at line 744 of file pullup.c.

Referenced by NewIvtcFilter().

◆ pullup_free_context()

void pullup_free_context ( struct pullup_context c)

Definition at line 785 of file pullup.c.

Referenced by IvtcFilterCleanup().