Exemplo n.º 1
0
int main(int argc, char** argv) {
	int nrows = 6;
	if (argc >= 2)
		sscanf(argv[1], "%d", &nrows);
	int ncols = 6;
	if (argc >= 3)
		sscanf(argv[2], "%d", &ncols);
	Cmatrix Md = Cmatrix::Random(nrows, ncols);
	MatrixXv Mv(Md);
	MatrixXl Ml(Md);
	MatrixXh Mh(Md);

	cout << Md.str(Dense()) << endl;
	cout << Mv.str(Dense()) << endl;
	cout << Ml.str(Dense()) << endl;
	cout << Mh.str(Dense()) << endl;
	cout << Mh.nnz() << endl;
}
#include "H264AVCEncoderLib.h"

#include "MotionEstimationQuarterPel.h"
#include "H264AVCCommonLib/QuarterPelFilter.h"


H264AVC_NAMESPACE_BEGIN


const UChar  g_aucFilter[9] =
{ 0, 2, 2, 1, 1, 3, 3, 3, 3 };

const Mv g_acHPSearchMv[9] =
{
//hor,ver
 Mv(  0,  0 ), // 0
 Mv(  0, -2 ), // 1
 Mv(  0,  2 ), // 2
 Mv( -2,  0 ), // 3
 Mv(  2,  0 ), // 4
 Mv( -2, -2 ), // 5
 Mv(  2, -2 ), // 6
 Mv( -2,  2 ), // 7
 Mv(  2,  2 )  // 8
};


const Mv g_acQPSearchMv[9] =
{
//hor,ver
 Mv(  0,  0 ), // 0