亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? idct.java

?? J2ME MPEG4 解碼代碼。 以及使用方法。
?? JAVA
字號:
/*
 * The discrete cosine transform (DCT) converts an 8 by 8 block of pel
 * values to an 8 by 8 matrix of horizontal and vertical spatial frequency 
 * coefficients. An 8 by 8 block of pel values can be reconstructed by 
 * performing the inverse discrete cosine transform (IDCT) on the spatial 
 * frequency coefficients. In general, most of the energy is concentrated 
 * in the low frequency coefficients, which are located in the upper left 
 * corner of the transformed matrix.
 * 
 * References: 
 *   C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT
 *   Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics,
 *   Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991.
 *   
 *   A. N. Netravali, B.G. Haskell, 
 *   "Digital Pictures - Representation and Compression", 
 *   2nd edit., New York, London: Plenum Press, 1995
 */
public class Idct {
    // Scale used for fixed point math
    public static final int FIXED_POINT_SCALE = 11;

    // DCT dimension is 64 (8x8)
    public static final int DCT_DIM = 64;

    // The basic DCT block is 8x8 samples
    public static final int DCT_SIZE = 8;
    public static final int HALF_DCT_SIZE = 4;

    private final long c1, c2, c3, c4, c5, c6, c7, c8, c9;

    public Idct() {
    /*
     * We perform these calculations manually so the
     * code is CLDC 1.0 compliant.
     * 
     * 
     * final long factor = 1 << FIXED_POINT_SCALE;
     * final double alpha = Math.PI / 16.0;
     * 
     * c1 = (long)(factor * Math.cos(4.0 * alpha));
     * c2 = (long)(factor * Math.sin(4.0 * alpha));
     * c3 = (long)(factor * Math.cos(1.0 * alpha));
     * c4 = (long)(factor * Math.sin(1.0 * alpha));
     * c5 = (long)(factor * Math.cos(2.0 * alpha));
     * c6 = (long)(factor * Math.sin(2.0 * alpha));
     * c7 = (long)(factor * Math.cos(3.0 * alpha));
     * c8 = (long)(factor * Math.sin(3.0 * alpha));
     * c9 = (long)(factor * Math.sqrt(2.0));
     * 
     */

    	c1 = 1448;
    	c2 = 1448;
    	c3 = 2008;
    	c4 = 399;
    	c5 = 1892;
    	c6 = 783;
    	c7 = 1702;
    	c8 = 1137;
    	c9 = 2896;
    }

    public void calculate(int[] dct_coeff) {
        for (int row = 0; row < DCT_SIZE; ++row)
            idctRow(dct_coeff, row);

        for (int col = 0; col < DCT_SIZE; ++col)
            idctCol(dct_coeff, col);
    }

