当前位置: 首页>>代码示例>>Java>>正文


Java ProresDecoder类代码示例

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


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

示例1: byFourcc

import org.jcodec.codecs.prores.ProresDecoder; //导入依赖的package包/类
private VideoDecoder byFourcc(String fourcc) {
    if (fourcc.equals("avc1")) {
        return new H264Decoder();
    } else if (fourcc.equals("m1v1") || fourcc.equals("m2v1")) {
        return new MPEGDecoder();
    } else if (fourcc.equals("apco") || fourcc.equals("apcs") || fourcc.equals("apcn") || fourcc.equals("apch")
            || fourcc.equals("ap4h")) {
        return new ProresDecoder();
    }
    return null;
}
 
开发者ID:vitrivr,项目名称:cineast,代码行数:12,代码来源:JcodecFrameGrab.java

示例2: videoDecoder

import org.jcodec.codecs.prores.ProresDecoder; //导入依赖的package包/类
private VideoDecoder videoDecoder(String fourcc) {
	if (fourcc.equals("avc1"))
		return new H264Decoder();
	else if (fourcc.equals("m1v1") || fourcc.equals("m2v1"))
		return new MPEGDecoder();
	else if (fourcc.equals("apco") || fourcc.equals("apcs") || fourcc.equals("apcn") || fourcc.equals("apch") || fourcc.equals("ap4h"))
		return new ProresDecoder();
	LOG.info("No video decoder for '" + fourcc + "'");
	return null;
}
 
开发者ID:arisona,项目名称:ether,代码行数:11,代码来源:FrameGrab.java

示例3: getDecoder

import org.jcodec.codecs.prores.ProresDecoder; //导入依赖的package包/类
@Override
protected VideoDecoder getDecoder(int scaleFactor) {
    switch (scaleFactor) {
    case 2:
        return new ProresToThumb2x2();
    case 1:
        return new ProresToThumb4x4();
    case 0:
        return new ProresDecoder();
    default:
        throw new IllegalArgumentException("Unsupported scale factor: " + scaleFactor);
    }
}
 
开发者ID:PenoaksDev,项目名称:OpenSpaceDVR,代码行数:14,代码来源:Prores2AVCTrack.java

示例4: getVideoDecoder

import org.jcodec.codecs.prores.ProresDecoder; //导入依赖的package包/类
public static VideoDecoder getVideoDecoder(String fourcc) {
    if ("apch".equals(fourcc) || "apcs".equals(fourcc) || "apco".equals(fourcc) || "apcn".equals(fourcc)
            || "ap4h".equals(fourcc))
        return new ProresDecoder();
    else if ("m2v1".equals(fourcc))
        return new MPEGDecoder();
    else
        return null;
}
 
开发者ID:PenoaksDev,项目名称:OpenSpaceDVR,代码行数:10,代码来源:JCodecUtil.java

示例5: readOther

import org.jcodec.codecs.prores.ProresDecoder; //导入依赖的package包/类
private void readOther(BitReader in, float[] coef, int idx, int g, int sfb, float[] vq, VLC vlc) {
    int g_len = group_len[g];
    int cfo = swbOffset[sfb];
    int off_len = swbOffset[sfb + 1] - swbOffset[sfb];

    for (int group = 0; group < g_len; group++, cfo += 128) {
        int cf = cfo;
        int len = off_len;

        do {
            int cb_idx = vlc.readVLC(in);

            if (cb_idx != 0) {
                int nnz = cb_idx >> 12;
                int nzt = cb_idx >> 8;
                int bits = in.readNBit(nnz) << (32 - nnz);

                for (int j = 0; j < 2; j++) {
                    if ((nzt & 1 << j) != 0) {
                        int b;
                        int n;
                        /*
                         * The total length of escape_sequence must be < 22
                         * bits according to the specification (i.e. max is
                         * 111111110xxxxxxxxxxxx).
                         */

                        b = ProresDecoder.nZeros(~in.checkNBit(14));

                        if (b > 8) {
                            throw new RuntimeException("error in spectral data, ESC overflow\n");
                        }

                        in.skip(b + 1);
                        b += 4;
                        n = (1 << b) + in.readNBit(b);
                        coef[cf++] = MathUtil.cubeRoot(n) | (bits & 1 << 31);
                        bits <<= 1;
                    } else {
                        int v = (int) vq[cb_idx & 15];
                        coef[cf++] = (bits & 1 << 31) | v;
                        // bits <<= !!v;
                    }
                    cb_idx >>= 4;
                }
                cf += 2;
                len += 2;
            }
        } while (len > 0);
    }
}
 
开发者ID:PenoaksDev,项目名称:OpenSpaceDVR,代码行数:52,代码来源:BlockICS.java


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