xine-lib 1.2.11
Macros | Functions
pulldown.h File Reference
#include <stdint.h>
#include "speedy.h"

Go to the source code of this file.

Macros

#define PULLDOWN_SEQ_AA   (1<<0) /* next - prev */
 
#define PULLDOWN_SEQ_AB   (1<<1) /* prev - next */
 
#define PULLDOWN_SEQ_BC   (1<<2) /* prev - next */
 
#define PULLDOWN_SEQ_CC   (1<<3) /* next - prev */
 
#define PULLDOWN_SEQ_DD   (1<<4) /* next - prev */
 
#define PULLDOWN_ACTION_NEXT_PREV   (1<<0) /* next - prev */
 
#define PULLDOWN_ACTION_PREV_NEXT   (1<<1) /* prev - next */
 

Functions

int pulldown_source (int action, int bottom_field)
 
int determine_pulldown_offset (int top_repeat, int bot_repeat, int tff, int last_offset)
 
int determine_pulldown_offset_history (int top_repeat, int bot_repeat, int tff, int *realbest)
 
int determine_pulldown_offset_history_new (int top_repeat, int bot_repeat, int tff, int predicted)
 
int determine_pulldown_offset_short_history_new (int top_repeat, int bot_repeat, int tff, int predicted)
 
int determine_pulldown_offset_dalias (pulldown_metrics_t *old_peak, pulldown_metrics_t *old_relative, pulldown_metrics_t *old_mean, pulldown_metrics_t *new_peak, pulldown_metrics_t *new_relative, pulldown_metrics_t *new_mean)
 
void diff_factor_packed422_frame (pulldown_metrics_t *peak, pulldown_metrics_t *rel, pulldown_metrics_t *mean, uint8_t *old, uint8_t *new, int w, int h, int os, int ns)
 
int pulldown_drop (int action, int bottom_field)
 

Macro Definition Documentation

◆ PULLDOWN_ACTION_NEXT_PREV

#define PULLDOWN_ACTION_NEXT_PREV   (1<<0) /* next - prev */

◆ PULLDOWN_ACTION_PREV_NEXT

#define PULLDOWN_ACTION_PREV_NEXT   (1<<1) /* prev - next */

◆ PULLDOWN_SEQ_AA

#define PULLDOWN_SEQ_AA   (1<<0) /* next - prev */

Copyright (c) 2001, 2002, 2003 Billy Biggs vekto.nosp@m.r@du.nosp@m.mbter.nosp@m.m.ne.nosp@m.t.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA.

◆ PULLDOWN_SEQ_AB

#define PULLDOWN_SEQ_AB   (1<<1) /* prev - next */

◆ PULLDOWN_SEQ_BC

#define PULLDOWN_SEQ_BC   (1<<2) /* prev - next */

◆ PULLDOWN_SEQ_CC

#define PULLDOWN_SEQ_CC   (1<<3) /* next - prev */

◆ PULLDOWN_SEQ_DD

#define PULLDOWN_SEQ_DD   (1<<4) /* next - prev */

Function Documentation

◆ determine_pulldown_offset()

int determine_pulldown_offset ( int  top_repeat,
int  bot_repeat,
int  tff,
int  last_offset 
)

Flag Pattern Treat as

on DVD last offset

T B T bff 3 B T bff 4 B T B tff 3 T B tff 4

Detect our pattern.

Truth table:

ref repeat, frame repeat valid ===========+==============+======= 0 0 -> 1 0 1 -> 1 1 0 -> 0 1 1 -> 1

Check if the 3:2 pulldown pattern we previously decided on is valid for this set. If so, we use that.

References bff_bot_pattern, bff_top_pattern, PULLDOWN_SEQ_AA, PULLDOWN_SEQ_DD, tff_bot_pattern, and tff_top_pattern.

◆ determine_pulldown_offset_dalias()

int determine_pulldown_offset_dalias ( pulldown_metrics_t old_peak,
pulldown_metrics_t old_relative,
pulldown_metrics_t old_mean,
pulldown_metrics_t new_peak,
pulldown_metrics_t new_relative,
pulldown_metrics_t new_mean 
)

◆ determine_pulldown_offset_history()

int determine_pulldown_offset_history ( int  top_repeat,
int  bot_repeat,
int  tff,
int *  realbest 
)

◆ determine_pulldown_offset_history_new()

int determine_pulldown_offset_history_new ( int  top_repeat,
int  bot_repeat,
int  tff,
int  predicted 
)

We have a valid sequence, but it doesn't match our prediction. Return the first 'valid' sequence in the list.

The predicted phase is still valid.

References bothistory, bothistory_diff, HISTORY_SIZE, histpos, reference, tff_bot_pattern, tff_top_pattern, tophistory, and tophistory_diff.

◆ determine_pulldown_offset_short_history_new()

int determine_pulldown_offset_short_history_new ( int  top_repeat,
int  bot_repeat,
int  tff,
int  predicted 
)

We have a valid sequence, but it doesn't match our prediction. Return the first 'valid' sequence in the list.

The predicted phase is still valid.

References bothistory, bothistory_diff, HISTORY_SIZE, histpos, reference, tff_bot_pattern, tff_top_pattern, tophistory, and tophistory_diff.

Referenced by tvtime_build_deinterlaced_frame().

◆ diff_factor_packed422_frame()

void diff_factor_packed422_frame ( pulldown_metrics_t peak,
pulldown_metrics_t rel,
pulldown_metrics_t mean,
uint8_t *  old,
uint8_t *  new,
int  w,
int  h,
int  os,
int  ns 
)

◆ pulldown_drop()

int pulldown_drop ( int  action,
int  bottom_field 
)

◆ pulldown_source()

int pulldown_source ( int  action,
int  bottom_field 
)

Returns 1 if the source is the previous field, 0 if it is the next field, for the given action.

References PULLDOWN_SEQ_AA, PULLDOWN_SEQ_AB, PULLDOWN_SEQ_BC, PULLDOWN_SEQ_CC, and PULLDOWN_SEQ_DD.

Referenced by tvtime_build_deinterlaced_frame().