當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。