[79905] trunk/dports/multimedia

jeremyhu at macports.org jeremyhu at macports.org
Wed Jun 29 00:41:42 PDT 2011


Revision: 79905
          http://trac.macports.org/changeset/79905
Author:   jeremyhu at macports.org
Date:     2011-06-29 00:41:42 -0700 (Wed, 29 Jun 2011)
Log Message:
-----------
multimedia: Revision bumps to force rebuild against new x264

Modified Paths:
--------------
    trunk/dports/multimedia/MPlayer/Portfile
    trunk/dports/multimedia/VLC/Portfile
    trunk/dports/multimedia/VLC09/Portfile
    trunk/dports/multimedia/avidemux/Portfile
    trunk/dports/multimedia/ffmpeg/Portfile
    trunk/dports/multimedia/transcode/Portfile

Added Paths:
-----------
    trunk/dports/multimedia/avidemux/files/patch-x264.diff

Modified: trunk/dports/multimedia/MPlayer/Portfile
===================================================================
--- trunk/dports/multimedia/MPlayer/Portfile	2011-06-29 07:40:52 UTC (rev 79904)
+++ trunk/dports/multimedia/MPlayer/Portfile	2011-06-29 07:41:42 UTC (rev 79905)
@@ -6,6 +6,7 @@
 
 name                MPlayer
 version             1.0rc4
+revision            1
 categories          multimedia
 maintainers         nomaintainer
 description         The Unix movie player

Modified: trunk/dports/multimedia/VLC/Portfile
===================================================================
--- trunk/dports/multimedia/VLC/Portfile	2011-06-29 07:40:52 UTC (rev 79904)
+++ trunk/dports/multimedia/VLC/Portfile	2011-06-29 07:41:42 UTC (rev 79905)
@@ -6,7 +6,7 @@
 
 name                VLC
 version             1.0.6
-revision            5
+revision            6
 
 categories          multimedia
 

Modified: trunk/dports/multimedia/VLC09/Portfile
===================================================================
--- trunk/dports/multimedia/VLC09/Portfile	2011-06-29 07:40:52 UTC (rev 79904)
+++ trunk/dports/multimedia/VLC09/Portfile	2011-06-29 07:41:42 UTC (rev 79905)
@@ -5,7 +5,7 @@
 
 name                VLC09
 version             0.9.10
-revision            6
+revision            7
 
 categories          multimedia
 

Modified: trunk/dports/multimedia/avidemux/Portfile
===================================================================
--- trunk/dports/multimedia/avidemux/Portfile	2011-06-29 07:40:52 UTC (rev 79904)
+++ trunk/dports/multimedia/avidemux/Portfile	2011-06-29 07:41:42 UTC (rev 79905)
@@ -5,7 +5,7 @@
 
 name                avidemux
 version             2.5.3
-revision            4
+revision            5
 categories          multimedia
 platforms           darwin
 maintainers         nomaintainer
@@ -26,7 +26,8 @@
 
 depends_build-append \
                     port:pkgconfig \
-                    port:yasm
+                    port:yasm \
+                    port:dos2unix
 
 depends_lib-append  port:gtk2 \
                     path:lib/pkgconfig/glib-2.0.pc:glib2 \
@@ -42,8 +43,13 @@
                     patch-ffmpeg-libs-naming.diff \
                     patch-ffmpeg-configure.diff \
                     patch-no-bundles.diff \
-                    patch-libsdl_CMakeLists.txt.diff
+                    patch-libsdl_CMakeLists.txt.diff \
+                    patch-x264.diff
 
