It may be used under the terms of the GNU General Public License v2.
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/
-
+
#include "hb.h"
#include "opencl.h"
#include "hbffmpeg.h"
struct hb_handle_s
{
int id;
-
+
/* This thread's only purpose is to check other threads'
states */
volatile int die;
increments each time the scan thread completes*/
int scanCount;
volatile int scan_die;
-
+
/* Stash of persistent data between jobs, for stuff
like correcting frame count and framerate estimates
on multi-pass encodes where frames get dropped. */
{
int ret;
- if ((thread_count == HB_FFMPEG_THREADS_AUTO || thread_count > 0) &&
+ if ((thread_count == HB_FFMPEG_THREADS_AUTO || thread_count > 0) &&
(codec->type == AVMEDIA_TYPE_VIDEO))
{
avctx->thread_count = (thread_count == HB_FFMPEG_THREADS_AUTO) ?
av_opt_set_int(ctx, "dst_format", dstFormat, 0);
av_opt_set_int(ctx, "sws_flags", flags, 0);
- sws_setColorspaceDetails( ctx,
+ sws_setColorspaceDetails( ctx,
sws_getCoefficients( SWS_CS_DEFAULT ), // src colorspace
srcRange, // src range 0 = MPG, 1 = JPG
sws_getCoefficients( SWS_CS_DEFAULT ), // dst colorspace
hb_error("Cannot initialize resampling context");
sws_freeContext(ctx);
ctx = NULL;
- }
+ }
}
return ctx;
}
#endif
hb_log( "hb_scan: path=%s, title_index=%d", path, title_index );
- h->scan_thread = hb_scan_init( h, &h->scan_die, path, title_index,
- &h->title_set, preview_count,
+ h->scan_thread = hb_scan_init( h, &h->scan_die, path, title_index,
+ &h->title_set, preview_count,
store_previews, min_duration );
}
threshold = prog_threshold;
}
- /* One pas for Y, one pass for Cb, one pass for Cr */
+ /* One pas for Y, one pass for Cb, one pass for Cr */
for( k = 0; k < 3; k++ )
{
uint8_t * data = buf->plane[k].data;
/* HandBrake is all yuv420, so weight the average percentage of all 3 planes accordingly.*/
int average_cc = ( 2 * cc[0] + ( cc[1] / 2 ) + ( cc[2] / 2 ) ) / 3;
-
+
/* Now see if that average percentage of combed pixels surpasses the threshold percentage given by the user.*/
if( average_cc > threshold )
{
* language.
*/
job_copy->list_subtitle = hb_list_init();
-
+
for( i = 0; i < hb_list_count( job->title->list_subtitle ); i++ )
{
subtitle = hb_list_item( job->title->list_subtitle, i );
hb_title_t * title;
h->die = 1;
-
+
hb_thread_close( &h->main_thread );
while( ( title = hb_list_item( h->title_set.list_title, 0 ) ) )
#ifdef USE_QSV
hb_register(&hb_encqsv);
#endif
-
+
hb_x264_global_init();
hb_common_global_init();
char dirname[1024];
DIR * dir;
struct dirent * entry;
-
+
hb_presets_free();
/* OpenCL library (dynamically loaded) */
dup2(pfd[1], /*stderr*/ 2);
#endif
FILE * log_f = fdopen(pfd[0], "rb");
-
+
char line_buffer[500];
while(fgets(line_buffer, 500, log_f) != NULL)
{