• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IntPointer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.googlecode.javacpp.IntPointer的典型用法代码示例。如果您正苦于以下问题:Java IntPointer类的具体用法?Java IntPointer怎么用?Java IntPointer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IntPointer类属于com.googlecode.javacpp包,在下文中一共展示了IntPointer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: CELT7Encoder

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public CELT7Encoder(int sampleRate, int frameSize, int channels,
                    int framesPerPacket, int bitrate, int maxBufferSize)
        throws NativeAudioException {
    mFramesPerPacket = framesPerPacket;
    mBufferSize = Math.min(maxBufferSize, bitrate / 800);
    mBuffer = new byte[framesPerPacket][mBufferSize];
    mPacketLengths = new int[framesPerPacket];
    mBufferedFrames = 0;

    IntPointer error = new IntPointer(1);
    error.put(0);
    mMode = CELT7.celt_mode_create(sampleRate, frameSize, error);
    if(error.get() < 0) throw new NativeAudioException("CELT 0.7.0 encoder initialization failed with error: "+error.get());
    mState = CELT7.celt_encoder_create(mMode, channels, error);
    if(error.get() < 0) throw new NativeAudioException("CELT 0.7.0 encoder initialization failed with error: "+error.get());
    CELT7.celt_encoder_ctl(mState, CELT7.CELT_SET_PREDICTION_REQUEST, 0);
    CELT7.celt_encoder_ctl(mState, CELT7.CELT_SET_VBR_RATE_REQUEST, bitrate);
}
 
开发者ID:acomminos,项目名称:Jumble,代码行数:19,代码来源:CELT7Encoder.java


示例2: PreprocessingEncoder

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public PreprocessingEncoder(IEncoder encoder, int frameSize, int sampleRate) {
    mEncoder = encoder;
    mPreprocessor = new Speex.SpeexPreprocessState(frameSize, sampleRate);

    IntPointer arg = new IntPointer(1);

    arg.put(0);
    mPreprocessor.control(Speex.SpeexPreprocessState.SPEEX_PREPROCESS_SET_VAD, arg);
    arg.put(1);
    mPreprocessor.control(Speex.SpeexPreprocessState.SPEEX_PREPROCESS_SET_AGC, arg);
    mPreprocessor.control(Speex.SpeexPreprocessState.SPEEX_PREPROCESS_SET_DENOISE, arg);
    mPreprocessor.control(Speex.SpeexPreprocessState.SPEEX_PREPROCESS_SET_DEREVERB, arg);

    arg.put(30000);
    mPreprocessor.control(Speex.SpeexPreprocessState.SPEEX_PREPROCESS_SET_AGC_TARGET, arg);

    // TODO AGC max gain, decrement, noise suppress, echo

    // Increase VAD difficulty
    arg.put(99);
    mPreprocessor.control(Speex.SpeexPreprocessState.SPEEX_PREPROCESS_GET_PROB_START, arg);
}
 
开发者ID:acomminos,项目名称:Jumble,代码行数:23,代码来源:PreprocessingEncoder.java


示例3: OpusEncoder

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public OpusEncoder(int sampleRate, int channels, int frameSize, int framesPerPacket,
                   int bitrate, int maxBufferSize) throws NativeAudioException {
    mBuffer = new byte[maxBufferSize];
    mAudioBuffer = new short[framesPerPacket * frameSize];
    mFramesPerPacket = framesPerPacket;
    mFrameSize = frameSize;
    mBufferedFrames = 0;
    mEncodedLength = 0;
    mTerminated = false;

    IntPointer error = new IntPointer(1);
    error.put(0);
    mState = Opus.opus_encoder_create(sampleRate, channels, Opus.OPUS_APPLICATION_VOIP, error);
    if(error.get() < 0) throw new NativeAudioException("Opus encoder initialization failed with error: "+error.get());
    Opus.opus_encoder_ctl(mState, Opus.OPUS_SET_VBR_REQUEST, 0);
    Opus.opus_encoder_ctl(mState, Opus.OPUS_SET_BITRATE_REQUEST, bitrate);
}
 
开发者ID:acomminos,项目名称:Jumble,代码行数:18,代码来源:OpusEncoder.java


示例4: RGBDOdometry

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
@Namespace("cv") public static native boolean RGBDOdometry(@InputMat CvMat Rt, CvMat initRt,
IplImage image0, IplImage depth0, IplImage mask0,
IplImage image1, IplImage depth1, IplImage mask1,
CvMat cameraMatrix, float minDepth/*=0*/, float maxDepth/*=4*/, float maxDepthDiff/*=0.07*/,
@Const @StdVector IntPointer iterCounts/*=null*/,
@Const @StdVector FloatPointer minGradientMagnitudes/*=null*/,
int transformType/*=RIGID_BODY_MOTION*/);
 