    private void idctRow(int[] dct_coeff, int row) {
        final long s1_0 = dct_coeff[row * DCT_SIZE + 4] << 3;
        final long s1_1 = dct_coeff[row * DCT_SIZE + 0] << 3;
        final long s1_2 = dct_coeff[row * DCT_SIZE + 1] << 3;
        final long s1_3 = dct_coeff[row * DCT_SIZE + 7] << 3;
        final long s1_4 = dct_coeff[row * DCT_SIZE + 2] << 3;
        final long s1_5 = dct_coeff[row * DCT_SIZE + 6] << 3;
        final long s1_6 = dct_coeff[row * DCT_SIZE + 3] << 3;
        final long s1_7 = dct_coeff[row * DCT_SIZE + 5] << 3;

        final long s2_0 = (((c1 * s1_0) >> FIXED_POINT_SCALE) + ((c2 * s1_1) >> FIXED_POINT_SCALE)) << 1;
        final long s2_1 = (((c5 * s1_4) >> FIXED_POINT_SCALE) + ((c6 * s1_5) >> FIXED_POINT_SCALE)) << 1;
        final long s2_2 = (((c1 * s1_1) >> FIXED_POINT_SCALE) - ((c2 * s1_0) >> FIXED_POINT_SCALE)) << 1;
        final long s2_3 = (((c5 * s1_5) >> FIXED_POINT_SCALE) - ((c6 * s1_4) >> FIXED_POINT_SCALE)) << 1;
        final long s2_4 = (((c3 * s1_2) >> FIXED_POINT_SCALE) + ((c4 * s1_3) >> FIXED_POINT_SCALE)) << 1;
        final long s2_5 = (((c7 * s1_6) >> FIXED_POINT_SCALE) + ((c8 * s1_7) >> FIXED_POINT_SCALE)) << 1;
        final long s2_6 = (((c3 * s1_3) >> FIXED_POINT_SCALE) - ((c4 * s1_2) >> FIXED_POINT_SCALE)) << 1;
        final long s2_7 = (((c7 * s1_7) >> FIXED_POINT_SCALE) - ((c8 * s1_6) >> FIXED_POINT_SCALE)) << 1;

        final long s3_0 = (s2_4 + s2_5) >> 1;
        final long s3_1 = (s2_6 - s2_7) >> 1;
        final long s3_2 = s2_0;
        final long s3_3 = (s2_4 - s2_5) >> 1;
        final long s3_4 = s2_1;
        final long s3_5 = s2_2;
        final long s3_6 = s2_3;
        final long s3_7 = (s2_6 + s2_7) >> 1;

        final long s4_0 = s3_0;
        final long s4_1 = s3_1;
        final long s4_2 = s3_2;
        final long s4_3 = s3_4;
        final long s4_4 = s3_5;
        final long s4_5 = (s3_3 * c9) >> FIXED_POINT_SCALE;
        final long s4_6 = s3_6;
        final long s4_7 = (s3_7 * c9) >> FIXED_POINT_SCALE;

        final long s5_0 = (s4_2 + s4_3) >> 1;
        final long s5_1 = s4_0;
        final long s5_2 = (s4_4 + s4_5) >> 1;
        final long s5_3 = (s4_6 + s4_7) >> 1;
        final long s5_4 = (s4_2 - s4_3) >> 1;
        final long s5_5 = s4_1;
        final long s5_6 = (s4_4 - s4_5) >> 1;
        final long s5_7 = (s4_6 - s4_7) >> 1;

        final long d0 = (s5_0 + s5_1) >> 1;
        final long d1 = (s5_2 - s5_3) >> 1;
        final long d2 = (s5_2 + s5_3) >> 1;
        final long d3 = (s5_4 - s5_5) >> 1;
        final long d4 = (s5_4 + s5_5) >> 1;
        final long d5 = (s5_6 + s5_7) >> 1;
        final long d6 = (s5_6 - s5_7) >> 1;
        final long d7 = (s5_0 - s5_1) >> 1;

        dct_coeff[row * DCT_SIZE + 0] = d0 < 0? (short)((d0 - HALF_DCT_SIZE) >> 3) : (short)((d0 + HALF_DCT_SIZE) >> 3);
        dct_coeff[row * DCT_SIZE + 1] = d1 < 0? (short)((d1 - HALF_DCT_SIZE) >> 3) : (short)((d1 + HALF_DCT_SIZE) >> 3);
        dct_coeff[row * DCT_SIZE + 2] = d2 < 0? (short)((d2 - HALF_DCT_SIZE) >> 3) : (short)((d2 + HALF_DCT_SIZE) >> 3);
        dct_coeff[row * DCT_SIZE + 3] = d3 < 0? (short)((d3 - HALF_DCT_SIZE) >> 3) : (short)((d3 + HALF_DCT_SIZE) >> 3);
        dct_coeff[row * DCT_SIZE + 4] = d4 < 0? (short)((d4 - HALF_DCT_SIZE) >> 3) : (short)((d4 + HALF_DCT_SIZE) >> 3);
        dct_coeff[row * DCT_SIZE + 5] = d5 < 0? (short)((d5 - HALF_DCT_SIZE) >> 3) : (short)((d5 + HALF_DCT_SIZE) >> 3);
        dct_coeff[row * DCT_SIZE + 6] = d6 < 0? (short)((d6 - HALF_DCT_SIZE) >> 3) : (short)((d6 + HALF_DCT_SIZE) >> 3);
        dct_coeff[row * DCT_SIZE + 7] = d7 < 0? (short)((d7 - HALF_DCT_SIZE) >> 3) : (short)((d7 + HALF_DCT_SIZE) >> 3);
    }

