diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2005-05-15 00:47:38 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2005-05-15 00:47:38 +0000 |
commit | 342e0637ab545fe9def530ecf7fb0ac88ab2ade7 (patch) | |
tree | 90aa11cdfe8c624dd4ac8277cea5a4f40622c2cf /src | |
parent | 54611d6a05095957875bcfa984976a4c84554ea8 (diff) | |
download | xine-lib-342e0637ab545fe9def530ecf7fb0ac88ab2ade7.tar.gz xine-lib-342e0637ab545fe9def530ecf7fb0ac88ab2ade7.tar.bz2 |
nothing to see here.
i'm just renaming variables and stuff to make it somewhat closer to tvtime's cvs.
CVS patchset: 7543
CVS date: 2005/05/15 00:47:38
Diffstat (limited to 'src')
-rw-r--r-- | src/post/deinterlace/deinterlace.c | 15 | ||||
-rw-r--r-- | src/post/deinterlace/deinterlace.h | 52 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/double.c | 15 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/greedy.c | 36 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/greedy2frame.c | 33 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/linear.c | 19 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/linearblend.c | 34 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/scalerbob.c | 19 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/vfir.c | 37 | ||||
-rw-r--r-- | src/post/deinterlace/plugins/weave.c | 15 | ||||
-rw-r--r-- | src/post/deinterlace/tvtime.c | 139 |
11 files changed, 191 insertions, 223 deletions
diff --git a/src/post/deinterlace/deinterlace.c b/src/post/deinterlace/deinterlace.c index dfa398016..1f51adcc7 100644 --- a/src/post/deinterlace/deinterlace.c +++ b/src/post/deinterlace/deinterlace.c @@ -87,21 +87,6 @@ deinterlace_method_t *get_deinterlace_method( int i ) return cur->method; } -void register_deinterlace_plugin( const char *filename ) -{ - void *handle = dlopen( filename, RTLD_NOW ); - - if( !handle ) { - printf( "deinterlace: Can't load plugin '%s': %s\n", filename, dlerror() ); - } else { - deinterlace_plugin_init_t plugin_init; - plugin_init = (deinterlace_plugin_init_t) dlsym( handle, "deinterlace_plugin_init" ); - if( plugin_init ) { - plugin_init(); - } - } -} - void filter_deinterlace_methods( int accel, int fields_available ) { methodlist_item_t *prev = 0; diff --git a/src/post/deinterlace/deinterlace.h b/src/post/deinterlace/deinterlace.h index 8fa65224d..71e595c0f 100644 --- a/src/post/deinterlace/deinterlace.h +++ b/src/post/deinterlace/deinterlace.h @@ -1,5 +1,5 @@ /** - * Copyright (C) 2002 Billy Biggs <vektor@dumbterm.net>. + * Copyright (C) 2002, 2005 Billy Biggs <vektor@dumbterm.net>. * * 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 @@ -29,8 +29,6 @@ extern "C" { #endif -#define DEINTERLACE_PLUGIN_API_VERSION 0x00000004 - /** * Our deinterlacer plugin API is modeled after DScaler's. This module * represents the API that all deinterlacer plugins must export, and @@ -38,22 +36,11 @@ extern "C" { * to iterate through available plugins and select an appropriate one. */ -typedef struct deinterlace_setting_s deinterlace_setting_t; typedef struct deinterlace_method_s deinterlace_method_t; typedef struct deinterlace_scanline_data_s deinterlace_scanline_data_t; typedef struct deinterlace_frame_data_s deinterlace_frame_data_t; /** - * Callback for setting change notification. - */ -typedef void (*setting_onchange_t)(deinterlace_setting_t *); - -/** - * Interface for plugin initialization. - */ -typedef void (*deinterlace_plugin_init_t)( void ); - -/** * There are two scanline functions that every deinterlacer plugin * must implement to do its work: one for a 'copy' and one for * an 'interpolate' for the currently active field. This so so that @@ -125,51 +112,21 @@ typedef void (*deinterlace_frame_t)( uint8_t *output, int outstride, /** - * Plugin settings can be any of the following. - */ -typedef enum -{ - SETTING_ONOFF, - SETTING_YESNO, - SETTING_ITEMFROMLIST, - SETTING_SLIDER -} setting_type_t; - -/** - * Each setting provides a pointer to the value, the min, max, default - * and step increment, and if it's not 0, a function to be called - * when the parameter is updated. - */ -struct deinterlace_setting_s -{ - const char *name; - setting_type_t type; - int *value; - int defvalue; - int minvalue; - int maxvalue; - int stepvalue; - setting_onchange_t onchange; -}; - -/** * This structure defines the deinterlacer plugin. */ struct deinterlace_method_s { - int version; const char *name; const char *short_name; int fields_required; int accelrequired; int doscalerbob; - int numsettings; - deinterlace_setting_t *settings; int scanlinemode; deinterlace_interp_scanline_t interpolate_scanline; deinterlace_copy_scanline_t copy_scanline; deinterlace_frame_t deinterlace_frame; int delaysfield; /* delays output by one field relative to input */ + const char *description[ 10 ]; }; /** @@ -188,11 +145,6 @@ int get_num_deinterlace_methods( void ); deinterlace_method_t *get_deinterlace_method( int i ); /** - * Loads a deinterlace plugin from the given file. - */ -void register_deinterlace_plugin( const char *filename ); - -/** * Builds the usable method list. */ void filter_deinterlace_methods( int accel, int fieldsavailable ); diff --git a/src/post/deinterlace/plugins/double.c b/src/post/deinterlace/plugins/double.c index bb9c6c790..6d10fb270 100644 --- a/src/post/deinterlace/plugins/double.c +++ b/src/post/deinterlace/plugins/double.c @@ -51,19 +51,26 @@ static void copy_scanline( uint8_t *output, static deinterlace_method_t doublemethod = { - DEINTERLACE_PLUGIN_API_VERSION, "Line Doubler", "LineDoubler", 1, 0, 0, - 0, - 0, 1, deinterlace_scanline_double, copy_scanline, 0, - 0 + 0, + { "", + "", + "", + "", + "", + "", + "", + "", + "", + "" } }; #ifdef BUILD_TVTIME_PLUGINS diff --git a/src/post/deinterlace/plugins/greedy.c b/src/post/deinterlace/plugins/greedy.c index 07f17acfa..503f8dd34 100644 --- a/src/post/deinterlace/plugins/greedy.c +++ b/src/post/deinterlace/plugins/greedy.c @@ -163,32 +163,40 @@ static void deinterlace_greedy_packed422_scanline_mmxext( uint8_t *output, #endif } -static deinterlace_setting_t settings[] = -{ - { - "Greedy Max Comb", - SETTING_SLIDER, - &GreedyMaxComb, - 15, 0, 255, 1, - 0 - } -}; +/** + * The greedy deinterlacer introduces a one-field delay on the input. + * From the diagrams in deinterlace.h, the field being deinterlaced is + * always t-1. For this reason, our copy_scanline method is used for + * deinterlace_method_t's interpolate_scanline function, and the real + * work is done in deinterlace_method_t's copy_scanline function. + */ static deinterlace_method_t greedymethod = { - DEINTERLACE_PLUGIN_API_VERSION, "DScaler: Greedy - Low motion", "Greedy", +/* + "Motion Adaptive: Simple Detection", + "AdaptiveSimple", +*/ 3, MM_ACCEL_X86_MMXEXT, 0, 1, - settings, - 1, copy_scanline, deinterlace_greedy_packed422_scanline_mmxext, 0, - 1 + 1, + { "Uses heuristics to detect motion in the input", + "frames and reconstruct image detail where", + "possible. Use this for high quality output", + "even on monitors set to an arbitrary refresh", + "rate.", + "", + "Simple detection uses linear interpolation", + "where motion is detected, using a two-field", + "buffer. This is the Greedy: Low Motion", + "deinterlacer from DScaler." } }; #ifdef BUILD_TVTIME_PLUGINS diff --git a/src/post/deinterlace/plugins/greedy2frame.c b/src/post/deinterlace/plugins/greedy2frame.c index 739f13538..dac7d488c 100644 --- a/src/post/deinterlace/plugins/greedy2frame.c +++ b/src/post/deinterlace/plugins/greedy2frame.c @@ -51,39 +51,28 @@ static int GreedyTwoFrameThreshold2 = 8; #include "greedy2frame_template.c" #undef IS_SSE -static deinterlace_setting_t settings[] = -{ - { - "Greedy 2 Frame Luma Threshold", - SETTING_SLIDER, - &GreedyTwoFrameThreshold, - 4, 0, 128, 1, - 0 - }, - { - "Greedy 2 Frame Chroma Threshold", - SETTING_SLIDER, - &GreedyTwoFrameThreshold2, - 8, 0, 128, 1, - 0 - } -}; - static deinterlace_method_t greedymethod = { - DEINTERLACE_PLUGIN_API_VERSION, "Greedy - 2-frame (DScaler)", "Greedy2Frame", 4, MM_ACCEL_X86_MMXEXT, 0, - 2, - settings, 0, 0, 0, DeinterlaceGreedy2Frame_SSE, - 1 + 1, + { "", + "", + "", + "", + "", + "", + "", + "", + "", + "" } }; #ifdef BUILD_TVTIME_PLUGINS diff --git a/src/post/deinterlace/plugins/linear.c b/src/post/deinterlace/plugins/linear.c index a3488da70..8392cf185 100644 --- a/src/post/deinterlace/plugins/linear.c +++ b/src/post/deinterlace/plugins/linear.c @@ -49,19 +49,30 @@ static void copy_scanline( uint8_t *output, static deinterlace_method_t linearmethod = { - DEINTERLACE_PLUGIN_API_VERSION, "Linear Interpolation", "Linear", +/* + "Television: Full resolution", + "TelevisionFull", +*/ 1, 0, 0, - 0, - 0, 1, deinterlace_scanline_linear, copy_scanline, 0, - 0 + 0, + { "Expands each field independently without", + "blurring or copying in time. Use this if you", + "want TV-quality with low CPU, and you have", + "configured your monitor to run at the refresh", + "rate of the video signal.", + "", + "Full resolution mode expands each field", + "to full size for high quality fullscreen use.", + "", + "" } }; #ifdef BUILD_TVTIME_PLUGINS diff --git a/src/post/deinterlace/plugins/linearblend.c b/src/post/deinterlace/plugins/linearblend.c index abde146db..a0102fba4 100644 --- a/src/post/deinterlace/plugins/linearblend.c +++ b/src/post/deinterlace/plugins/linearblend.c @@ -306,28 +306,38 @@ static void deinterlace_scanline_linear_blend2_mmxext( uint8_t *output, static deinterlace_method_t linearblendmethod_mmxext = { - DEINTERLACE_PLUGIN_API_VERSION, "mplayer: Linear Blend", "LinearBlend", 2, MM_ACCEL_X86_MMXEXT, 0, - 0, - 0, 1, deinterlace_scanline_linear_blend_mmxext, deinterlace_scanline_linear_blend2_mmxext, 0, - 0 + 0, + { "Avoids flicker by blurring consecutive frames", + "of input. Use this if you want to run your", + "monitor at an arbitrary refresh rate and not", + "use much CPU, and are willing to sacrifice", + "detail.", + "", + "Temporal mode evenly blurs content for least", + "flicker, but with visible trails on fast motion.", + "From the linear blend deinterlacer in mplayer.", + "" } }; #endif static deinterlace_method_t linearblendmethod = { - DEINTERLACE_PLUGIN_API_VERSION, "mplayer: Linear Blend", "LinearBlend", +/* + "Blur: Temporal", + "BlurTemporal", +*/ 2, #ifdef ARCH_X86 MM_ACCEL_X86_MMX, @@ -335,13 +345,21 @@ static deinterlace_method_t linearblendmethod = 0, #endif 0, - 0, - 0, 1, deinterlace_scanline_linear_blend, deinterlace_scanline_linear_blend2, 0, - 0 + 0, + { "Avoids flicker by blurring consecutive frames", + "of input. Use this if you want to run your", + "monitor at an arbitrary refresh rate and not", + "use much CPU, and are willing to sacrifice", + "detail.", + "", + "Temporal mode evenly blurs content for least", + "flicker, but with visible trails on fast motion.", + "From the linear blend deinterlacer in mplayer.", + "" } }; #ifdef BUILD_TVTIME_PLUGINS diff --git a/src/post/deinterlace/plugins/scalerbob.c b/src/post/deinterlace/plugins/scalerbob.c index e0f4dbf5e..a5318b4ea 100644 --- a/src/post/deinterlace/plugins/scalerbob.c +++ b/src/post/deinterlace/plugins/scalerbob.c @@ -37,19 +37,30 @@ static deinterlace_method_t scalerbobmethod = { - DEINTERLACE_PLUGIN_API_VERSION, "Scaler Bob", "ScalerBob", +/* + "Television: Half Resolution", + "TelevisionHalf", +*/ 1, 0, 1, - 0, - 0, 1, 0, 0, 0, - 0 + 0, + { "Expands each field independently without", + "blurring or copying in time. Use this if you", + "want TV-quality with low CPU, and you have", + "configured your monitor to run at the refresh", + "rate of the video signal.", + "", + "Half resolution is poor quality but low CPU", + "requirements for watching in a small window.", + "", + "" } }; #ifdef BUILD_TVTIME_PLUGINS diff --git a/src/post/deinterlace/plugins/vfir.c b/src/post/deinterlace/plugins/vfir.c index b2d8fe0d4..f96111ce9 100644 --- a/src/post/deinterlace/plugins/vfir.c +++ b/src/post/deinterlace/plugins/vfir.c @@ -90,6 +90,9 @@ static void deinterlace_line( uint8_t *dst, uint8_t *lum_m4, } emms(); #else + /** + * C implementation. + */ int sum; for(;size > 0;size--) { @@ -109,19 +112,11 @@ static void deinterlace_line( uint8_t *dst, uint8_t *lum_m4, #endif } - -/** - * The commented-out method below that uses the bottom_field member is more - * like the filter as specified in the MPEG2 spec, but it doesn't seem to - * have the desired effect. - */ - static void deinterlace_scanline_vfir( uint8_t *output, deinterlace_scanline_data_t *data, int width ) { deinterlace_line( output, data->tt1, data->t0, data->m1, data->b0, data->bb1, width*2 ); - // blit_packed422_scanline( output, data->m1, width ); } static void copy_scanline( uint8_t *output, @@ -129,21 +124,17 @@ static void copy_scanline( uint8_t *output, int width ) { blit_packed422_scanline( output, data->m0, width ); - /* - if( data->bottom_field ) { - deinterlace_line( output, data->tt2, data->t1, data->m2, data->b1, data->bb2, width*2 ); - } else { - deinterlace_line( output, data->tt0, data->t1, data->m0, data->b1, data->bb0, width*2 ); - } - */ } static deinterlace_method_t vfirmethod = { - DEINTERLACE_PLUGIN_API_VERSION, "ffmpeg: Vertical Blend", "Vertical", +/* + "Blur: Vertical", + "BlurVertical", +*/ 1, #ifdef ARCH_X86 MM_ACCEL_X86_MMXEXT, @@ -151,13 +142,21 @@ static deinterlace_method_t vfirmethod = 0, #endif 0, - 0, - 0, 1, deinterlace_scanline_vfir, copy_scanline, 0, - 0 + 0, + { "Avoids flicker by blurring consecutive frames", + "of input. Use this if you want to run your", + "monitor at an arbitrary refresh rate and not", + "use much CPU, and are willing to sacrifice", + "detail.", + "", + "Vertical mode blurs favouring the most recent", + "field for less visible trails. From the", + "deinterlacer filter in ffmpeg.", + "" } }; #ifdef BUILD_TVTIME_PLUGINS diff --git a/src/post/deinterlace/plugins/weave.c b/src/post/deinterlace/plugins/weave.c index 95fa979d2..06b34ad7a 100644 --- a/src/post/deinterlace/plugins/weave.c +++ b/src/post/deinterlace/plugins/weave.c @@ -51,19 +51,26 @@ static void copy_scanline( uint8_t *output, static deinterlace_method_t weavemethod = { - DEINTERLACE_PLUGIN_API_VERSION, "Weave Last Field", "Weave", 2, 0, 0, - 0, - 0, 1, deinterlace_scanline_weave, copy_scanline, 0, - 0 + 0, + { "Only updates the most recent field", + "", + "", + "", + "", + "", + "", + "", + "", + "" } }; #ifdef BUILD_TVTIME_PLUGINS diff --git a/src/post/deinterlace/tvtime.c b/src/post/deinterlace/tvtime.c index 7e01cb5d9..1ba97d277 100644 --- a/src/post/deinterlace/tvtime.c +++ b/src/post/deinterlace/tvtime.c @@ -38,20 +38,6 @@ #include "pulldown.h" #include "tvtime.h" -/* use tvtime_t */ -#define pulldown_alg this->pulldown_alg -#define curmethod this->curmethod - -#define last_topdiff this->last_topdiff -#define last_botdiff this->last_botdiff - -#define pdoffset this->pdoffset -#define pderror this->pderror -#define pdlastbusted this->pdlastbusted -#define filmmode this->filmmode - - - /** * This is how many frames to wait until deciding if the pulldown phase * has changed or if we've really found a pulldown sequence. This is @@ -147,8 +133,8 @@ static void pulldown_merge_fields( uint8_t *output, } } - -static void calculate_pulldown_score_vektor( tvtime_t *this, uint8_t *curframe, +static void calculate_pulldown_score_vektor( tvtime_t *tvtime, + uint8_t *curframe, uint8_t *lastframe, int instride, int frame_height, @@ -156,23 +142,23 @@ static void calculate_pulldown_score_vektor( tvtime_t *this, uint8_t *curframe, { int i; - last_topdiff = 0; - last_botdiff = 0; + tvtime->last_topdiff = 0; + tvtime->last_botdiff = 0; for( i = 0; i < frame_height; i++ ) { if( i > 40 && (i & 3) == 0 && i < frame_height - 40 ) { - last_topdiff += diff_factor_packed422_scanline( curframe + (i*instride), - lastframe + (i*instride), width ); - last_botdiff += diff_factor_packed422_scanline( curframe + (i*instride) + instride, - lastframe + (i*instride) + instride, - width ); + tvtime->last_topdiff += diff_factor_packed422_scanline( curframe + (i*instride), + lastframe + (i*instride), width ); + tvtime->last_botdiff += diff_factor_packed422_scanline( curframe + (i*instride) + instride, + lastframe + (i*instride) + instride, + width ); } } } -int tvtime_build_deinterlaced_frame( tvtime_t *this, uint8_t *output, +int tvtime_build_deinterlaced_frame( tvtime_t *tvtime, uint8_t *output, uint8_t *curframe, uint8_t *lastframe, uint8_t *secondlastframe, @@ -184,64 +170,59 @@ int tvtime_build_deinterlaced_frame( tvtime_t *this, uint8_t *output, { int i; - if( pulldown_alg != PULLDOWN_VEKTOR ) { + if( tvtime->pulldown_alg != PULLDOWN_VEKTOR ) { /* If we leave vektor pulldown mode, lose our state. */ - filmmode = 0; + tvtime->filmmode = 0; } - if( pulldown_alg == PULLDOWN_VEKTOR ) { + if( tvtime->pulldown_alg == PULLDOWN_VEKTOR ) { /* Make pulldown phase decisions every top field. */ if( !bottom_field ) { int predicted; - predicted = pdoffset << 1; + predicted = tvtime->pdoffset << 1; if( predicted > PULLDOWN_SEQ_DD ) predicted = PULLDOWN_SEQ_AA; - /** - * Old algorithm: - pdoffset = determine_pulldown_offset_history( last_topdiff, last_botdiff, 1, &realbest ); - if( pdoffset & predicted ) { pdoffset = predicted; } else { pdoffset = realbest; } - */ - - calculate_pulldown_score_vektor( this, curframe, lastframe, instride, frame_height, width ); - - pdoffset = determine_pulldown_offset_short_history_new( last_topdiff, last_botdiff, 1, predicted ); - //pdoffset = determine_pulldown_offset_history_new( last_topdiff, last_botdiff, 1, predicted ); + calculate_pulldown_score_vektor( tvtime, curframe, lastframe, + instride, frame_height, width ); + tvtime->pdoffset = determine_pulldown_offset_short_history_new( tvtime->last_topdiff, + tvtime->last_botdiff, + 1, predicted ); /* 3:2 pulldown state machine. */ - if( !pdoffset ) { + if( !tvtime->pdoffset ) { /* No pulldown offset applies, drop out of pulldown immediately. */ - pdlastbusted = 0; - pderror = PULLDOWN_ERROR_WAIT; - } else if( pdoffset != predicted ) { - if( pdlastbusted ) { - pdlastbusted--; - pdoffset = predicted; + tvtime->pdlastbusted = 0; + tvtime->pderror = PULLDOWN_ERROR_WAIT; + } else if( tvtime->pdoffset != predicted ) { + if( tvtime->pdlastbusted ) { + tvtime->pdlastbusted--; + tvtime->pdoffset = predicted; } else { - pderror = PULLDOWN_ERROR_WAIT; + tvtime->pderror = PULLDOWN_ERROR_WAIT; } } else { - if( pderror ) { - pderror--; + if( tvtime->pderror ) { + tvtime->pderror--; } - if( !pderror ) { - pdlastbusted = PULLDOWN_ERROR_THRESHOLD; + if( !tvtime->pderror ) { + tvtime->pdlastbusted = PULLDOWN_ERROR_THRESHOLD; } } - if( !pderror ) { - // We're in pulldown, reverse it. - if( !filmmode ) { + if( !tvtime->pderror ) { + /* We're in pulldown, reverse it. */ + if( !tvtime->filmmode ) { printf( "Film mode enabled.\n" ); - filmmode = 1; + tvtime->filmmode = 1; } - if( pulldown_drop( pdoffset, 0 ) ) + if( pulldown_drop( tvtime->pdoffset, 0 ) ) return 0; - if( pulldown_source( pdoffset, 0 ) ) { + if( pulldown_source( tvtime->pdoffset, 0 ) ) { pulldown_merge_fields( output, curframe, curframe + instride, width, frame_height, instride*2, outstride ); } else { @@ -251,16 +232,16 @@ int tvtime_build_deinterlaced_frame( tvtime_t *this, uint8_t *output, return 1; } else { - if( filmmode ) { + if( tvtime->filmmode ) { printf( "Film mode disabled.\n" ); - filmmode = 0; + tvtime->filmmode = 0; } } - } else if( !pderror ) { - if( pulldown_drop( pdoffset, 1 ) ) + } else if( !tvtime->pderror ) { + if( pulldown_drop( tvtime->pdoffset, 1 ) ) return 0; - if( pulldown_source( pdoffset, 1 ) ) { + if( pulldown_source( tvtime->pdoffset, 1 ) ) { pulldown_merge_fields( output, curframe, lastframe + instride, width, frame_height, instride*2, outstride ); } else { @@ -272,14 +253,14 @@ int tvtime_build_deinterlaced_frame( tvtime_t *this, uint8_t *output, } } - if( !curmethod->scanlinemode ) { + if( !tvtime->curmethod->scanlinemode ) { deinterlace_frame_data_t data; data.f0 = curframe; data.f1 = lastframe; data.f2 = secondlastframe; - curmethod->deinterlace_frame( output, outstride, &data, bottom_field, second_field, + tvtime->curmethod->deinterlace_frame( output, outstride, &data, bottom_field, second_field, width, frame_height ); } else { @@ -338,7 +319,7 @@ int tvtime_build_deinterlaced_frame( tvtime_t *this, uint8_t *output, data.bb3 = (i > 1) ? (secondlastframe + (instride*3)) : (secondlastframe + instride); } - curmethod->interpolate_scanline( output, &data, width ); + tvtime->curmethod->interpolate_scanline( output, &data, width ); output += outstride; scanline++; @@ -368,7 +349,7 @@ int tvtime_build_deinterlaced_frame( tvtime_t *this, uint8_t *output, } /* Copy a scanline. */ - curmethod->copy_scanline( output, &data, width ); + tvtime->curmethod->copy_scanline( output, &data, width ); curframe += instride * 2; lastframe += instride * 2; secondlastframe += instride * 2; @@ -390,7 +371,7 @@ int tvtime_build_deinterlaced_frame( tvtime_t *this, uint8_t *output, } -int tvtime_build_copied_field( tvtime_t *this, uint8_t *output, +int tvtime_build_copied_field( tvtime_t *tvtime, uint8_t *output, uint8_t *curframe, int bottom_field, int width, @@ -438,26 +419,26 @@ int tvtime_build_copied_field( tvtime_t *this, uint8_t *output, tvtime_t *tvtime_new_context(void) { - tvtime_t *this; + tvtime_t *tvtime; - this = malloc(sizeof(tvtime_t)); + tvtime = malloc(sizeof(tvtime_t)); - pulldown_alg = PULLDOWN_NONE; + tvtime->pulldown_alg = PULLDOWN_NONE; - curmethod = NULL; + tvtime->curmethod = NULL; - tvtime_reset_context(this); + tvtime_reset_context(tvtime); - return this; + return tvtime; } -void tvtime_reset_context( tvtime_t *this ) +void tvtime_reset_context( tvtime_t *tvtime ) { - last_topdiff = 0; - last_botdiff = 0; + tvtime->last_topdiff = 0; + tvtime->last_botdiff = 0; - pdoffset = PULLDOWN_SEQ_AA; - pderror = PULLDOWN_ERROR_WAIT; - pdlastbusted = 0; - filmmode = 0; + tvtime->pdoffset = PULLDOWN_SEQ_AA; + tvtime->pderror = PULLDOWN_ERROR_WAIT; + tvtime->pdlastbusted = 0; + tvtime->filmmode = 0; } |