summaryrefslogtreecommitdiffstats
path: root/libhb/detelecine.c
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-11-10 01:51:36 +0000
committerjbrjake <[email protected]>2007-11-10 01:51:36 +0000
commitd95e8d52105a29a03750232c47949b37dc3075dc (patch)
tree94e4f7b25d65b692259241c7049dede3c9568ab7 /libhb/detelecine.c
parent5e6725417750adb69ccbca26d1c7cbdbfd4fd142 (diff)
First attempt at variable frame rate detelecining for NTSC video sources.
This check-in includes the library code as well as the CLI implementation. Only works with MP4 and MKV, untested with high profile, results may vary with mixed content, consult a physician if condition persists for longer than four hours. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1051 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/detelecine.c')
-rw-r--r--libhb/detelecine.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/libhb/detelecine.c b/libhb/detelecine.c
index 93b153c8d..368341dd7 100644
--- a/libhb/detelecine.c
+++ b/libhb/detelecine.c
@@ -975,7 +975,7 @@ int hb_detelecine_work( const hb_buffer_t * buf_in,
}
else
{
- goto output_frame;
+ goto discard_frame;
}
}
@@ -987,7 +987,7 @@ int hb_detelecine_work( const hb_buffer_t * buf_in,
if (!frame)
{
- goto output_frame;
+ goto discard_frame;
}
if( frame->length < 2 )
{
@@ -995,19 +995,19 @@ int hb_detelecine_work( const hb_buffer_t * buf_in,
if( !(buf_in->flags & PIC_FLAG_REPEAT_FIRST_FIELD) )
{
- goto output_frame;
+ goto discard_frame;
}
frame = pullup_get_frame( ctx );
if( !frame )
{
- goto output_frame;
+ goto discard_frame;
}
if( frame->length < 2 )
{
pullup_release_frame( frame );
- goto output_frame;
+ goto discard_frame;
}
}
}
@@ -1034,6 +1034,15 @@ int hb_detelecine_work( const hb_buffer_t * buf_in,
output_frame:
*buf_out = pv->buf_out;
return FILTER_OK;
+
+/* This and all discard_frame calls shown above are
+ the result of me restoring the functionality in
+ pullup that huevos_rancheros disabled because
+ HB couldn't handle it. */
+discard_frame:
+ *buf_out = pv->buf_out;
+ return FILTER_DROP;
+
}