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 "libavutil/x86/asm.h"
#include "config.h"
#include "pullup.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 215 of file pullup.c.

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

#define F_HAVE_BREAKS   1

Definition at line 461 of file pullup.c.

Referenced by compute_breaks().

#define F_HAVE_AFFINITY   2

Definition at line 462 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 217 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 227 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 260 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 280 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 300 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 307 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 344 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 380 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 388 of file pullup.c.

Referenced by ff_pullup_init_context().

static void check_field_queue ( struct pullup_context c)
static

Definition at line 404 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 416 of file pullup.c.

Referenced by put_image().

void ff_pullup_flush_fields ( struct pullup_context c)

Definition at line 443 of file pullup.c.

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

Definition at line 471 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 481 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 492 of file pullup.c.

Referenced by foo().

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

Definition at line 528 of file pullup.c.

Referenced by foo().

static void foo ( struct pullup_context c)
static

Definition at line 570 of file pullup.c.

Referenced by decide_frame_length().

static int decide_frame_length ( struct pullup_context c)
static

Definition at line 581 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 625 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 648 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 698 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 714 of file pullup.c.

Referenced by put_image().

void ff_pullup_release_frame ( struct pullup_frame fr)

Definition at line 732 of file pullup.c.

Referenced by put_image().

struct pullup_context* ff_pullup_alloc_context ( void  )
read

Definition at line 748 of file pullup.c.

Referenced by vf_open().

void ff_pullup_preinit_context ( struct pullup_context c)

Definition at line 757 of file pullup.c.

Referenced by init_pullup().

void ff_pullup_init_context ( struct pullup_context c)

Definition at line 766 of file pullup.c.

Referenced by init_pullup().

void ff_pullup_free_context ( struct pullup_context c)

Definition at line 809 of file pullup.c.

Referenced by uninit().