/* Internal data */
hb_fifo_t * fifo_in; /* SPU ES */
hb_fifo_t * fifo_raw; /* Decoded SPU */
+ hb_fifo_t * fifo_sync;/* Synced */
hb_fifo_t * fifo_out; /* Correct Timestamps, ready to be muxed */
#endif
};
extern hb_work_object_t hb_sync;
extern hb_work_object_t hb_decmpeg2;
extern hb_work_object_t hb_decsub;
+extern hb_work_object_t hb_encsub;
extern hb_work_object_t hb_render;
extern hb_work_object_t hb_encavcodec;
extern hb_work_object_t hb_encxvid;
hb_work_object_t hb_decsub =
{
WORK_DECSUB,
- "Subtitle decoder",
+ "VOBSUB decoder",
decsubInit,
decsubWork,
decsubClose
hb_register( &hb_sync );
hb_register( &hb_decmpeg2 );
hb_register( &hb_decsub );
+ hb_register( &hb_encsub );
hb_register( &hb_render );
hb_register( &hb_encavcodec );
hb_register( &hb_encxvid );
hb_register( &hb_sync ); \
hb_register( &hb_decmpeg2 ); \
hb_register( &hb_decsub ); \
+hb_register( &hb_encsub ); \
hb_register( &hb_render ); \
hb_register( &hb_encavcodec ); \
hb_register( &hb_encxvid ); \
hb_register( &hb_sync ); \
hb_register( &hb_decmpeg2 ); \
hb_register( &hb_decsub ); \
+hb_register( &hb_encsub ); \
hb_register( &hb_render ); \
hb_register( &hb_encavcodec ); \
hb_register( &hb_encx264 ); \
WORK_SYNC = 1,
WORK_DECMPEG2,
WORK_DECSUB,
+ WORK_ENCSUB,
WORK_RENDER,
WORK_ENCAVCODEC,
WORK_ENCXVID,
*
* What about discontinuity boundaries - not delt
* with here - Van?
+ *
+ * Bypass the sync fifo altogether.
*/
if( sub->size == 0 || sub->start < cur->start )
{
} else {
/*
* Pass-Through, pop it off of the raw queue, rewrite times and
- * make it available to be muxed.
+ * make it available to be reencoded.
*/
uint64_t sub_duration;
sub = hb_fifo_get( subtitle->fifo_raw );
sub_duration = sub->stop - sub->start;
sub->start = buf_tmp->start;
sub->stop = sub->start + duration;
- hb_fifo_push( subtitle->fifo_out, sub );
+ hb_fifo_push( subtitle->fifo_sync, sub );
}
} else {
/*
if( subtitle )
{
- subtitle->fifo_in = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
- subtitle->fifo_raw = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
- subtitle->fifo_out = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+ subtitle->fifo_in = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+ subtitle->fifo_raw = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+ subtitle->fifo_sync = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
+ subtitle->fifo_out = hb_fifo_init( FIFO_CPU_MULT * cpu_count );
/*
* Disable forced subtitles if we didn't find any in the scan
w->fifo_out = subtitle->fifo_raw;
hb_list_add( job->list_work, w );
}
+
+ if( !job->indepth_scan &&
+ subtitle->format == PICTURESUB
+ && subtitle->dest == PASSTHRUSUB )
+ {
+ /*
+ * Passing through a subtitle picture, this will have to
+ * be rle encoded before muxing.
+ */
+ w = hb_get_work( WORK_ENCSUB );
+ w->fifo_in = subtitle->fifo_sync;
+ w->fifo_out = subtitle->fifo_out;
+ hb_list_add( job->list_work, w );
+ }
}
}
{
hb_fifo_close( &subtitle->fifo_in );
hb_fifo_close( &subtitle->fifo_raw );
+ hb_fifo_close( &subtitle->fifo_sync );
hb_fifo_close( &subtitle->fifo_out );
}
}