开发者ID:wordin0,项目名称:javacv,代码行数:8,代码来源:opencv_contrib.java


示例5: CELT11Encoder

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public CELT11Encoder(int sampleRate, int channels, int framesPerPacket) throws
        NativeAudioException {
    mFramesPerPacket = framesPerPacket;
    mBufferSize = sampleRate / 800;
    mBuffer = new byte[framesPerPacket][mBufferSize];
    mBufferedFrames = 0;

    IntPointer error = new IntPointer(1);
    error.put(0);
    mState = CELT11.celt_encoder_create(sampleRate, channels, error);
    if(error.get() < 0) throw new NativeAudioException("CELT 0.11.0 encoder initialization " +
                                                             "failed with error: "+error.get());
}
 
开发者ID:acomminos,项目名称:Jumble,代码行数:14,代码来源:CELT11Encoder.java


示例6: AudioOutputSpeech

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public AudioOutputSpeech(User user, JumbleUDPMessageType codec, int requestedSamples, TalkStateListener listener) throws NativeAudioException {
    // TODO: consider implementing resampling if some Android devices not support 48kHz?
    mUser = user;
    mCodec = codec;
    mRequestedSamples = requestedSamples;
    mTalkStateListener = listener;
    switch (codec) {
        case UDPVoiceOpus:
            mAudioBufferSize *= 12;
            mDecoder = new Opus.OpusDecoder(AudioHandler.SAMPLE_RATE, 1);
            break;
        case UDPVoiceCELTBeta:
            mDecoder = new CELT11.CELT11Decoder(AudioHandler.SAMPLE_RATE, 1);
            break;
        case UDPVoiceCELTAlpha:
            mDecoder = new CELT7.CELT7Decoder(AudioHandler.SAMPLE_RATE, AudioHandler.FRAME_SIZE, 1);
            break;
        case UDPVoiceSpeex:
            mDecoder = new Speex.SpeexDecoder();
            break;
    }

    mBuffer = new float[mAudioBufferSize*2]; // Make initial buffer size larger so we can save performance by not resizing at runtime.
    mOut = new float[mAudioBufferSize];
    mFadeIn = new float[AudioHandler.FRAME_SIZE];
    mFadeOut = new float[AudioHandler.FRAME_SIZE];

    // Sine function to represent fade in/out. Period is FRAME_SIZE.
    float mul = (float)(Math.PI / (2.0 * (float) AudioHandler.FRAME_SIZE));
    for (int i = 0; i < AudioHandler.FRAME_SIZE; i++)
        mFadeIn[i] = mFadeOut[AudioHandler.FRAME_SIZE-i-1] = (float) Math.sin((float) i * mul);

    mJitterBuffer = new Speex.JitterBuffer(AudioHandler.FRAME_SIZE);
    IntPointer margin = new IntPointer(1);
    margin.put(10 * AudioHandler.FRAME_SIZE);
    mJitterBuffer.control(Speex.JitterBuffer.JITTER_BUFFER_SET_MARGIN, margin);
}
 
开发者ID:acomminos,项目名称:Jumble,代码行数:38,代码来源:AudioOutputSpeech.java


示例7: getBitstreamVersion

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
/**
 * @return an integer describing the CELT bitstream version.
 */
public static int getBitstreamVersion() {
    IntPointer versionPtr = new IntPointer();
    Pointer modePtr = celt_mode_create(AudioHandler.SAMPLE_RATE, AudioHandler.FRAME_SIZE, null);
    celt_mode_info(modePtr, CELT_GET_BITSTREAM_VERSION, versionPtr);
    celt_mode_destroy(modePtr);
    return versionPtr.get();
}
 
开发者ID:acomminos,项目名称:Jumble,代码行数:11,代码来源:CELT11.java


示例8: SpeexDecoder

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public SpeexDecoder() {
    mBits = new Speex.SpeexBits();
    mState = Speex.speex_decoder_init(Speex.speex_lib_get_mode(Speex.SPEEX_MODEID_UWB));
    IntPointer enh = new IntPointer();
    enh.put(1);
    Speex.speex_decoder_ctl(mState, Speex.SPEEX_SET_ENH, enh);
}
 
开发者ID:acomminos,项目名称:Jumble,代码行数:8,代码来源:Speex.java


