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

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 (unsigned char *a, unsigned char *b, int s)
 
static int licomb_y (unsigned char *a, unsigned char *b, int s)
 
static int var_y (unsigned char *a, unsigned char *b, int s)
 
static void alloc_buffer (struct pullup_context *c, struct pullup_buffer *b)
 
struct pullup_bufferff_pullup_lock_buffer (struct pullup_buffer *b, int parity)
 
void ff_pullup_release_buffer (struct pullup_buffer *b, int parity)
 
struct pullup_bufferff_pullup_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)(unsigned char *, 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 ff_pullup_submit_field (struct pullup_context *c, struct pullup_buffer *b, int parity)
 
void ff_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_frameff_pullup_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 ff_pullup_pack_frame (struct pullup_context *c, struct pullup_frame *fr)
 
void ff_pullup_release_frame (struct pullup_frame *fr)
 
struct pullup_contextff_pullup_alloc_context (void)
 
void ff_pullup_preinit_context (struct pullup_context *c)
 
void ff_pullup_init_context (struct pullup_context *c)
 
void ff_pullup_free_context (struct pullup_context *c)
 

Macro Definition Documentation

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

Definition at line 214 of file pullup.c.

Referenced by compute_affinity(), diff_y(), licomb_y(), and var_y().

#define F_HAVE_BREAKS   1

Definition at line 460 of file pullup.c.

Referenced by compute_breaks().

#define F_HAVE_AFFINITY   2

Definition at line 461 of file pullup.c.

Referenced by compute_affinity().

#define BREAK_LEFT   1
#define BREAK_RIGHT   2

Function Documentation

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

Definition at line 216 of file pullup.c.

Referenced by ff_pullup_init_context().

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

Definition at line 226 of file pullup.c.

Referenced by ff_pullup_init_context().

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

Definition at line 259 of file pullup.c.

Referenced by ff_pullup_init_context().

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

Definition at line 279 of file pullup.c.

Referenced by ff_pullup_get_buffer().

struct pullup_buffer* ff_pullup_lock_buffer ( struct pullup_buffer b,
int  parity 
)
read
void ff_pullup_release_buffer ( struct pullup_buffer b,
int  parity 
)

Definition at line 299 of file pullup.c.

Referenced by ff_pullup_flush_fields(), ff_pullup_release_frame(), and put_image().

struct pullup_buffer* ff_pullup_get_buffer ( struct pullup_context c,
int  parity 
)
read

Definition at line 306 of file pullup.c.

Referenced by ff_pullup_pack_frame(), and put_image().

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

Definition at line 343 of file pullup.c.

Referenced by ff_pullup_submit_field().

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

Definition at line 379 of file pullup.c.

Referenced by check_field_queue(), and make_field_queue().

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

Definition at line 387 of file pullup.c.

Referenced by ff_pullup_init_context().

static void check_field_queue ( struct pullup_context c)
static

Definition at line 403 of file pullup.c.

Referenced by ff_pullup_submit_field().

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

Definition at line 415 of file pullup.c.

Referenced by put_image().

void ff_pullup_flush_fields ( struct pullup_context c)

Definition at line 442 of file pullup.c.

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

Definition at line 470 of file pullup.c.

Referenced by decide_frame_length(), and foo().

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

Definition at line 480 of file pullup.c.

Referenced by decide_frame_length().

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

Definition at line 491 of file pullup.c.

Referenced by foo().

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

Definition at line 527 of file pullup.c.

Referenced by foo().

static void foo ( struct pullup_context c)
static

Definition at line 569 of file pullup.c.

Referenced by decide_frame_length().

static int decide_frame_length ( struct pullup_context c)
static

Definition at line 580 of file pullup.c.

Referenced by ff_pullup_get_frame().

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

Definition at line 624 of file pullup.c.

Referenced by ff_pullup_get_frame().

struct pullup_frame* ff_pullup_get_frame ( struct pullup_context c)
read

Definition at line 647 of file pullup.c.

Referenced by put_image().

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

Definition at line 697 of file pullup.c.

Referenced by ff_pullup_pack_frame().

void ff_pullup_pack_frame ( struct pullup_context c,
struct pullup_frame fr 
)

Definition at line 713 of file pullup.c.

Referenced by put_image().

void ff_pullup_release_frame ( struct pullup_frame fr)

Definition at line 731 of file pullup.c.

Referenced by put_image().

struct pullup_context* ff_pullup_alloc_context ( void  )
read

Definition at line 747 of file pullup.c.

Referenced by vf_open().

void ff_pullup_preinit_context ( struct pullup_context c)

Definition at line 756 of file pullup.c.

Referenced by init_pullup().

void ff_pullup_init_context ( struct pullup_context c)

Definition at line 765 of file pullup.c.

Referenced by init_pullup().

void ff_pullup_free_context ( struct pullup_context c)

Definition at line 808 of file pullup.c.

Referenced by uninit().