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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? mov.c

?? arm平臺下的H264編碼和解碼源代碼
?? C
?? 第 1 頁 / 共 4 頁
字號:
                    /* load the palette from the file */                    color_start = get_be32(pb);                    color_count = get_be16(pb);                    color_end = get_be16(pb);                    for (j = color_start; j <= color_end; j++) {                        /* each R, G, or B component is 16 bits;                         * only use the top 8 bits; skip alpha bytes                         * up front */                        get_byte(pb);                        get_byte(pb);                        r = get_byte(pb);                        get_byte(pb);                        g = get_byte(pb);                        get_byte(pb);                        b = get_byte(pb);                        get_byte(pb);                        c->palette_control.palette[j] =                            (r << 16) | (g << 8) | (b);                    }                }                st->codec.palctrl = &c->palette_control;                st->codec.palctrl->palette_changed = 1;            } else                st->codec.palctrl = NULL;            a.size = size;	    mov_read_default(c, pb, a);#endif	} else {            st->codec.codec_id = codec_get_id(mov_audio_tags, format);	    if(st->codec.codec_id==CODEC_ID_AMR_NB || st->codec.codec_id==CODEC_ID_AMR_WB) //from TS26.244	    {#ifdef DEBUG               printf("AMR-NB or AMR-WB audio identified!!\n");#endif               get_be32(pb);get_be32(pb); //Reserved_8               get_be16(pb);//Reserved_2               get_be16(pb);//Reserved_2               get_be32(pb);//Reserved_4               get_be16(pb);//TimeScale               get_be16(pb);//Reserved_2                //AMRSpecificBox.(10 bytes)                              get_be32(pb); //size               get_be32(pb); //type=='damr'               get_be32(pb); //vendor               get_byte(pb); //decoder version               get_be16(pb); //mode_set               get_byte(pb); //mode_change_period               get_byte(pb); //frames_per_sample               st->duration = AV_NOPTS_VALUE;//Not possible to get from this info, must count number of AMR frames               if(st->codec.codec_id==CODEC_ID_AMR_NB)               {                   st->codec.sample_rate=8000;                   st->codec.channels=1;               }               else //AMR-WB               {                   st->codec.sample_rate=16000;                   st->codec.channels=1;               }               st->codec.bits_per_sample=16;               st->codec.bit_rate=0; /*It is not possible to tell this before we have                                        an audio frame and even then every frame can be different*/	    }            else if( st->codec.codec_tag == MKTAG( 'm', 'p', '4', 's' ))            {                //This is some stuff for the hint track, lets ignore it!                //Do some mp4 auto detect.                c->mp4=1;                size-=(16);                url_fskip(pb, size); /* The mp4s atom also contians a esds atom that we can skip*/            }            else if( st->codec.codec_tag == MKTAG( 'm', 'p', '4', 'a' ))            {                /* Handle mp4 audio tag */                get_be32(pb); /* version */                get_be32(pb);                st->codec.channels = get_be16(pb); /* channels */                st->codec.bits_per_sample = get_be16(pb); /* bits per sample */                get_be32(pb);                st->codec.sample_rate = get_be16(pb); /* sample rate, not always correct */                get_be16(pb);                c->mp4=1;		{                MOV_atom_t a = { format, url_ftell(pb), size - (20 + 20 + 8) };                mov_read_default(c, pb, a);		}                /* Get correct sample rate from extradata */                if(st->codec.extradata_size) {                   const int samplerate_table[] = {                     96000, 88200, 64000, 48000, 44100, 32000,                      24000, 22050, 16000, 12000, 11025, 8000,                     7350, 0, 0, 0                   };                   unsigned char *px = st->codec.extradata;                   // 5 bits objectTypeIndex, 4 bits sampleRateIndex, 4 bits channels                   int samplerate_index = ((px[0] & 7) << 1) + ((px[1] >> 7) & 1);                   st->codec.sample_rate = samplerate_table[samplerate_index];                }            }	    else if(size>=(16+20))	    {//16 bytes read, reading atleast 20 more#ifdef DEBUG                printf("audio size=0x%X\n",size);#endif                uint16_t version = get_be16(pb); /* version */                get_be16(pb); /* revision level */                get_be32(pb); /* vendor */                st->codec.channels = get_be16(pb);		/* channel count */	        st->codec.bits_per_sample = get_be16(pb);	/* sample size */                /* handle specific s8 codec */                get_be16(pb); /* compression id = 0*/                get_be16(pb); /* packet size = 0 */                st->codec.sample_rate = ((get_be32(pb) >> 16));	        //printf("CODECID %d  %d  %.4s\n", st->codec.codec_id, CODEC_ID_PCM_S16BE, (char*)&format);	        switch (st->codec.codec_id) {	        case CODEC_ID_PCM_S16BE:		    if (st->codec.bits_per_sample == 8)		        st->codec.codec_id = CODEC_ID_PCM_S8;                    /* fall */	        case CODEC_ID_PCM_U8:		    st->codec.bit_rate = st->codec.sample_rate * 8;		    break;	        default:                    ;	        }                //Read QT version 1 fields. In version 0 theese dont exist#ifdef DEBUG                printf("version =%d mp4=%d\n",version,c->mp4);                printf("size-(16+20+16)=%d\n",size-(16+20+16));#endif                if((version==1) && size>=(16+20+16))                {                    get_be32(pb); /* samples per packet */                    get_be32(pb); /* bytes per packet */                    get_be32(pb); /* bytes per frame */                    get_be32(pb); /* bytes per sample */                    if(size>(16+20+16))                    {                        //Optional, additional atom-based fields#ifdef DEBUG                        printf("offest=0x%X, sizeleft=%d=0x%x,format=%c%c%c%c\n",(int)url_ftell(pb),size - (16 + 20 + 16 ),size - (16 + 20 + 16 ),                            (format >> 0) & 0xff,                            (format >> 8) & 0xff,                            (format >> 16) & 0xff,                            (format >> 24) & 0xff);#endif                        MOV_atom_t a = { format, url_ftell(pb), size - (16 + 20 + 16 + 8) };                        mov_read_default(c, pb, a);                    }                }                else                {                    //We should be down to 0 bytes here, but lets make sure.                    size-=(16+20);#ifdef DEBUG                    if(size>0)                        printf("skipping 0x%X bytes\n",size-(16+20));#endif                    url_fskip(pb, size);                }            }            else            {                size-=16;                //Unknown size, but lets do our best and skip the rest.#ifdef DEBUG                printf("Strange size, skipping 0x%X bytes\n",size);#endif                url_fskip(pb, size);            }        }    }    return 0;}static int mov_read_stsc(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom){    AVStream *st = c->fc->streams[c->fc->nb_streams-1];    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;    int entries, i;    print_atom("stsc", atom);    get_byte(pb); /* version */    get_byte(pb); get_byte(pb); get_byte(pb); /* flags */    entries = get_be32(pb);#ifdef DEBUGprintf("track[%i].stsc.entries = %i\n", c->fc->nb_streams-1, entries);#endif    sc->sample_to_chunk_sz = entries;    sc->sample_to_chunk = (MOV_sample_to_chunk_tbl*) av_malloc(entries * sizeof(MOV_sample_to_chunk_tbl));    if (!sc->sample_to_chunk)        return -1;    for(i=0; i<entries; i++) {        sc->sample_to_chunk[i].first = get_be32(pb);        sc->sample_to_chunk[i].count = get_be32(pb);        sc->sample_to_chunk[i].id = get_be32(pb);#ifdef DEBUG/*        printf("sample_to_chunk first=%ld count=%ld, id=%ld\n", sc->sample_to_chunk[i].first, sc->sample_to_chunk[i].count, sc->sample_to_chunk[i].id); */#endif    }    return 0;}static int mov_read_stss(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom){    AVStream *st = c->fc->streams[c->fc->nb_streams-1];    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;    int entries, i;    print_atom("stss", atom);    get_byte(pb); /* version */    get_byte(pb); get_byte(pb); get_byte(pb); /* flags */    entries = get_be32(pb);    sc->keyframe_count = entries;#ifdef DEBUG    av_log(NULL, AV_LOG_DEBUG, "keyframe_count = %ld\n", sc->keyframe_count);#endif    sc->keyframes = (long*) av_malloc(entries * sizeof(long));    if (!sc->keyframes)        return -1;    for(i=0; i<entries; i++) {        sc->keyframes[i] = get_be32(pb);#ifdef DEBUG/*        av_log(NULL, AV_LOG_DEBUG, "keyframes[]=%ld\n", sc->keyframes[i]); */#endif    }    return 0;}static int mov_read_stsz(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom){    AVStream *st = c->fc->streams[c->fc->nb_streams-1];    MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;    int entries, i;    print_atom("stsz", atom);    get_byte(pb); /* version */    get_byte(pb); get_byte(pb); get_byte(pb); /* flags */    sc->sample_size = get_be32(pb);    entries = get_be32(pb);    sc->sample_count = entries;#ifdef DEBUG    printf("sample_size = %ld sample_count = %ld\n", sc->sample_size, sc->sample_count);#endif    if(sc->sample_size)        return 0; /* there isn't any table following */    sc->sample_sizes = (long*) av_malloc(entries * sizeof(long));    if (!sc->sample_sizes)        return -1;    for(i=0; i<entries; i++) {        sc->sample_sizes[i] = get_be32(pb);#ifdef DEBUG/*        printf("sample_sizes[]=%ld\n", sc->sample_sizes[i]); */#endif    }    return 0;}static int mov_read_stts(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom){    AVStream *st = c->fc->streams[c->fc->nb_streams-1];    //MOVStreamContext *sc = (MOVStreamContext *)st->priv_data;    int entries, i;    int64_t duration=0;    int64_t total_sample_count=0;    print_atom("stts", atom);    get_byte(pb); /* version */    get_byte(pb); get_byte(pb); get_byte(pb); /* flags */    entries = get_be32(pb);#ifdef DEBUGprintf("track[%i].stts.entries = %i\n", c->fc->nb_streams-1, entries);#endif    for(i=0; i<entries; i++) {        int sample_duration;        int sample_count;        sample_count=get_be32(pb);        sample_duration = get_be32(pb);#ifdef DEBUG        printf("sample_count=%d, sample_duration=%d\n",sample_count,sample_duration);#endif        duration+=sample_duration*sample_count;        total_sample_count+=sample_count;#if 0 //We calculate an average instead, needed by .mp4-files created with nec e606 3g phone        if (!i && st->codec.codec_type==CODEC_TYPE_VIDEO) {            st->codec.frame_rate_base = sample_duration ? sample_duration : 1;            st->codec.frame_rate = c->streams[c->total_streams]->time_scale;#ifdef DEBUG            printf("VIDEO FRAME RATE= %i (sd= %i)\n", st->codec.frame_rate, sample_duration);#endif        }#endif    }    /*The stsd atom which contain codec type sometimes comes after the stts so we cannot check for codec_type*/    if(duration>0)    {        av_reduce(            &st->codec.frame_rate,             &st->codec.frame_rate_base,             c->streams[c->total_streams]->time_scale * total_sample_count,            duration,            INT_MAX        );#ifdef DEBUG        printf("FRAME RATE average (video or audio)= %f (tot sample count= %i ,tot dur= %i timescale=%d)\n", (float)st->codec.frame_rate/st->codec.frame_rate_base,total_sample_count,duration,c->streams[c->total_streams]->time_scale);#endif    }    else    {        st->codec.frame_rate_base = 1;        st->codec.frame_rate = c->streams[c->total_streams]->time_scale;    }    return 0;}static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom){    AVStream *st;    MOVStreamContext *sc;    print_atom("trak", atom);    st = av_new_stream(c->fc, c->fc->nb_streams);    if (!st) return -2;    sc = (MOVStreamContext*) av_mallocz(sizeof(MOVStreamContext));    if (!sc) {	av_free(st);        return -1;    }    sc->sample_to_chunk_index = -1;    st->priv_data = sc;    st->codec.codec_type = CODEC_TYPE_MOV_OTHER;    st->start_time = 0; /* XXX: check */    st->duration = (c->duration * (int64_t)AV_TIME_BASE) / c->time_scale;    c->streams[c->fc->nb_streams-1] = sc;    return mov_read_default(c, pb, atom);}static int mov_read_tkhd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom){    AVStream *st;    print_atom("tkhd", atom);    st = c->fc->streams[c->fc->nb_streams-1];    get_byte(pb); /* version */    get_byte(pb); get_byte(pb);    get_byte(pb); /* flags */    /*    MOV_TRACK_ENABLED 0x0001    MOV_TRACK_IN_MOVIE 0x0002    MOV_TRACK_IN_PREVIEW 0x0004    MOV_TRACK_IN_POSTER 0x0008    */    get_be32(pb); /* creation time */    get_be32(pb); /* modification time */    st->id = (int)get_be32(pb); /* track id (NOT 0 !)*/    get_be32(pb); /* reserved */    st->start_time = 0; /* check */    st->duration = (get_be32(pb) * (int64_t)AV_TIME_BASE) / c->time_scale; /* duration */    get_be32(pb); /* reserved */    get_be32(pb); /* reserved */    get_be16(pb); /* layer */    get_be16(pb); /* alternate group */    get_be16(pb); /* volume */    get_be16(pb); /* reserved */    url_fskip(pb, 36); /* display matrix */    /* those are fixed-point */    st->codec.width = get_be32(pb) >> 16; /* track width */    st->codec.height = get_be32(pb) >> 16; /* track height */    return 0;}/* this atom should be null (from specs), but some buggy files put the 'moov' atom inside it... *//* like the files created with Adobe Premiere 5.0, for samples see *//* http://graphics.tudelft.nl/~wouter/publications/soundtests/ */static int mov_read_wide(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom){    int err;#ifdef DEBUG    print_atom("wide", atom);    debug_indent++;#endif    if (atom.size < 8)        return 0; /* continue */    if (get_be32(pb) != 0) { /* 0 sized mdat atom... use the 'wide' atom size */        url_fskip(pb, atom.size - 4);        return 0;    }    atom.type = get_le32(pb);    atom.offset += 8;    atom.size -= 8;    if (atom.type != MKTAG('m', 'd', 'a', 't')) {        url_fskip(pb, atom.size);        return 0;    }    err = mov_read_mdat(c, pb, atom);#ifdef DEBUG    debug_indent--;#endif    return err;}#ifdef CONFIG_ZLIBstatic int null_read_packet(void *opaque, uint8_t *buf, int buf_size){    return -1;}static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom){    ByteIOContext ctx;    uint8_t *cmov_data;    uint8_t *moov_data; /* uncompressed data */    long cmov_len, moov_len;    int ret;    print_atom("cmov", atom);    get_be32(pb); /* dcom atom */    if (get_le32(pb) != MKTAG( 'd', 'c', 'o', 'm' ))        return -1;    if (get_le32(pb) != MKTAG( 'z', 'l', 'i', 'b' )) {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产婷婷色一区二区三区在线| 欧美高清在线一区| 国产偷v国产偷v亚洲高清| 一区av在线播放| 国产精品1024| 日韩欧美专区在线| 一区二区三区欧美久久| 成人免费毛片a| www久久久久| 蜜桃久久久久久久| 欧美精品日韩一区| 亚洲人成在线播放网站岛国| 国产精品911| 久久影院电视剧免费观看| 天堂av在线一区| 欧美亚洲国产bt| 夜色激情一区二区| 色综合色狠狠综合色| 国产精品婷婷午夜在线观看| 国产精品一区免费在线观看| 日韩午夜激情av| 日本不卡高清视频| 日韩欧美在线不卡| 青娱乐精品视频在线| 91精品国产欧美一区二区| 亚洲成av人片在线| 欧美日韩色一区| 亚洲成av人在线观看| 欧美日产在线观看| 日韩一区精品字幕| 欧美一级在线免费| 麻豆91在线播放免费| 精品国产区一区| 国产一区 二区| 日本一二三不卡| 不卡的av网站| 一片黄亚洲嫩模| 欧美老女人第四色| 久久99精品久久久久婷婷| 精品久久人人做人人爽| 精品在线亚洲视频| 欧美国产日韩精品免费观看| 99视频精品在线| 亚洲网友自拍偷拍| 91精品国产全国免费观看| 国产在线精品免费| 国产精品毛片高清在线完整版| 99精品一区二区三区| 亚洲黄色小说网站| 91精品国产综合久久久久久| 久久er99精品| 中文字幕国产精品一区二区| 91免费版在线| 日韩国产精品91| 国产亚洲一二三区| 欧美伊人精品成人久久综合97| 日本成人中文字幕| 中文字幕久久午夜不卡| 欧美精品tushy高清| 国产精选一区二区三区| 亚洲婷婷综合久久一本伊一区| 欧美私人免费视频| 极品瑜伽女神91| 中文字幕亚洲视频| 欧美精品第一页| 粉嫩高潮美女一区二区三区| 一区二区成人在线视频| 精品国产一二三| 在线亚洲高清视频| 激情久久五月天| 一区二区三国产精华液| 亚洲精品在线三区| 欧美少妇性性性| 懂色av一区二区三区蜜臀 | 亚洲女人小视频在线观看| 欧美欧美欧美欧美首页| 国产综合久久久久影院| 艳妇臀荡乳欲伦亚洲一区| 精品久久久久久久久久久久久久久 | 亚洲一区自拍偷拍| 国产日韩欧美精品一区| 欧美日韩性生活| 白白色亚洲国产精品| 麻豆国产欧美日韩综合精品二区| 日韩伦理电影网| 久久美女高清视频| 欧美一区二区三区在| 色综合天天综合| 国产91精品在线观看| 日韩经典一区二区| 亚洲在线观看免费| 国产精品每日更新在线播放网址| 精品成人一区二区| 日韩一区二区免费在线电影| 91成人在线精品| 9l国产精品久久久久麻豆| 国产综合色在线| 精品一区二区久久久| 午夜不卡av在线| 亚洲一二三四在线| 亚洲激情一二三区| 日韩一区在线播放| 18成人在线观看| 亚洲色图视频网站| 国产精品久久久久久亚洲毛片| 久久久亚洲精品石原莉奈| 日韩一区二区电影在线| 欧美一级久久久久久久大片| 欧美久久久久久久久| 欧美日韩亚洲综合一区二区三区| 一本久久a久久精品亚洲| 97精品电影院| 色天使色偷偷av一区二区| 成人app网站| 91原创在线视频| 在线一区二区视频| 欧美日韩免费一区二区三区视频| 日本道色综合久久| 欧美做爰猛烈大尺度电影无法无天| 一道本成人在线| 欧美日韩久久久| 日韩一级片在线观看| 337p粉嫩大胆噜噜噜噜噜91av| 欧美一区二区免费视频| 日韩精品一区在线观看| 欧美精品一区二区三区蜜桃视频| 欧美va在线播放| 精品国产成人系列| 久久久精品黄色| 中文字幕一区二区不卡| 亚洲一区影音先锋| 五月婷婷久久丁香| 精品一区二区在线观看| 岛国精品在线播放| 日本高清不卡视频| 欧美成人乱码一区二区三区| 26uuu国产一区二区三区| 国产午夜精品福利| 亚洲精品乱码久久久久久久久| 婷婷开心激情综合| 国产剧情在线观看一区二区| 色综合天天综合色综合av| 欧美日韩国产色站一区二区三区| 日韩视频免费观看高清完整版在线观看| 欧美tickle裸体挠脚心vk| 国产精品日日摸夜夜摸av| 一个色综合av| 国产精品一区二区在线观看网站 | 亚洲天堂福利av| 五月婷婷激情综合| 国产精品99久久不卡二区| 欧美亚洲自拍偷拍| 久久亚洲精华国产精华液| 一区二区三区日韩在线观看| 蜜桃视频一区二区| 欧美在线免费播放| 国产网红主播福利一区二区| 夜夜揉揉日日人人青青一国产精品| 久久精工是国产品牌吗| 91丝袜国产在线播放| 亚洲精品一区在线观看| 亚洲免费在线视频一区 二区| 美女在线视频一区| av不卡一区二区三区| ww亚洲ww在线观看国产| 视频一区免费在线观看| 99久久99久久免费精品蜜臀| 精品福利一区二区三区| 一区二区欧美精品| 成人精品在线视频观看| 精品久久久久久久久久久院品网| 一区二区三区中文字幕在线观看| 国产呦萝稀缺另类资源| 欧美日韩成人综合在线一区二区| 国产精品色哟哟| 极品尤物av久久免费看| 91精品国产福利| 亚洲国产一区二区a毛片| 成人激情电影免费在线观看| 日韩一区二区在线观看视频| 亚洲最色的网站| 91麻豆精品在线观看| 国产精品亲子伦对白| 国产综合一区二区| 精品99一区二区三区| 美女视频一区二区| 日韩亚洲欧美中文三级| 亚洲成人激情自拍| 欧美性生交片4| 亚洲精品第1页| 91亚洲永久精品| 国产精品欧美经典| 成人sese在线| 国产精品久久久久久久久免费丝袜| 国内精品视频一区二区三区八戒| 欧美一级在线视频| 激情文学综合插| 久久午夜老司机| 国产亚洲一二三区| 国产电影一区在线|