    private void idctCol(int[] dct_coeff, int col) {
    	final long s1_0 = dct_coeff[4 * DCT_SIZE + col] << 3;
    	final long s1_1 = dct_coeff[0 * DCT_SIZE + col] << 3;
    	final long s1_2 = dct_coeff[1 * DCT_SIZE + col] << 3;
    	final long s1_3 = dct_coeff[7 * DCT_SIZE + col] << 3;
    	final long s1_4 = dct_coeff[2 * DCT_SIZE + col] << 3;
    	final long s1_5 = dct_coeff[6 * DCT_SIZE + col] << 3;
    	final long s1_6 = dct_coeff[3 * DCT_SIZE + col] << 3;
    	final long s1_7 = dct_coeff[5 * DCT_SIZE + col] << 3;

    	final long s2_0 = (((c1 * s1_0) >> FIXED_POINT_SCALE) + ((c2 * s1_1) >> FIXED_POINT_SCALE)) << 1;
    	final long s2_1 = (((c5 * s1_4) >> FIXED_POINT_SCALE) + ((c6 * s1_5) >> FIXED_POINT_SCALE)) << 1;
    	final long s2_2 = (((c1 * s1_1) >> FIXED_POINT_SCALE) - ((c2 * s1_0) >> FIXED_POINT_SCALE)) << 1;
    	final long s2_3 = (((c5 * s1_5) >> FIXED_POINT_SCALE) - ((c6 * s1_4) >> FIXED_POINT_SCALE)) << 1;
    	final long s2_4 = (((c3 * s1_2) >> FIXED_POINT_SCALE) + ((c4 * s1_3) >> FIXED_POINT_SCALE)) << 1;
    	final long s2_5 = (((c7 * s1_6) >> FIXED_POINT_SCALE) + ((c8 * s1_7) >> FIXED_POINT_SCALE)) << 1;
    	final long s2_6 = (((c3 * s1_3) >> FIXED_POINT_SCALE) - ((c4 * s1_2) >> FIXED_POINT_SCALE)) << 1;
    	final long s2_7 = (((c7 * s1_7) >> FIXED_POINT_SCALE) - ((c8 * s1_6) >> FIXED_POINT_SCALE)) << 1;

    	final long s3_0 = (s2_4 + s2_5) >> 1;
    	final long s3_1 = (s2_6 - s2_7) >> 1;
    	final long s3_2 = s2_0;
    	final long s3_3 = (s2_4 - s2_5) >> 1;
    	final long s3_4 = s2_1;
    	final long s3_5 = s2_2;
    	final long s3_6 = s2_3;
    	final long s3_7 = (s2_6 + s2_7) >> 1;

    	final long s4_0 = s3_0;
    	final long s4_1 = s3_1;
    	final long s4_2 = s3_2;
    	final long s4_3 = s3_4;
    	final long s4_4 = s3_5;
    	final long s4_5 = (s3_3 * c9) >> FIXED_POINT_SCALE;
    	final long s4_6 = s3_6;
    	final long s4_7 = (s3_7 * c9) >> FIXED_POINT_SCALE;

    	final long s5_0 = (s4_2 + s4_3) >> 1;
    	final long s5_1 = s4_0;
    	final long s5_2 = (s4_4 + s4_5) >> 1;
    	final long s5_3 = (s4_6 + s4_7) >> 1;
    	final long s5_4 = (s4_2 - s4_3) >> 1;
    	final long s5_5 = s4_1;
    	final long s5_6 = (s4_4 - s4_5) >> 1;
    	final long s5_7 = (s4_6 - s4_7) >> 1;

    	final long d0 = (s5_0 + s5_1) >> 1;
    	final long d1 = (s5_2 - s5_3) >> 1;
    	final long d2 = (s5_2 + s5_3) >> 1;
    	final long d3 = (s5_4 - s5_5) >> 1;
    	final long d4 = (s5_4 + s5_5) >> 1;
    	final long d5 = (s5_6 + s5_7) >> 1;
    	final long d6 = (s5_6 - s5_7) >> 1;
    	final long d7 = (s5_0 - s5_1) >> 1;

        dct_coeff[0 * DCT_SIZE + col] = d0 < 0? (short)((d0 - HALF_DCT_SIZE) >> 3) : (short)((d0 + HALF_DCT_SIZE) >> 3);
        dct_coeff[1 * DCT_SIZE + col] = d1 < 0? (short)((d1 - HALF_DCT_SIZE) >> 3) : (short)((d1 + HALF_DCT_SIZE) >> 3);
        dct_coeff[2 * DCT_SIZE + col] = d2 < 0? (short)((d2 - HALF_DCT_SIZE) >> 3) : (short)((d2 + HALF_DCT_SIZE) >> 3);
        dct_coeff[3 * DCT_SIZE + col] = d3 < 0? (short)((d3 - HALF_DCT_SIZE) >> 3) : (short)((d3 + HALF_DCT_SIZE) >> 3);
        dct_coeff[4 * DCT_SIZE + col] = d4 < 0? (short)((d4 - HALF_DCT_SIZE) >> 3) : (short)((d4 + HALF_DCT_SIZE) >> 3);
        dct_coeff[5 * DCT_SIZE + col] = d5 < 0? (short)((d5 - HALF_DCT_SIZE) >> 3) : (short)((d5 + HALF_DCT_SIZE) >> 3);
        dct_coeff[6 * DCT_SIZE + col] = d6 < 0? (short)((d6 - HALF_DCT_SIZE) >> 3) : (short)((d6 + HALF_DCT_SIZE) >> 3);
        dct_coeff[7 * DCT_SIZE + col] = d7 < 0? (short)((d7 - HALF_DCT_SIZE) >> 3) : (short)((d7 + HALF_DCT_SIZE) >> 3);
    }
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人91在线观看| av日韩在线网站| 日本韩国精品在线| 日韩欧美电影一区| 国产精品黄色在线观看| 免费成人你懂的| 91久久人澡人人添人人爽欧美| 91麻豆精品91久久久久久清纯| 中文字幕av一区二区三区高 | 久久成人18免费观看| 91亚洲男人天堂| 国产日韩欧美a| 久久国产乱子精品免费女| 91网站视频在线观看| 国产欧美1区2区3区| 免播放器亚洲一区| 在线播放日韩导航| 夜夜嗨av一区二区三区中文字幕| 国产精品亚洲午夜一区二区三区| 91麻豆精品国产91久久久久久| 亚洲女与黑人做爰| 9色porny自拍视频一区二区| 2020国产精品自拍| 久久国产人妖系列| 日韩欧美国产一二三区| 日韩精彩视频在线观看| 欧美性欧美巨大黑白大战| 中文字幕在线一区二区三区| 国产成人啪午夜精品网站男同| 欧美va亚洲va在线观看蝴蝶网| 日日噜噜夜夜狠狠视频欧美人 | 99久久精品国产一区二区三区| 欧美精品一区二区久久婷婷| 免费不卡在线观看| 欧美精品一区二区在线播放| 激情欧美一区二区| 久久久久久久网| 国产成人精品三级| 国产精品色婷婷| 色婷婷久久久亚洲一区二区三区| 亚洲欧美日韩久久精品| 91猫先生在线| 亚洲成人av一区二区| 在线播放日韩导航| 国产精品88av| 日韩毛片视频在线看| 在线视频一区二区三| 亚洲国产精品视频| 精品免费一区二区三区| 国产91精品在线观看| 综合色中文字幕| 欧美日韩电影在线| 国产专区欧美精品| 蜜臂av日日欢夜夜爽一区| 成人黄色电影在线| 欧美视频一区二区三区四区| 欧美性极品少妇| 色激情天天射综合网| av中文字幕亚洲| 视频一区欧美精品| 免费成人在线网站| 欧美日韩成人在线| 尤物在线观看一区| 国产拍欧美日韩视频二区| 亚洲综合色成人| 欧美成人女星排名| 欧美中文字幕一二三区视频| 丁香婷婷综合激情五月色| 国产麻豆日韩欧美久久| 性做久久久久久| 亚洲免费观看在线观看| 91超碰这里只有精品国产| 伊人开心综合网| 在线观看日韩国产| 午夜久久久久久电影| 欧美一区二区三区在线视频| 美国十次综合导航| 日韩欧美综合在线| 国产曰批免费观看久久久| 中文字幕成人在线观看| 色丁香久综合在线久综合在线观看| 欧美日韩国产欧美日美国产精品| 久久精品国产亚洲aⅴ| 精品三级在线观看| 久久精工是国产品牌吗| 欧美老年两性高潮| 欧洲人成人精品| 国产偷国产偷亚洲高清人白洁| 久久激情五月婷婷| 91在线观看地址| 一区二区三区不卡视频| 色天使久久综合网天天| 国产欧美一区二区精品仙草咪| 国产69精品久久99不卡| 国产精品色噜噜| 欧美r级在线观看| 成人免费福利片| 亚洲午夜一区二区| 精品va天堂亚洲国产| 成人av手机在线观看| 五月天欧美精品| 911国产精品| 亚洲美女少妇撒尿| 91福利视频网站| 日韩国产精品久久久久久亚洲| 欧美精品电影在线播放| 99久久精品免费看国产免费软件| 国产一区啦啦啦在线观看| 欧洲色大大久久| 成人丝袜视频网| 国产精品丝袜黑色高跟| 亚洲日本成人在线观看| 日韩高清电影一区| 不卡一区在线观看| 亚洲精品一线二线三线无人区| 国产精品动漫网站| 婷婷六月综合亚洲| 日日夜夜一区二区| 日本vs亚洲vs韩国一区三区 | 99久久久无码国产精品| 亚洲一二三区在线观看| 亚洲日本在线天堂| 国产日韩三级在线| 欧美一级午夜免费电影| 国产欧美一区二区精品性色超碰| 久久精品夜色噜噜亚洲aⅴ| 91精品国产综合久久蜜臀| 一本色道综合亚洲| 亚洲国产精品精华液2区45| 在线视频一区二区免费| 欧美日韩一二区| 欧美精品久久99久久在免费线| 国产成人精品网址| 美国十次了思思久久精品导航| 国产精品人妖ts系列视频| 日韩一区二区三区av| 国产精品少妇自拍| 精品在线播放免费| 欧美体内she精视频| 亚洲欧美视频在线观看| 日韩制服丝袜av| 欧美精品在线观看一区二区| 日本不卡一区二区三区高清视频| 精品视频一区二区三区免费| 免费在线成人网| 亚洲精品国产无套在线观| 欧美日韩综合一区| 麻豆精品久久精品色综合| 欧美三级资源在线| 国产精品系列在线| 国产乱淫av一区二区三区| 99久久99久久精品免费看蜜桃| 日韩欧美久久久| 亚洲日本电影在线| av中文一区二区三区| 久久免费美女视频| 亚洲一线二线三线视频| 91精品国产综合久久久久久| 久久亚洲影视婷婷| 亚洲一区二区在线免费观看视频 | 国产凹凸在线观看一区二区| 99视频精品全部免费在线| 欧美精品三级在线观看| 中文字幕第一区二区| 麻豆精品在线播放| 91高清在线观看| 国产三级精品视频| 日韩福利视频网| av电影一区二区| 精品sm捆绑视频| 五月天亚洲婷婷| 欧洲一区在线电影| 国产精品国模大尺度视频| 日本亚洲天堂网| 欧美中文一区二区三区| 国产精品日产欧美久久久久| 精油按摩中文字幕久久| 欧美亚洲动漫另类| 亚洲天堂2014| 成人做爰69片免费看网站| 精品久久久久久久一区二区蜜臀| 亚洲bdsm女犯bdsm网站| 99国产精品久久| 国产精品久久久一本精品 | 5月丁香婷婷综合| 亚洲精品一二三四区| 成人免费的视频| 国产片一区二区| 国产精品99久久久久| 精品国产91乱码一区二区三区| 秋霞午夜av一区二区三区| 欧美在线播放高清精品| 亚洲欧洲综合另类在线| 成人高清视频在线观看| 亚洲国产激情av| 国产成人综合网| 国产精品污www在线观看| 粉嫩欧美一区二区三区高清影视| 久久久久久9999| 国产99久久久国产精品潘金网站|