+pre-patch {
+    system "cd ${worksrcpath}/plugins/ADM_videoEncoder/ADM_vidEnc_x264 && dos2unix *.h *.cpp"
+}
+
 # do a out of place build
 pre-configure {
     file mkdir ${workpath}/build

Added: trunk/dports/multimedia/avidemux/files/patch-x264.diff
===================================================================
--- trunk/dports/multimedia/avidemux/files/patch-x264.diff	                        (rev 0)
+++ trunk/dports/multimedia/avidemux/files/patch-x264.diff	2011-06-29 07:41:42 UTC (rev 79905)
@@ -0,0 +1,1191 @@
+diff -Naurp plugins/ADM_videoEncoder/ADM_vidEnc_x264/encoder.cpp plugins/ADM_videoEncoder/ADM_vidEnc_x264/encoder.cpp
+--- plugins/ADM_videoEncoder/ADM_vidEnc_x264/encoder.cpp	2011-06-29 00:22:07.000000000 -0700
++++ plugins/ADM_videoEncoder/ADM_vidEnc_x264/encoder.cpp	2011-06-29 00:38:27.000000000 -0700
+@@ -193,29 +193,10 @@ int x264Encoder::open(vidEncVideoPropert
+ 	_buffer = new uint8_t[_bufferSize];
+ 
+ 	memcpy(&_properties, properties, sizeof(vidEncVideoProperties));
+-	updateEncodeParameters(&_properties);
+-
+-	_param.i_width = _properties.width;
+-	_param.i_height = _properties.height;
+-	_param.i_fps_num = _properties.fpsNum;
+-	_param.i_fps_den = _properties.fpsDen;
+-
+-	if (_options.getSarAsInput())
+-	{
+-		_param.vui.i_sar_width = _properties.parWidth;
+-		_param.vui.i_sar_height = _properties.parHeight;
+-	}
+-
+-	if (properties->flags & ADM_VIDENC_FLAG_GLOBAL_HEADER)
+-		_param.b_repeat_headers = 0;
+-	else
+-		_param.b_repeat_headers = 1;
+ 
+ 	properties->supportedCspsCount = 1;
+ 	properties->supportedCsps = supportedCsps;
+ 
+-	printParam(&_param);
+-
+ 	return ADM_VIDENC_ERR_SUCCESS;
+ }
+ 
+@@ -245,6 +226,7 @@ int x264Encoder::beginPass(vidEncPassPar
+ 	char *logFileName = NULL;
+ 
+ 	printf("[x264] begin pass %d/%d\n", _currentPass, _passCount);
++	updateEncodeParameters(&_properties);
+ 
+ 	if (_passCount > 1)
+ 	{
+@@ -278,6 +260,12 @@ int x264Encoder::beginPass(vidEncPassPar
+ 		_param.rc.b_stat_read = 0;
+ 	}
+ 
++#if X264_BUILD > 85
++	if (_passCount > 1 && _currentPass == 1 && _options.getFastFirstPass())
++		x264_param_apply_fastfirstpass(&_param);
++#endif
++
++	printParam(&_param);
+ 	_handle = x264_encoder_open(&_param);
+ 
+ 	if (logFileName)
+@@ -327,7 +315,6 @@ int x264Encoder::encodeFrame(vidEncEncod
+ 		_picture.img.i_plane = 3;
+ 	}
+ 
+-#if X264_BUILD > 75
+ 	if (x264_encoder_encode(_handle, &nal, &nalCount, encodeParams->frameData[0] ? &_picture : NULL, &picture_out) < 0)
+ 	{
+ 		printf("[x264] Error encoding\n");
+@@ -343,80 +330,27 @@ int x264Encoder::encodeFrame(vidEncEncod
+ 	}
+ 
+ 	encodeParams->encodedDataSize = size;
+-#else
+-	if (x264_encoder_encode(_handle, &nal, &nalCount, encodeParams->frameData[0] ? &_picture : NULL, &picture_out) < 0)
+-	{
+-		printf("[x264] Error encoding\n");
+-		return ADM_VIDENC_ERR_FAILED;
+-	}
+-
+-	int size = 0;
+-	int currentNal, sizemax;
+-
+-	for (int i = 0; i < nalCount; i++)
+-	{
+-		sizemax = 0xfffffff;
+-
+-		if (!_param.b_repeat_headers)
+-			size += 4;
+-
+-		currentNal = x264_nal_encode(_buffer + size, &sizemax, _param.b_repeat_headers, &nal[i]);
+-
+-		if (!_param.b_repeat_headers)
+-		{
+-			// Need to put size (assuming nal_size=4)
+-			_buffer[size + 0 - 4] = (currentNal >> 24) & 0xff;
+-			_buffer[size + 1 - 4] = (currentNal >> 16) & 0xff;
+-			_buffer[size + 2 - 4] = (currentNal >> 8) & 0xff;
+-			_buffer[size + 3 - 4] = (currentNal >> 0) & 0xff;
+-		}
+-
+-		size += currentNal;
+-	}
+-
+-	encodeParams->encodedDataSize = size;
+-#endif
+ 
+ 	_currentFrame++;
+ 	encodeParams->ptsFrame = picture_out.i_pts;	// In fact it is the picture number in out case
+ 
+-	switch (picture_out.i_type)
++	if (picture_out.b_keyframe)
++		encodeParams->frameType = ADM_VIDENC_FRAMETYPE_IDR;
++	else
+ 	{
+-		case X264_TYPE_IDR:
+-			encodeParams->frameType = ADM_VIDENC_FRAMETYPE_IDR;
+-#if X264_BUILD < 76
+-			if(!_param.b_repeat_headers && _seiUserData && !picture_out.i_pts)
+-			{
+-				// Put our SEI front...
+-				// first a temp location...
+-				uint8_t tmpBuffer[size];
+-				memcpy(tmpBuffer, _buffer, size);
+-
+-				// Put back out SEI and add Size
+-				_buffer[0] = (_seiUserDataLen >> 24) & 0xff;
+-				_buffer[1] = (_seiUserDataLen >> 16) & 0xff;
+-				_buffer[2] = (_seiUserDataLen >> 8) & 0xff;
+-				_buffer[3] = (_seiUserDataLen >> 0) & 0xff;
+-
+-				memcpy(_buffer + 4, _seiUserData, _seiUserDataLen);
+-				memcpy(_buffer + 4 + _seiUserDataLen, tmpBuffer, size);
+-
+-				size += 4 + _seiUserDataLen;
+-				encodeParams->encodedDataSize = size; // update total size
+-			}
+-#endif
+-
+-			break;
+-		case X264_TYPE_I:
+-		case X264_TYPE_P:
+-			encodeParams->frameType = ADM_VIDENC_FRAMETYPE_P;
+-			break;
+-		case X264_TYPE_B:
+-		case X264_TYPE_BREF:
+-			encodeParams->frameType = ADM_VIDENC_FRAMETYPE_B;
+-			break;
+-		default:
+-			encodeParams->frameType = ADM_VIDENC_FRAMETYPE_NULL;
++		switch (picture_out.i_type)
++		{
++			case X264_TYPE_I:
++			case X264_TYPE_P:
++				encodeParams->frameType = ADM_VIDENC_FRAMETYPE_P;
++				break;
++			case X264_TYPE_B:
++			case X264_TYPE_BREF:
++				encodeParams->frameType = ADM_VIDENC_FRAMETYPE_B;
++				break;
++			default:
++				encodeParams->frameType = ADM_VIDENC_FRAMETYPE_NULL;
++		}
+ 	}
+ 
+ 	encodeParams->quantiser = picture_out.i_qpplus1 - 1;
+@@ -425,7 +359,6 @@ int x264Encoder::encodeFrame(vidEncEncod
+ 	return ADM_VIDENC_ERR_SUCCESS;
+ }
+ 
+-#if X264_BUILD > 75
+ int x264Encoder::encodeNals(uint8_t *buf, int size, x264_nal_t *nals, int nalCount, bool skipSei)
+ {
+     uint8_t *p = buf;
+@@ -454,7 +387,6 @@ int x264Encoder::encodeNals(uint8_t *buf
+ 
+     return p - buf;
+ }
+-#endif
+ 
+ bool x264Encoder::createHeader(void)
+ {
+@@ -467,98 +399,9 @@ bool x264Encoder::createHeader(void)
+ 	if (_extraData)
+ 		delete _extraData;
+ 
+-#if X264_BUILD > 75
+ 	_extraDataSize = x264_encoder_headers(_handle, &nal, &nalCount);
+ 	_extraData = new uint8_t[_extraDataSize];
+ 	_extraDataSize = encodeNals(_extraData, _extraDataSize, nal, nalCount, true);
+-#else
+-	uint32_t offset = 0;
+-	uint8_t buffer[X264_MAX_HEADER_SIZE];
+-	uint8_t picParam[X264_MAX_HEADER_SIZE];
+-	uint8_t seqParam[X264_MAX_HEADER_SIZE];
+-	uint8_t sei[X264_MAX_HEADER_SIZE];
+-	int picParamLen = 0, seqParamLen = 0, seiParamLen = 0, len;
+-	int sz;
+-
+-	_extraData = new uint8_t[X264_MAX_HEADER_SIZE];
+-	_extraDataSize = 0;
+-
+-	x264_encoder_headers(_handle, &nal, &nalCount);
+-
+-	printf("[x264] Nal count: %d\n", nalCount);
+-
+-	// Now encode them
+-	for (int i = 0; i < nalCount; i++)
+-	{
+-		switch (nal[i].i_type)
+-		{
+-		case H264_NAL_TYPE_SEQ_PARAM:
+-			sz = x264_nal_encode(seqParam, &seqParamLen, 0, &nal[i]);
+-			break;
+-		case H264_NAL_TYPE_PIC_PARAM:
+-			sz = x264_nal_encode(picParam, &picParamLen, 0, &nal[i]);
+-			break;
+-		case H264_NAL_TYPE_SEI:
+-			sz = x264_nal_encode(sei, &seiParamLen, 0, &nal[i]);
+-			break;
+-		default:
+-			printf("[x264] Unknown type %d in nal %d\n", nal[i].i_type, i);
+-			sz = x264_nal_encode(buffer, &len, 0, &nal[i]);
+-		}
+-
+-		if (sz <= 0)
+-		{
+-			printf("[x264] Cannot encode nal header %d\n", i);
+-
+-			return false;
+-		}
+-	}
+-
+-	// Now that we got all the nals encoded, time to build the avcC atom
+-	// Check we have everything we want
+-	if (!picParamLen || !seqParamLen)
+-	{
+-		printf("[x264] Seqparam or PicParam not found\n");
+-		return false;
+-	}
+-
+-	// Fill header
+-	_extraData[0] = 1;		// Version
+-	_extraData[1] = seqParam[1];	//0x42; // AVCProfileIndication
+-	_extraData[2] = seqParam[2];	//0x00; // profile_compatibility
+-	_extraData[3] = seqParam[3];	//0x0D; // AVCLevelIndication
+-	_extraData[4] = 0xFC + 3;	// lengthSizeMinusOne 
+-	_extraData[5] = 0xE0 + 1;	// nonReferenceDegredationPriorityLow
+-
+-	offset = 6;
+-	_extraData[offset] = seqParamLen >> 8;
+-	_extraData[offset + 1] = seqParamLen & 0xff;
+-
+-	offset += 2;
+-	memcpy(_extraData + offset, seqParam, seqParamLen);
+-
+-	offset += seqParamLen;
+-	_extraData[offset] = 1;	// numOfPictureParameterSets
+-
+-	offset++;
+-	_extraData[offset] = picParamLen >> 8;
+-	_extraData[offset + 1] = picParamLen & 0xff;
+-
+-	offset += 2;
+-	memcpy(_extraData + offset, picParam, picParamLen);
+-
+-	offset += picParamLen;
+-
+-	// Where x264 stores all its header, save it for later use
+-	if (seiParamLen)
+-	{
+-		_seiUserDataLen = seiParamLen;
+-		_seiUserData = new uint8_t[_seiUserDataLen];
+-		memcpy(_seiUserData, sei, _seiUserDataLen);
+-	}
+-
+-	_extraDataSize = offset;
+-#endif
+ 
+ 	printf("[x264] generated %d extra bytes for header\n", _extraDataSize);
+ 
+@@ -624,10 +467,16 @@ void x264Encoder::printParam(x264_param_
+ 
+ 	printf("\n[x264] i_width = %d, i_height = %d\n", x264Param->i_width, x264Param->i_height);
+ 	printf("[x264] i_csp = %d\n", x264Param->i_csp);	
++#if X264_BUILD > 88
++	printf("[x264] i_nal_hrd = %d\n", x264Param->i_nal_hrd);
++#endif
+ 	printf("[x264] i_fps_num = %d, i_fps_den = %d\n", x264Param->i_fps_num, x264Param->i_fps_den);
+ 	printf("[x264] rc.i_rc_method = %d\n", x264Param->rc.i_rc_method);
+ 	printf("[x264] rc.i_bitrate = %d\n", x264Param->rc.i_bitrate);
+ 	printf("[x264] rc.f_rf_constant = %f\n", x264Param->rc.f_rf_constant);
++#if X264_BUILD > 89
++	printf("[x264] rc.f_rf_constant_max = %f\n", x264Param->rc.f_rf_constant_max);
++#endif
+ 	printf("[x264] rc.i_qp_constant = %d\n", x264Param->rc.i_qp_constant);	
+ 	printf("[x264] analyse.i_subpel_refine = %d\n", x264Param->analyse.i_subpel_refine);
+ 	printf("[x264] analyse.i_me_method = %d\n", x264Param->analyse.i_me_method);
+@@ -639,22 +488,31 @@ void x264Encoder::printParam(x264_param_
+ 	printf("[x264] analyse.b_transform_8x8 = %d\n", x264Param->analyse.b_transform_8x8);
+ 	printf("[x264] analyse.inter = %d\n", x264Param->analyse.inter);
+ 	printf("[x264] b_cabac = %d\n", x264Param->b_cabac);
++#if X264_BUILD > 114
++	printf("[x264] b_open_gop = %d\n", x264Param->b_open_gop);
++	printf("[x264] b_bluray_compat = %d\n", x264Param->b_bluray_compat);
++#elif X264_BUILD > 101
++	printf("[x264] i_open_gop = %d\n", x264Param->i_open_gop);
++#endif
+ 	printf("[x264] b_interlaced = %d\n", x264Param->b_interlaced);
++#if X264_BUILD > 88
++	printf("[x264] b_tff = %d\n", x264Param->b_tff);
++#endif
++#if X264_BUILD > 95
++	printf("[x264] b_fake_interlaced = %d\n", x264Param->b_fake_interlaced);
++#endif
+ 	printf("[x264] b_deblocking_filter = %d\n", x264Param->b_deblocking_filter);
+ 	printf("[x264] i_deblocking_filter_alphac0 = %d\n", x264Param->i_deblocking_filter_alphac0);
+ 	printf("[x264] i_deblocking_filter_beta = %d\n", x264Param->i_deblocking_filter_beta);
+ 	printf("[x264] i_bframe = %d\n", x264Param->i_bframe);
+ 	printf("[x264] i_bframe_bias = %d\n", x264Param->i_bframe_bias);
+ 	printf("[x264] i_frame_reference = %d\n", x264Param->i_frame_reference);
+-#if X264_BUILD >= 78
+ 	printf("[x264] i_bframe_pyramid = %d\n", x264Param->i_bframe_pyramid);
+-#else
+-	printf("[x264] b_bframe_pyramid = %d\n", x264Param->b_bframe_pyramid);
+-#endif
+ 	printf("[x264] i_bframe_adaptive = %d\n", x264Param->i_bframe_adaptive);
+ 	printf("[x264] i_keyint_max = %d\n", x264Param->i_keyint_max);
+ 	printf("[x264] i_keyint_min = %d\n", x264Param->i_keyint_min);
+ 	printf("[x264] i_scenecut_threshold = %d\n", x264Param->i_scenecut_threshold);
++	printf("[x264] b_intra_refresh = %d\n", x264Param->b_intra_refresh);
+ 	printf("[x264] analyse.b_mixed_references = %d\n", x264Param->analyse.b_mixed_references);
+ 	printf("[x264] analyse.b_chroma_me = %d\n", x264Param->analyse.b_chroma_me);
+ 	printf("[x264] analyse.i_trellis = %d\n", x264Param->analyse.i_trellis);
+@@ -752,6 +610,25 @@ void x264Encoder::updateEncodeParameters
+ 			_param.rc.i_bitrate = _encodeOptions.encodeModeParameter;
+ 			break;
+ 	}
++
++	if (properties)
++	{
++		_param.i_width = properties->width;
++		_param.i_height = properties->height;
++		_param.i_fps_num = properties->fpsNum;
++		_param.i_fps_den = properties->fpsDen;
++
++		if (_options.getSarAsInput())
++		{
++			_param.vui.i_sar_width = properties->parWidth;
++			_param.vui.i_sar_height = properties->parHeight;
++		}
++
++		if (properties->flags & ADM_VIDENC_FLAG_GLOBAL_HEADER)
++			_param.b_repeat_headers = 0;
++		else
++			_param.b_repeat_headers = 1;
++	}
+ }
+ 
+ unsigned int x264Encoder::calculateBitrate(unsigned int fpsNum, unsigned int fpsDen, unsigned int frameCount, unsigned int sizeInMb)
+diff -Naurp plugins/ADM_videoEncoder/ADM_vidEnc_x264/x264Options.cpp plugins/ADM_videoEncoder/ADM_vidEnc_x264/x264Options.cpp
+--- plugins/ADM_videoEncoder/ADM_vidEnc_x264/x264Options.cpp	2011-06-29 00:22:07.000000000 -0700
++++ plugins/ADM_videoEncoder/ADM_vidEnc_x264/x264Options.cpp	2011-06-29 00:38:27.000000000 -0700
+@@ -52,9 +52,12 @@ void x264Options::reset(void)
+ 	x264_param_default(&_param);
+ 	_param.vui.i_sar_height = 1;
+ 	_param.vui.i_sar_width = 1;
+-	_param.i_threads = 0;	// set to auto-detect; default is disabled
+ 
+ 	_sarAsInput = false;
++
++#if X264_BUILD > 85
++	_fastFirstPast = true;
++#endif
+ }
+ 
+ x264_param_t* x264Options::getParameters(void)
+@@ -75,6 +78,18 @@ x264_param_t* x264Options::getParameters
+ 	return param;
+ }
+ 
++#if X264_BUILD > 85
++bool x264Options::getFastFirstPass(void)
++{
++	return _fastFirstPast;
++}
++
++void x264Options::setFastFirstPass(bool fastFirstPass)
++{
++	_fastFirstPast = fastFirstPass;
++}
++#endif
++
+ int x264Options::getThreads(void)
+ {
+ 	return _param.i_threads;
+@@ -96,7 +111,16 @@ void x264Options::setDeterministic(bool 
+ 	_param.b_deterministic = deterministic;
+ }
+ 
+-#if X264_BUILD >= 75
++bool x264Options::getSliceThreading(void)
++{
++	return _param.b_sliced_threads;
++}
++
++void x264Options::setSliceThreading(bool sliceThreading)
++{
++	_param.b_sliced_threads = sliceThreading;
++}
++
+ int x264Options::getThreadedLookahead(void)
+ {
+ 	return _param.i_sync_lookahead;
+@@ -107,7 +131,6 @@ void x264Options::setThreadedLookahead(i
+ 	if (frames >= -1 && frames <= 250)
+ 		_param.i_sync_lookahead = frames;
+ }
+-#endif
+ 
+ int x264Options::getIdcLevel(void)
+ {
+@@ -268,11 +291,21 @@ void x264Options::setGopMinimumSize(unsi
+ 
+ unsigned int x264Options::getGopMaximumSize(void)
+ {
++#if X264_BUILD > 101
++	if (_param.i_keyint_max == X264_KEYINT_MAX_INFINITE)
++		return 0;
++	else
++#endif
+ 	return _param.i_keyint_max;
+ }
+ 
+ void x264Options::setGopMaximumSize(unsigned int gopSize)
+ {
++#if X264_BUILD > 101
++	if (gopSize == 0)
++		_param.i_keyint_max = X264_KEYINT_MAX_INFINITE;
++	else
++#endif
+ 	if (gopSize <= 1000)
+ 		_param.i_keyint_max = gopSize;
+ }
+@@ -288,6 +321,16 @@ void x264Options::setScenecutThreshold(u
+ 		_param.i_scenecut_threshold = scenecutThreshold;
+ }
+ 
++bool x264Options::getIntraRefresh(void)
++{
++	return _param.b_intra_refresh;
++}
++
++void x264Options::setIntraRefresh(bool intraRefresh)
++{
++	_param.b_intra_refresh = intraRefresh;
++}
++
+ unsigned int x264Options::getBFrames(void)
+ {
+ 	return _param.i_bframe;
+@@ -323,21 +366,13 @@ void x264Options::setBFrameBias(int bFra
+ 
+ unsigned int x264Options::getBFrameReferences(void)
+ {
+-#if X264_BUILD >= 78
+ 	return _param.i_bframe_pyramid;
+-#else
+-	return _param.b_bframe_pyramid;
+-#endif
+ }
+ 
+ void x264Options::setBFrameReferences(unsigned int bFrameReferences)
+ {
+-#if X264_BUILD >= 78
+ 	if (bFrameReferences <= 2)
+ 		_param.i_bframe_pyramid = bFrameReferences;
+-#else
+-	_param.b_bframe_pyramid = !!bFrameReferences;
+-#endif
+ }
+ 
+ bool x264Options::getLoopFilter(void)
+@@ -382,17 +417,77 @@ void x264Options::setCabac(bool cabac)
+ 	_param.b_cabac = cabac;
+ }
+ 
+-bool x264Options::getInterlaced(void)
++#if X264_BUILD > 101
++unsigned int x264Options::getOpenGopMode(void)
++{
++#if X264_BUILD > 114
++	if (_param.b_open_gop == 1)
++	{
++		if (_param.b_bluray_compat == 1)
++		{
++			return 2;
++		}
++		else
++		{
++			return 1;
++		}
++	}
++
++	return 0;
++#else
++	return _param.i_open_gop;
++#endif
++}
++
++void x264Options::setOpenGopMode(unsigned int openGopMode)
++{
++#if X264_BUILD > 114
++	_param.b_open_gop = (openGopMode > 0 ? 1 : 0);
++	_param.b_bluray_compat = (openGopMode == 2 ? 1 : 0);
++#else
++	if (openGopMode < 3)
++		_param.i_open_gop = openGopMode;
++#endif
++}
++#endif
++
++unsigned int x264Options::getInterlaced(void)
+ {
++#if X264_BUILD > 88
++	if (_param.b_interlaced)
++	{
++		if (_param.b_tff)
++			return 2;
++		else
++			return 1;
++	}
++	else
++	{
++#	if X264_BUILD > 95
++		if (_param.b_fake_interlaced)
++			return 3;
++		else
++#endif
++			return 0;
++	}
++#else
+ 	return _param.b_interlaced;
++#endif
+ }
+ 
+-void x264Options::setInterlaced(bool interlaced)
++void x264Options::setInterlaced(unsigned int interlaced)
+ {
+-	_param.b_interlaced = interlaced;
++	_param.b_interlaced = (interlaced == 1 || interlaced == 2);
++
++#if X264_BUILD > 88
++	_param.b_tff = (interlaced == 2 ? 1 : 0);
++#endif
++
++#if X264_BUILD > 95
++	_param.b_fake_interlaced = (interlaced == 3 ? 1 : 0);
++#endif
+ }
+ 
+-#if X264_BUILD >= 77
+ bool x264Options::getConstrainedIntraPrediction(void)
+ {
+ 	return _param.b_constrained_intra;
+@@ -402,7 +497,6 @@ void x264Options::setConstrainedIntraPre
+ {
+ 	_param.b_constrained_intra = constrainedIntra;
+ }
+-#endif
+ 
+ unsigned int x264Options::getCqmPreset(void)
+ {
+@@ -550,7 +644,6 @@ void x264Options::setDct8x8(bool dct8x8)
+ 	_param.analyse.b_transform_8x8 = dct8x8;
+ }
+ 
+-#if X264_BUILD >= 79
+ unsigned int x264Options::getWeightedPredictionPFrames(void)
+ {
+ 	return _param.analyse.i_weighted_pred;
+@@ -560,7 +653,6 @@ void x264Options::setWeightedPredictionP
+ {
+ 	_param.analyse.i_weighted_pred = weightedPrediction;
+ }
+-#endif
+ 
+ bool x264Options::getWeightedPrediction(void)
+ {
+@@ -644,7 +736,7 @@ unsigned int x264Options::getSubpixelRef
+ 
+ void x264Options::setSubpixelRefinement(unsigned int subpixelRefinement)
+ {
+-	if (subpixelRefinement >= 1 && subpixelRefinement <= 9)
++	if (subpixelRefinement >= 1 && subpixelRefinement <= 10)
+ 		_param.analyse.i_subpel_refine = subpixelRefinement;
+ }
+ 
+@@ -706,10 +798,21 @@ float x264Options::getPsychoRdo(void)
+ 
+ void x264Options::setPsychoRdo(float psychoRdo)
+ {
+-	if (psychoRdo >= 0 && psychoRdo <= 10)
++	if (psychoRdo >= 0.0f && psychoRdo <= 10.0f)
+ 		_param.analyse.f_psy_rd = psychoRdo;
+ }
+ 
++float x264Options::getPsychoTrellis(void)
++{
++	return _param.analyse.f_psy_trellis;
++}
++
++void x264Options::setPsychoTrellis(float psychoTrellis)
++{
++	if (psychoTrellis >= 0.0f && psychoTrellis <= 10.0f)
++		_param.analyse.f_psy_trellis = psychoTrellis;
++}
++
+ unsigned int x264Options::getNoiseReduction(void)
+ {
+ 	return _param.analyse.i_noise_reduction;
+@@ -750,7 +853,7 @@ unsigned int x264Options::getQuantiserMi
+ 
+ void x264Options::setQuantiserMinimum(unsigned int quantiserMinimum)
+ {
+-	if (quantiserMinimum >= 10 && quantiserMinimum <= 51)
++	if (quantiserMinimum <= 51)
+ 		_param.rc.i_qp_min = quantiserMinimum;
+ }
+ 
+@@ -761,7 +864,7 @@ unsigned int x264Options::getQuantiserMa
+ 
+ void x264Options::setQuantiserMaximum(unsigned int quantiserMaximum)
+ {
+-	if (quantiserMaximum >= 10 && quantiserMaximum <= 51)
++	if (quantiserMaximum <= 51)
+ 		_param.rc.i_qp_max = quantiserMaximum;
+ }
+ 
+@@ -776,6 +879,19 @@ void x264Options::setQuantiserStep(unsig
+ 		_param.rc.i_qp_step = quantiserStep;
+ }
+ 
++#if X264_BUILD > 89
++unsigned int x264Options::getMaximumConstantRateFactor(void)
++{
++	return (unsigned int)_param.rc.f_rf_constant_max;
++}
++
++void x264Options::setMaximumConstantRateFactor(unsigned int maxCrf)
++{
++	if (maxCrf <= 51)
++		_param.rc.f_rf_constant_max = maxCrf;
++}
++#endif
++
+ float x264Options::getAverageBitrateTolerance(void)
+ {
+ 	return _param.rc.f_rate_tolerance;
+@@ -849,7 +965,7 @@ unsigned int x264Options::getAdaptiveQua
+ 
+ void x264Options::setAdaptiveQuantiserMode(unsigned int adaptiveQuantiserMode)
+ {
+-	if (adaptiveQuantiserMode <= 1)
++	if (adaptiveQuantiserMode <= X264_AQ_AUTOVARIANCE)
+ 		_param.rc.i_aq_mode = adaptiveQuantiserMode;
+ }
+ 
+@@ -863,7 +979,6 @@ void x264Options::setAdaptiveQuantiserSt
+ 	_param.rc.f_aq_strength = adaptiveQuantiserStrength;
+ }
+ 
+-#if X264_BUILD >= 69
+ bool x264Options::getMbTree(void)
+ {
+ 	return _param.rc.b_mb_tree;
+@@ -884,7 +999,6 @@ void x264Options::setFrametypeLookahead(
+ 	if (frames <= 250)
+ 		_param.rc.i_lookahead = frames;
+ }
+-#endif
+ 
+ float x264Options::getQuantiserCurveCompression(void)
+ {
+@@ -979,7 +1093,6 @@ void x264Options::setSpsIdentifier(unsig
+ 	}
+ }
+ 
+-#if X264_BUILD >= 73
+ unsigned int x264Options::getSliceMaxSize(void)
+ {
+ 	return _param.i_slice_max_size;
+@@ -1009,6 +1122,18 @@ void x264Options::setSliceCount(unsigned
+ {
+ 	_param.i_slice_count = sliceCount;
+ }
++
++#if X264_BUILD > 88
++unsigned int x264Options::getHrdParameter(void)
++{
++	return _param.i_nal_hrd;
++}
++
++void x264Options::setHrdParameter(unsigned int hrdParameter)
++{
++	if (hrdParameter <= 2)
++		_param.i_nal_hrd = hrdParameter;
++}
+ #endif
+ 
+ void x264Options::addOptionsToXml(xmlNodePtr xmlNodeRoot)
+@@ -1018,11 +1143,13 @@ void x264Options::addOptionsToXml(xmlNod
+ 	xmlNodePtr xmlNodeChild, xmlNodeChild2;
+ 
+ 	xmlNodeRoot = xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)getOptionsTagRoot(), NULL);
++#if X264_BUILD > 85
++	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"fastFirstPass", boolean2String(xmlBuffer, bufferSize, getFastFirstPass()));
++#endif
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"threads", number2String(xmlBuffer, bufferSize, getThreads()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"deterministic", boolean2String(xmlBuffer, bufferSize, getDeterministic()));
+-#if X264_BUILD >= 75
++	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"sliceThreading", boolean2String(xmlBuffer, bufferSize, getSliceThreading()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"threadedLookahead", number2String(xmlBuffer, bufferSize, getThreadedLookahead()));
+-#endif
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"idcLevel", number2String(xmlBuffer, bufferSize, getIdcLevel()));
+ 
+ 	xmlNodeChild = xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"vui", NULL);
+@@ -1164,11 +1291,11 @@ void x264Options::addOptionsToXml(xmlNod
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"gopMaximumSize", number2String(xmlBuffer, bufferSize, getGopMaximumSize()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"gopMinimumSize", number2String(xmlBuffer, bufferSize, getGopMinimumSize()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"scenecutThreshold", number2String(xmlBuffer, bufferSize, getScenecutThreshold()));
++	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"periodicIntraRefresh", boolean2String(xmlBuffer, bufferSize, getIntraRefresh()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"bFrames", number2String(xmlBuffer, bufferSize, getBFrames()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"adaptiveBframeDecision", number2String(xmlBuffer, bufferSize, getAdaptiveBFrameDecision()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"bFrameBias", number2String(xmlBuffer, bufferSize, getBFrameBias()));
+ 
+-#if X264_BUILD >= 78
+ 	switch (getBFrameReferences())
+ 	{
+ 		case 0:
+@@ -1183,19 +1310,48 @@ void x264Options::addOptionsToXml(xmlNod
+ 	}
+ 
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"bFrameReferences", xmlBuffer);
+-#else
+-	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"bFrameReferences", boolean2String(xmlBuffer, bufferSize, (bool)getBFrameReferences()));
+-#endif
+-
+-
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"loopFilter", boolean2String(xmlBuffer, bufferSize, getLoopFilter()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"loopFilterAlphaC0", number2String(xmlBuffer, bufferSize, getLoopFilterAlphaC0()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"loopFilterBeta", number2String(xmlBuffer, bufferSize, getLoopFilterBeta()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"cabac", boolean2String(xmlBuffer, bufferSize, getCabac()));
+-	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"interlaced", boolean2String(xmlBuffer, bufferSize, getInterlaced()));
+-#if X264_BUILD >= 77
+-	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"constrainedIntraPrediction", boolean2String(xmlBuffer, bufferSize, getConstrainedIntraPrediction()));
++
++#if X264_BUILD > 101
++	switch (getOpenGopMode())
++	{
++		case 1:
++			strcpy((char*)xmlBuffer, "normal");
++			break;
++		case 2:
++			strcpy((char*)xmlBuffer, "bluray");
++			break;
++		default:
++			strcpy((char*)xmlBuffer, "disabled");
++			break;
++	}
++
++	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"openGop", xmlBuffer);
++#endif
++
++	switch (getInterlaced())
++	{
++		case 1:
++			strcpy((char*)xmlBuffer, "bff");
++			break;
++		case 2:
++			strcpy((char*)xmlBuffer, "tff");
++			break;
++#if X264_BUILD > 95
++		case 3:
++			strcpy((char*)xmlBuffer, "fake");
++			break;
+ #endif
++		default:
++			strcpy((char*)xmlBuffer, "disabled");
++			break;
++	}
++
++	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"interlaced", xmlBuffer);
++	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"constrainedIntraPrediction", boolean2String(xmlBuffer, bufferSize, getConstrainedIntraPrediction()));
+ 
+ 	switch (getCqmPreset())
+ 	{
+@@ -1257,23 +1413,26 @@ void x264Options::addOptionsToXml(xmlNod
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"partitionB8x8", boolean2String(xmlBuffer, bufferSize, getPartitionB8x8()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"dct8x8", boolean2String(xmlBuffer, bufferSize, getDct8x8()));
+ 
+-#if X264_BUILD >= 79
+ 	switch (getWeightedPredictionPFrames())
+ 	{
+ 		case X264_WEIGHTP_NONE:
+ 			strcpy((char*)xmlBuffer, "none");
+ 			break;
++#if X264_BUILD < 110
+ 		case X264_WEIGHTP_BLIND:
+ 			strcpy((char*)xmlBuffer, "blind");
+ 			break;
++#else
++		case X264_WEIGHTP_SIMPLE:
++			strcpy((char*)xmlBuffer, "simple");
++			break;
++#endif
+ 		case X264_WEIGHTP_SMART:
+ 			strcpy((char*)xmlBuffer, "smart");
+ 			break;
+ 	}
+ 
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"weightedPredictionPframes", xmlBuffer);
+-#endif
+-
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"weightedPrediction", boolean2String(xmlBuffer, bufferSize, getWeightedPrediction()));
+ 
+ 	switch (getDirectPredictionMode())
+@@ -1340,6 +1499,7 @@ void x264Options::addOptionsToXml(xmlNod
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"fastPSkip", boolean2String(xmlBuffer, bufferSize, getFastPSkip()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"dctDecimate", boolean2String(xmlBuffer, bufferSize, getDctDecimate()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"psychoRdo", number2String(xmlBuffer, bufferSize, getPsychoRdo()));
++	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"psychoTrellis", number2String(xmlBuffer, bufferSize, getPsychoTrellis()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"noiseReduction", number2String(xmlBuffer, bufferSize, getNoiseReduction()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"interLumaDeadzone", number2String(xmlBuffer, bufferSize, getInterLumaDeadzone()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"intraLumaDeadzone", number2String(xmlBuffer, bufferSize, getIntraLumaDeadzone()));
+@@ -1348,6 +1508,9 @@ void x264Options::addOptionsToXml(xmlNod
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"quantiserMinimum", number2String(xmlBuffer, bufferSize, getQuantiserMinimum()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"quantiserMaximum", number2String(xmlBuffer, bufferSize, getQuantiserMaximum()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"quantiserStep", number2String(xmlBuffer, bufferSize, getQuantiserStep()));
++#if X264_BUILD > 89
++	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"maximumConstantRateFactor", number2String(xmlBuffer, bufferSize, getMaximumConstantRateFactor()));
++#endif
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"averageBitrateTolerance", number2String(xmlBuffer, bufferSize, getAverageBitrateTolerance()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"vbvMaximumBitrate", number2String(xmlBuffer, bufferSize, getVbvMaximumBitrate()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"vbvBufferSize", number2String(xmlBuffer, bufferSize, getVbvBufferSize()));
+@@ -1363,16 +1526,15 @@ void x264Options::addOptionsToXml(xmlNod
+ 		case X264_AQ_VARIANCE:
+ 			strcpy((char*)xmlBuffer, "variance");
+ 			break;
++		case X264_AQ_AUTOVARIANCE:
++			strcpy((char*)xmlBuffer, "autoVariance");
++			break;
+ 	}
+ 
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"adaptiveQuantiserMode", xmlBuffer);
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"adaptiveQuantiserStrength", number2String(xmlBuffer, bufferSize, getAdaptiveQuantiserStrength()));
+-
+-#if X264_BUILD >= 69
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"mbTree", boolean2String(xmlBuffer, bufferSize, getMbTree()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"frametypeLookahead", number2String(xmlBuffer, bufferSize, getFrametypeLookahead()));
+-#endif
+-
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"quantiserCurveCompression", number2String(xmlBuffer, bufferSize, getQuantiserCurveCompression()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"reduceFluxBeforeCurveCompression", number2String(xmlBuffer, bufferSize, getReduceFluxBeforeCurveCompression()));
+ 	xmlNewChild(xmlNodeChild, NULL, (xmlChar*)"reduceFluxAfterCurveCompression", number2String(xmlBuffer, bufferSize, getReduceFluxAfterCurveCompression()));
+@@ -1404,11 +1566,25 @@ void x264Options::addOptionsToXml(xmlNod
+ 
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"accessUnitDelimiters", boolean2String(xmlBuffer, bufferSize, getAccessUnitDelimiters()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"spsIdentifier", number2String(xmlBuffer, bufferSize, getSpsIdentifier()));
+-
+-#if X264_BUILD >= 73
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"sliceMaxSize", number2String(xmlBuffer, bufferSize, getSliceMaxSize()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"sliceMaxMacroblocks", number2String(xmlBuffer, bufferSize, getSliceMaxMacroblocks()));
+ 	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"sliceCount", number2String(xmlBuffer, bufferSize, getSliceCount()));
++
++#if X264_BUILD > 88
++	switch (getHrdParameter())
++	{
++		case X264_NAL_HRD_VBR:
++			strcpy((char*)xmlBuffer, "vbr");
++			break;
++		case X264_NAL_HRD_CBR:
++			strcpy((char*)xmlBuffer, "cbr");
++			break;
++		default:
++			strcpy((char*)xmlBuffer, "none");
++			break;
++	}
++
++	xmlNewChild(xmlNodeRoot, NULL, (xmlChar*)"hrd", xmlBuffer);
+ #endif
+ }
+ 
+@@ -1429,12 +1605,16 @@ void x264Options::parseOptions(xmlNode *
+ 
+ 			if (strcmp((char*)xmlChild->name, "threads") == 0)
+ 				setThreads(atoi(content));
++#if X264_BUILD > 85
++			else if (strcmp((char*)xmlChild->name, "fastFirstPass") == 0)
++				setFastFirstPass(string2Boolean(content));
++#endif
+ 			else if (strcmp((char*)xmlChild->name, "deterministic") == 0)
+ 				setDeterministic(string2Boolean(content));
+-#if X264_BUILD >= 75
++			else if (strcmp((char*)xmlChild->name, "sliceThreading") == 0)
++				setSliceThreading(string2Boolean(content));
+ 			else if (strcmp((char*)xmlChild->name, "threadedLookahead") == 0)
+ 				setThreadedLookahead(atoi(content));
+-#endif
+ 			else if (strcmp((char*)xmlChild->name, "idcLevel") == 0)
+ 				setIdcLevel(atoi(content));
+ 			else if (strcmp((char*)xmlChild->name, "vui") == 0)
+@@ -1447,6 +1627,8 @@ void x264Options::parseOptions(xmlNode *
+ 				setGopMinimumSize(atoi(content));
+ 			else if (strcmp((char*)xmlChild->name, "scenecutThreshold") == 0)
+ 				setScenecutThreshold(atoi(content));
++			else if (strcmp((char*)xmlChild->name, "periodicIntraRefresh") == 0)
++				setIntraRefresh(string2Boolean(content));
+ 			else if (strcmp((char*)xmlChild->name, "bFrames") == 0)
+ 				setBFrames(atoi(content));
+ 			else if (strcmp((char*)xmlChild->name, "adaptiveBframeDecision") == 0)
+@@ -1460,11 +1642,7 @@ void x264Options::parseOptions(xmlNode *
+ 				if (strcmp(content, "strict") == 0)
+ 					bFrameReferences = 1;
+ 				else if (strcmp(content, "normal") == 0 || strcmp(content, "1") == 0 || strcmp(content, "true") == 0)
+-#if X264_BUILD >= 78
+ 					bFrameReferences = 2;
+-#else
+-					bFrameReferences = 1;
+-#endif
+ 
+ 				setBFrameReferences(bFrameReferences);
+ 			}
+@@ -1476,12 +1654,34 @@ void x264Options::parseOptions(xmlNode *
+ 				setLoopFilterBeta(atoi(content));
+ 			else if (strcmp((char*)xmlChild->name, "cabac") == 0)
+ 				setCabac(string2Boolean(content));
++#if X264_BUILD > 101
++			else if (strcmp((char*)xmlChild->name, "openGop") == 0)
++			{
++				int openGop = 0;
++
++				if (strcmp(content, "normal") == 0)
++					openGop = 1;
++				else if (strcmp(content, "bluray") == 0)
++					openGop = 2;
++
++				setOpenGopMode(openGop);
++			}
++#endif
+ 			else if (strcmp((char*)xmlChild->name, "interlaced") == 0)
+-				setInterlaced(string2Boolean(content));
+-#if X264_BUILD >= 77
++			{
++				int interlaced = 0;
++
++				if (strcmp(content, "bff") == 0)
++					interlaced = 1;
++				else if (strcmp(content, "tff") == 0)
++					interlaced = 2;
++				else if (strcmp(content, "fake") == 0)
++					interlaced = 3;
++
++				setInterlaced(interlaced);
++			}
+ 			else if (strcmp((char*)xmlChild->name, "constrainedIntraPrediction") == 0)
+ 				setConstrainedIntraPrediction(string2Boolean(content));
+-#endif
+ 			else if (strcmp((char*)xmlChild->name, "cqmPreset") == 0)
+ 			{
+ 				int cqmPreset = 0;
+@@ -1545,13 +1745,24 @@ void x264Options::parseOptions(xmlNode *
+ 				setAccessUnitDelimiters(string2Boolean(content));
+ 			else if (strcmp((char*)xmlChild->name, "spsIdentifier") == 0)
+ 				setSpsIdentifier(atoi(content));
+-#if X264_BUILD >= 73
+ 			else if (strcmp((char*)xmlChild->name, "sliceMaxSize") == 0)
+ 				setSliceMaxSize(atoi(content));
+ 			else if (strcmp((char*)xmlChild->name, "sliceMaxMacroblocks") == 0)
+ 				setSliceMaxMacroblocks(atoi(content));
+ 			else if (strcmp((char*)xmlChild->name, "sliceCount") == 0)
+ 				setSliceCount(atoi(content));
++#if X264_BUILD > 88
++			else if (strcmp((char*)xmlChild->name, "hrd") == 0)
++			{
++				unsigned int hdr = X264_NAL_HRD_NONE;
++
++				if (strcmp(content, "vbr") == 0)
++					hdr = X264_NAL_HRD_VBR;
++				else if (strcmp(content, "cbr") == 0)
++					hdr = X264_NAL_HRD_CBR;
++
++				setHrdParameter(hdr);
++			}
+ #endif
+ 
+ 			xmlFree(content);
+@@ -1722,19 +1933,22 @@ void x264Options::parseAnalyseOptions(xm
+ 				setPartitionB8x8(string2Boolean(content));
+ 			else if (strcmp((char*)xmlChild->name, "dct8x8") == 0)
+ 				setDct8x8(string2Boolean(content));
+-#if X264_BUILD >= 79
+ 			else if (strcmp((char*)xmlChild->name, "weightedPredictionPframes") == 0)
+ 			{
+ 				int weightedPredPFrames = X264_WEIGHTP_NONE;
+ 
++#if X264_BUILD < 110
+ 				if (strcmp(content, "blind") == 0)
+ 					weightedPredPFrames = X264_WEIGHTP_BLIND;
++#else
++				if (strcmp(content, "simple") == 0)
++					weightedPredPFrames = X264_WEIGHTP_SIMPLE;
++#endif
+ 				else if (strcmp(content, "smart") == 0)
+ 					weightedPredPFrames = X264_WEIGHTP_SMART;
+ 
+ 				setWeightedPredictionPFrames(weightedPredPFrames);
+ 			}
+-#endif
+ 			else if (strcmp((char*)xmlChild->name, "weightedPrediction") == 0)
+ 				setWeightedPrediction(string2Boolean(content));
+ 			else if (strcmp((char*)xmlChild->name, "directPredictionMode") == 0)
+@@ -1802,6 +2016,8 @@ void x264Options::parseAnalyseOptions(xm
+ 				setDctDecimate(string2Boolean(content));
+ 			else if (strcmp((char*)xmlChild->name, "psychoRdo") == 0)
+ 				setPsychoRdo(string2Float(content));
++			else if (strcmp((char*)xmlChild->name, "psychoTrellis") == 0)
++				setPsychoTrellis(string2Float(content));
+ 			else if (strcmp((char*)xmlChild->name, "noiseReduction") == 0)
+ 				setNoiseReduction(atoi(content));
+ 			else if (strcmp((char*)xmlChild->name, "interLumaDeadzone") == 0)
+@@ -1828,6 +2044,10 @@ void x264Options::parseRateControlOption
+ 				setQuantiserMaximum(atoi(content));
+ 			else if (strcmp((char*)xmlChild->name, "quantiserStep") == 0)
+ 				setQuantiserStep(atoi(content));
++#if X264_BUILD > 89
++			else if (strcmp((char*)xmlChild->name, "maximumConstantRateFactor") == 0)
++				setMaximumConstantRateFactor(atoi(content));
++#endif
+ 			else if (strcmp((char*)xmlChild->name, "averageBitrateTolerance") == 0)
+ 				setAverageBitrateTolerance(string2Float(content));
+ 			else if (strcmp((char*)xmlChild->name, "vbvMaximumBitrate") == 0)
+@@ -1848,17 +2068,17 @@ void x264Options::parseRateControlOption
+ 					adaptiveQuantiserMode = X264_AQ_NONE;
+ 				else if (strcmp(content, "variance") == 0)
+ 					adaptiveQuantiserMode = X264_AQ_VARIANCE;
++				else if (strcmp(content, "autoVariance") == 0)
++					adaptiveQuantiserMode = X264_AQ_AUTOVARIANCE;
+ 
+ 				setAdaptiveQuantiserMode(adaptiveQuantiserMode);
+ 			}
+ 			else if (strcmp((char*)xmlChild->name, "adaptiveQuantiserStrength") == 0)
+ 				setAdaptiveQuantiserStrength(string2Float(content));
+-#if X264_BUILD >= 69
+ 			else if (strcmp((char*)xmlChild->name, "mbTree") == 0)
+ 				setMbTree(string2Boolean(content));
+ 			else if (strcmp((char*)xmlChild->name, "frametypeLookahead") == 0)
+ 				setFrametypeLookahead(atoi(content));
+-#endif
+ 			else if (strcmp((char*)xmlChild->name, "quantiserCurveCompression") == 0)
+ 				setQuantiserCurveCompression(string2Float(content));
+ 			else if (strcmp((char*)xmlChild->name, "reduceFluxBeforeCurveCompression") == 0)
+diff -Naurp plugins/ADM_videoEncoder/ADM_vidEnc_x264/x264Options.h plugins/ADM_videoEncoder/ADM_vidEnc_x264/x264Options.h
+--- plugins/ADM_videoEncoder/ADM_vidEnc_x264/x264Options.h	2011-06-29 00:22:07.000000000 -0700
++++ plugins/ADM_videoEncoder/ADM_vidEnc_x264/x264Options.h	2011-06-29 00:38:26.000000000 -0700
+@@ -39,7 +39,9 @@ protected:
+ 	std::vector<x264ZoneOptions*> _zoneOptions;
+ 
+ 	bool _sarAsInput;
+-
++#if X264_BUILD > 85
++	bool _fastFirstPast;
++#endif
+ 	void cleanUp(void);
+ 
+ 	void addOptionsToXml(xmlNodePtr xmlNodeRoot);
+@@ -58,16 +60,22 @@ public:
+ 	void reset(void);
+ 	x264_param_t* getParameters(void);
+ 
++#if X264_BUILD > 85
++	bool getFastFirstPass(void);
++	void setFastFirstPass(bool fastFirstPass);
++#endif
++
+ 	int getThreads(void);
+ 	void setThreads(int threads);
+ 
+ 	bool getDeterministic(void);
+ 	void setDeterministic(bool deterministic);
+ 
+-#if X264_BUILD >= 75
++	bool getSliceThreading(void);
++	void setSliceThreading(bool sliceThreading);
++
+ 	int getThreadedLookahead(void);
+ 	void setThreadedLookahead(int frames);
+-#endif
+ 
+ 	int getIdcLevel(void);
+ 	void setIdcLevel(int idcLevel);
+@@ -114,6 +122,9 @@ public:
+ 	unsigned int getScenecutThreshold(void);
+ 	void setScenecutThreshold(unsigned int scenecutThreshold);
+ 
++	bool getIntraRefresh(void);
++	void setIntraRefresh(bool intraRefresh);
++
+ 	unsigned int getBFrames(void);
+ 	void setBFrames(unsigned int bFrames);
+ 
+@@ -138,13 +149,16 @@ public:
+ 	bool getCabac(void);
+ 	void setCabac(bool cabac);
+ 
+-	bool getInterlaced(void);
+-	void setInterlaced(bool interlaced);
++#if X264_BUILD > 101
++	unsigned int getOpenGopMode(void);
++	void setOpenGopMode(unsigned int openGopMode);
++#endif
++
++	unsigned int getInterlaced(void);
++	void setInterlaced(unsigned int interlaced);
+ 
+-#if X264_BUILD >= 77
+ 	bool getConstrainedIntraPrediction(void);
+ 	void setConstrainedIntraPrediction(bool constrainedIntra);
+-#endif
+ 
+ 	unsigned int getCqmPreset(void);
+ 	void setCqmPreset(unsigned int cqmPreset);
+@@ -185,10 +199,8 @@ public:
+ 	bool getDct8x8(void);
+ 	void setDct8x8(bool dct8x8);
+ 
+-#if X264_BUILD >= 79
+ 	unsigned int getWeightedPredictionPFrames(void);
+ 	void setWeightedPredictionPFrames(unsigned int weightedPrediction);
+-#endif
+ 
+ 	bool getWeightedPrediction(void);
+ 	void setWeightedPrediction(bool weightedPrediction);
+@@ -232,6 +244,9 @@ public:
+ 	float getPsychoRdo(void);
+ 	void setPsychoRdo(float psychoRdo);
+ 
++	float getPsychoTrellis(void);
++	void setPsychoTrellis(float psychoTrellis);
++	
+ 	unsigned int getNoiseReduction(void);
+ 	void setNoiseReduction(unsigned int noiseReduction);
+ 
+@@ -256,6 +271,11 @@ public:
+ 	unsigned int getQuantiserStep(void);
+ 	void setQuantiserStep(unsigned int quantiserStep);
+ 
++#if X264_BUILD > 89
++	unsigned int getMaximumConstantRateFactor(void);
++	void setMaximumConstantRateFactor(unsigned int maxCrf);
++#endif
++
+ 	float getAverageBitrateTolerance(void);
+ 	void setAverageBitrateTolerance(float averageBitrateTolerance);
+ 
+@@ -280,13 +300,11 @@ public:
+ 	float getAdaptiveQuantiserStrength(void);
+ 	void setAdaptiveQuantiserStrength(float adaptiveQuantiserStrength);
+ 
+-#if X264_BUILD >= 69
+ 	bool getMbTree(void);
+ 	void setMbTree(bool mbTree);
+ 
+ 	unsigned int getFrametypeLookahead(void);
+ 	void setFrametypeLookahead(unsigned int frames);
+-#endif
+ 
+ 	float getQuantiserCurveCompression(void);
+ 	void setQuantiserCurveCompression(float quantiserCurveCompression);
+@@ -308,7 +326,6 @@ public:
+ 	unsigned int getSpsIdentifier(void);
+ 	void setSpsIdentifier(unsigned int spsIdentifier);
+ 
+-#if X264_BUILD >= 73
+ 	unsigned int getSliceMaxSize(void);
+ 	void setSliceMaxSize(unsigned int maxSize);
+ 
+@@ -317,6 +334,10 @@ public:
+ 
+ 	unsigned int getSliceCount(void);
+ 	void setSliceCount(unsigned int sliceCount);
++
++#if X264_BUILD > 88
++	unsigned int getHrdParameter(void);
++	void setHrdParameter(unsigned int hrdParameter);
+ #endif
+ 
+ 	int fromXml(const char *xml, PluginXmlType xmlType);

Modified: trunk/dports/multimedia/ffmpeg/Portfile
===================================================================
--- trunk/dports/multimedia/ffmpeg/Portfile	2011-06-29 07:40:52 UTC (rev 79904)
+++ trunk/dports/multimedia/ffmpeg/Portfile	2011-06-29 07:41:42 UTC (rev 79905)
@@ -8,6 +8,7 @@
 conflicts       ffmpeg-devel
 epoch           1
 version         0.6.3
+revision        1
 license         nonfree GPL-2+ LGPL-2.1+
 categories      multimedia
 maintainers     devans openmaintainer

Modified: trunk/dports/multimedia/transcode/Portfile
===================================================================
--- trunk/dports/multimedia/transcode/Portfile	2011-06-29 07:40:52 UTC (rev 79904)
+++ trunk/dports/multimedia/transcode/Portfile	2011-06-29 07:41:42 UTC (rev 79905)
@@ -5,7 +5,7 @@
 
 name        transcode
 version     1.1.5
-revision    1
+revision    2
 epoch       1
 categories  multimedia
 maintainers cogweb.net:lionteeth devans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110629/30da6b55/attachment-0001.html>


More information about the macports-changes mailing list