p->b_fake_interlaced = atobool(value);
OPT("frame-packing")
p->i_frame_packing = atoi(value);
+ OPT("stitchable")
+ p->b_stitchable = atobool(value);
OPT("opencl")
p->b_opencl = atobool( value );
OPT("opencl-clbin")
s += sprintf( s, " decimate=%d", p->analyse.b_dct_decimate );
s += sprintf( s, " interlaced=%s", p->b_interlaced ? p->b_tff ? "tff" : "bff" : p->b_fake_interlaced ? "fake" : "0" );
s += sprintf( s, " bluray_compat=%d", p->b_bluray_compat );
+ if( p->b_stitchable )
+ s += sprintf( s, " stitchable=%d", p->b_stitchable );
s += sprintf( s, " constrained_intra=%d", p->b_constrained_intra );
BOOLIFY( b_fake_interlaced );
BOOLIFY( b_open_gop );
BOOLIFY( b_bluray_compat );
+ BOOLIFY( b_stitchable );
BOOLIFY( b_full_recon );
BOOLIFY( b_opencl );
BOOLIFY( analyse.b_transform_8x8 );
total_qp_aq += qp_aq;
p = next;
}
- h->pps->i_pic_init_qp = SPEC_QP( (int)(total_qp_aq / rc->num_entries + 0.5) );
+ if( !h->param.b_stitchable )
+ h->pps->i_pic_init_qp = SPEC_QP( (int)(total_qp_aq / rc->num_entries + 0.5) );
x264_free( stats_buf );
pps->b_weighted_pred = param->analyse.i_weighted_pred > 0;
pps->b_weighted_bipred = param->analyse.b_weighted_bipred ? 2 : 0;
- pps->i_pic_init_qp = param->rc.i_rc_method == X264_RC_ABR ? 26 + QP_BD_OFFSET : SPEC_QP( param->rc.i_qp_constant );
+ pps->i_pic_init_qp = param->rc.i_rc_method == X264_RC_ABR || param->b_stitchable ? 26 + QP_BD_OFFSET : SPEC_QP( param->rc.i_qp_constant );
pps->i_pic_init_qs = 26 + QP_BD_OFFSET;
pps->i_chroma_qp_index_offset = param->analyse.i_chroma_qp_offset;
H0( " --frames <integer> Maximum number of frames to encode\n" );
H0( " --level <string> Specify level (as defined by Annex A)\n" );
H1( " --bluray-compat Enable compatibility hacks for Blu-ray support\n" );
+ H1( " --stitchable Don't optimize headers based on video content\n"
+ " Ensures ability to recombine a segmented encode\n" );
H1( "\n" );
H1( " -v, --verbose Print stats for each frame\n" );
H1( " --no-progress Don't show the progress indicator while encoding\n" );
{ "dts-compress", no_argument, NULL, OPT_DTS_COMPRESSION },
{ "output-csp", required_argument, NULL, OPT_OUTPUT_CSP },
{ "input-range", required_argument, NULL, OPT_INPUT_RANGE },
+ { "stitchable", no_argument, NULL, 0 },
{0, 0, 0, 0}
};
#include "x264_config.h"
-#define X264_BUILD 133
+#define X264_BUILD 134
/* Application developers planning to link against a shared library version of
* libx264 from a Microsoft Visual Studio or similar development environment
int b_fake_interlaced;
+ /* Don't optimize header parameters based on video content, e.g. ensure that splitting an input video, compressing
+ * each part, and stitching them back together will result in identical SPS/PPS. This is necessary for stitching
+ * with container formats that don't allow multiple SPS/PPS. */
+ int b_stitchable;
+
int b_opencl; /* use OpenCL when available */
int i_opencl_device; /* specify count of GPU devices to skip, for CLI users */
void *opencl_device_id; /* pass explicit cl_device_id as void*, for API users */