示例9: CELT7Decoder

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public CELT7Decoder(int sampleRate, int frameSize, int channels) throws NativeAudioException {
    IntPointer error = new IntPointer(1);
    error.put(0);
    mMode = celt_mode_create(sampleRate, frameSize, error);
    if(error.get() < 0) throw new NativeAudioException("CELT 0.7.0 decoder initialization failed with error: "+error.get());
    mState = celt_decoder_create(mMode, channels, error);
    if(error.get() < 0) throw new NativeAudioException("CELT 0.7.0 decoder initialization failed with error: "+error.get());
}
 
开发者ID:acomminos,项目名称:Jumble,代码行数:9,代码来源:CELT7.java


示例10: borderTab

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
@Const @StdVector
public native IntPointer borderTab();
 
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_imgproc.java


示例11: leaveBiggestComponent

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
@Namespace("cv::detail") public static native @StdVector IntPointer leaveBiggestComponent(
@Const @StdVector ImageFeatures features, @Const @StdVector MatchesInfo pairwise_matches, float conf_threshold);
 
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_stitching.java


示例12: cvHaarDetectObjectsForROC

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public static native CvSeq cvHaarDetectObjectsForROC(CvArr image, CvHaarClassifierCascade cascade, CvMemStorage storage,
@StdVector IntPointer rejectLevels, @StdVector DoublePointer levelWeightds, double scale_factor/*=1.1*/,
int min_neighbors/*=3*/, int flags/*=0*/, @ByVal CvSize min_size/*=cvSize(0,0)*/,
@ByVal CvSize max_size/*=cvSize(0,0)*/, @Cast("bool") boolean outputRejectLevels/*=false*/);
 
开发者ID:wordin0,项目名称:javacv,代码行数:5,代码来源:opencv_objdetect.java


示例13: groupRectangles

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
@Namespace("cv") public static native void groupRectangles(@StdVector("CvRect,cv::Rect") CvRect rectList,
@StdVector IntPointer weights, int groupThreshold, double eps/*=0.2*/);
 
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_objdetect.java


示例14: detectMultiScale

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public native void detectMultiScale(@InputMat CvArr image, @StdVector("CvRect,cv::Rect") CvRect objects,
@StdVector IntPointer rejectLevels, @StdVector DoublePointer levelWeights, double scaleFactor/*=1.1*/,
int minNeighbors/*=3*/, int flags/*=0*/, @ByVal CvSize minSize/*=Size()*/,
@ByVal CvSize maxSize/*=Size()*/, @Cast("bool") boolean outputRejectLevels/*=false*/);
 
开发者ID:wordin0,项目名称:javacv,代码行数:5,代码来源:opencv_objdetect.java


示例15: getAll

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public native void getAll(@ByRef StringVector names, @StdVector IntPointer types,
@ByRef StringVector strValues, @StdVector DoublePointer numValues);
 
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_flann.java


示例16: knnSearch

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public native void knnSearch(@InputArray FloatPointer query, @OutputArray IntPointer indices,
@OutputArray FloatPointer dists, int knn, @ByRef SearchParams params/*=SearchParams()*/);
 
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_flann.java


示例17: radiusSearch

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public native int radiusSearch(@InputArray FloatPointer query,
@OutputArray IntPointer indices, @OutputArray FloatPointer dists,
double radius, int maxResults, @ByRef SearchParams params/*=SearchParams()*/);
 
开发者ID:wordin0,项目名称:javacv,代码行数:4,代码来源:opencv_flann.java


示例18: registration_table

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
@Cast("int32_t(*)[2]")
public native IntPointer registration_table();
 
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:freenect.java


示例19: FREAK

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
public FREAK(boolean orientationNormalized/*=true*/, boolean scaleNormalized/*=true*/,
        float patternScale/*=22.0f*/, int nOctaves/*=4*/, @Const @StdVector IntPointer selectedPairs/*=null*/) {
    allocate(orientationNormalized, scaleNormalized, patternScale, nOctaves, selectedPairs);
}
 
开发者ID:wordin0,项目名称:javacv,代码行数:5,代码来源:opencv_features2d.java


示例20: allocate

import com.googlecode.javacpp.IntPointer; //导入依赖的package包/类
private native void allocate(boolean orientationNormalized/*=true*/, boolean scaleNormalized/*=true*/,
float patternScale/*=22.0f*/, int nOctaves/*=4*/, @Const @StdVector IntPointer selectedPairs/*=null*/);
 
开发者ID:wordin0,项目名称:javacv,代码行数:3,代码来源:opencv_features2d.java



注:本文中的com.googlecode.javacpp.IntPointer类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ReferenceMetadata类代码示例发布时间:2022-05-23
下一篇:
Java PhaseInterceptor类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap