diff -up libquicktime-1.1.3/plugins/x264/lqt_x264.c.b78 libquicktime-1.1.3/plugins/x264/lqt_x264.c --- libquicktime-1.1.3/plugins/x264/lqt_x264.c.b78 2008-12-06 15:03:10.000000000 +0100 +++ libquicktime-1.1.3/plugins/x264/lqt_x264.c 2009-10-27 22:44:02.792431855 +0100 @@ -94,6 +94,17 @@ static lqt_parameter_info_static_t encod .val_max = { .val_int = 100 }, .help_string = TRS("Influences how often B-frames are used"), }, +#if X264_BUILD >= 78 + { + .name = "x264_i_bframe_pyramid", + .real_name = TRS("B-frame pyramid"), + .type = LQT_PARAMETER_INT, + .val_default = { .val_int = 0 }, + .val_min = { .val_int = 0 }, + .val_max = { .val_int = 2 }, + .help_string = TRS("Keep some B-frames as references") + }, +#else { .name = "x264_b_bframe_pyramid", .real_name = TRS("B-frame pyramid"), @@ -103,6 +114,7 @@ static lqt_parameter_info_static_t encod .val_max = { .val_int = 1 }, .help_string = TRS("Keep some B-frames as references") }, +#endif { .name = "x264_ratecontrol", .real_name = TRS("Ratecontrol"), @@ -537,3 +549,4 @@ LQT_EXTERN lqt_init_video_codec_func_t g } return (lqt_init_video_codec_func_t)0; } + diff -up libquicktime-1.1.3/plugins/x264/x264.c.b78 libquicktime-1.1.3/plugins/x264/x264.c --- libquicktime-1.1.3/plugins/x264/x264.c.b78 2009-03-11 15:25:50.000000000 +0100 +++ libquicktime-1.1.3/plugins/x264/x264.c 2009-10-27 22:44:14.134432973 +0100 @@ -67,7 +67,11 @@ static void dump_params(x264_param_t * p lqt_dump(" i_bframe: %d\n", params->i_bframe); // 0.. X264_BFRAME_MAX lqt_dump(" b_bframe_adaptive: %d\n", params->b_bframe_adaptive); lqt_dump(" i_bframe_bias: %d\n", params->i_bframe_bias); +#if X264_BUILD >= 78 + lqt_dump(" i_bframe_pyramid: %d\n", params->i_bframe_pyramid); +#else lqt_dump(" b_bframe_pyramid: %d\n", params->b_bframe_pyramid); +#endif lqt_dump(" b_deblocking_filter: %d\n", params->b_deblocking_filter); lqt_dump(" i_deblocking_filter_alphac0: %d\n", params->i_deblocking_filter_alphac0); // -6..6 @@ -174,14 +178,21 @@ encode_nals(uint8_t *buf, int size, x264 { uint8_t *p = buf; int i; +#if X264_BUILD < 76 int s; +#endif for(i = 0; i < nnal; i++) { +#if X264_BUILD >= 76 + memcpy(p, nals[i].p_payload, nals[i].i_payload); + p+=nals[i].i_payload; +#else s = x264_nal_encode(p, &size, 1, nals + i); if(s < 0) return -1; p += s; +#endif } return p - buf; @@ -407,7 +418,11 @@ static int flush_frame(quicktime_t *file pic_out.i_pts = 0; /* Encode frames, get nals */ +#if X264_BUILD >= 76 + if(x264_encoder_encode(codec->enc, &nal, &nnal, pic_in, &pic_out)<0) +#else if(x264_encoder_encode(codec->enc, &nal, &nnal, pic_in, &pic_out)) +#endif return 0; /* Encode nals -> get h264 stream */ @@ -782,7 +797,11 @@ static int set_parameter(quicktime_t *fi ENUMPARAM("x264_i_bframe_adaptive", codec->params.i_bframe_adaptive, bframe_adaptives); #endif INTPARAM("x264_i_bframe_bias", codec->params.i_bframe_bias); +#if X264_BUILD >= 78 + INTPARAM("x264_i_bframe_pyramid", codec->params.i_bframe_pyramid); +#else INTPARAM("x264_b_bframe_pyramid", codec->params.b_bframe_pyramid); +#endif ENUMPARAM("x264_i_rc_method", codec->params.rc.i_rc_method, rc_methods); INTPARAM("x264_i_bitrate", codec->params.rc.i_bitrate); @@ -921,3 +940,4 @@ void quicktime_init_codec_x264(quicktime x264_param_default(&(codec->params)); } +