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

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

?? h263.c.svn-base

?? ffmpeg最新源碼
?? SVN-BASE
?? 第 1 頁 / 共 5 頁
字號:
/* * H263/MPEG4 backend for ffmpeg encoder and decoder * Copyright (c) 2000,2001 Fabrice Bellard. * H263+ support. * Copyright (c) 2001 Juan J. Sierralta P. * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> * * ac prediction encoding, B-frame support, error resilience, optimizations, * qpel decoding, gmc decoding, interlaced decoding * by Michael Niedermayer <michaelni@gmx.at> * * This file is part of FFmpeg. * * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *//** * @file h263.c * h263/mpeg4 codec. *///#define DEBUG#include <limits.h>#include "dsputil.h"#include "avcodec.h"#include "mpegvideo.h"#include "h263data.h"#include "mpeg4data.h"//#undef NDEBUG//#include <assert.h>#define INTRA_MCBPC_VLC_BITS 6#define INTER_MCBPC_VLC_BITS 7#define CBPY_VLC_BITS 6#define MV_VLC_BITS 9#define DC_VLC_BITS 9#define SPRITE_TRAJ_VLC_BITS 6#define MB_TYPE_B_VLC_BITS 4#define TEX_VLC_BITS 9#define H263_MBTYPE_B_VLC_BITS 6#define CBPC_B_VLC_BITS 3#ifdef CONFIG_ENCODERSstatic void h263_encode_block(MpegEncContext * s, DCTELEM * block,                              int n);static void h263p_encode_umotion(MpegEncContext * s, int val);static inline void mpeg4_encode_block(MpegEncContext * s, DCTELEM * block,                               int n, int dc, uint8_t *scan_table,                               PutBitContext *dc_pb, PutBitContext *ac_pb);static int mpeg4_get_block_length(MpegEncContext * s, DCTELEM * block, int n, int intra_dc,                                  uint8_t *scan_table);#endifstatic int h263_decode_motion(MpegEncContext * s, int pred, int fcode);static int h263p_decode_umotion(MpegEncContext * s, int pred);static int h263_decode_block(MpegEncContext * s, DCTELEM * block,                             int n, int coded);static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr);static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,                              int n, int coded, int intra, int rvlc);#ifdef CONFIG_ENCODERSstatic int h263_pred_dc(MpegEncContext * s, int n, int16_t **dc_val_ptr);static void mpeg4_encode_visual_object_header(MpegEncContext * s);static void mpeg4_encode_vol_header(MpegEncContext * s, int vo_number, int vol_number);#endif //CONFIG_ENCODERSstatic void mpeg4_decode_sprite_trajectory(MpegEncContext * s, GetBitContext *gb);static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, int level, int *dir_ptr, int encoding);#ifdef CONFIG_ENCODERSstatic uint8_t uni_DCtab_lum_len[512];static uint8_t uni_DCtab_chrom_len[512];static uint16_t uni_DCtab_lum_bits[512];static uint16_t uni_DCtab_chrom_bits[512];static uint8_t mv_penalty[MAX_FCODE+1][MAX_MV*2+1];static uint8_t fcode_tab[MAX_MV*2+1];static uint8_t umv_fcode_tab[MAX_MV*2+1];static uint32_t uni_mpeg4_intra_rl_bits[64*64*2*2];static uint8_t  uni_mpeg4_intra_rl_len [64*64*2*2];static uint32_t uni_mpeg4_inter_rl_bits[64*64*2*2];static uint8_t  uni_mpeg4_inter_rl_len [64*64*2*2];static uint8_t  uni_h263_intra_aic_rl_len [64*64*2*2];static uint8_t  uni_h263_inter_rl_len [64*64*2*2];//#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128 + (run)*256 + (level))//#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run) + (level)*64)#define UNI_MPEG4_ENC_INDEX(last,run,level) ((last)*128*64 + (run)*128 + (level))/* mpeg4intermax level: 24/6max run: 53/63intramax level: 53/16max run: 29/41*/#endifstatic uint8_t static_rl_table_store[5][2][2*MAX_RUN + MAX_LEVEL + 3];#if 0 //3IV1 is quite rare and it slows things down a tiny bit#define IS_3IV1 s->codec_tag == ff_get_fourcc("3IV1")#else#define IS_3IV1 0#endifint h263_get_picture_format(int width, int height){    int format;    if (width == 128 && height == 96)        format = 1;    else if (width == 176 && height == 144)        format = 2;    else if (width == 352 && height == 288)        format = 3;    else if (width == 704 && height == 576)        format = 4;    else if (width == 1408 && height == 1152)        format = 5;    else        format = 7;    return format;}static void show_pict_info(MpegEncContext *s){    av_log(s->avctx, AV_LOG_DEBUG, "qp:%d %c size:%d rnd:%d%s%s%s%s%s%s%s%s%s %d/%d\n",         s->qscale, av_get_pict_type_char(s->pict_type),         s->gb.size_in_bits, 1-s->no_rounding,         s->obmc ? " AP" : "",         s->umvplus ? " UMV" : "",         s->h263_long_vectors ? " LONG" : "",         s->h263_plus ? " +" : "",         s->h263_aic ? " AIC" : "",         s->alt_inter_vlc ? " AIV" : "",         s->modified_quant ? " MQ" : "",         s->loop_filter ? " LOOP" : "",         s->h263_slice_structured ? " SS" : "",         s->avctx->time_base.den, s->avctx->time_base.num    );}#ifdef CONFIG_ENCODERSstatic void aspect_to_info(MpegEncContext * s, AVRational aspect){    int i;    if(aspect.num==0) aspect= (AVRational){1,1};    for(i=1; i<6; i++){        if(av_cmp_q(pixel_aspect[i], aspect) == 0){            s->aspect_ratio_info=i;            return;        }    }    s->aspect_ratio_info= FF_ASPECT_EXTENDED;}void ff_flv_encode_picture_header(MpegEncContext * s, int picture_number){      int format;      align_put_bits(&s->pb);      put_bits(&s->pb, 17, 1);      put_bits(&s->pb, 5, (s->h263_flv-1)); /* 0: h263 escape codes 1: 11-bit escape codes */      put_bits(&s->pb, 8, (((int64_t)s->picture_number * 30 * s->avctx->time_base.num) / //FIXME use timestamp                           s->avctx->time_base.den) & 0xff); /* TemporalReference */      if (s->width == 352 && s->height == 288)        format = 2;      else if (s->width == 176 && s->height == 144)        format = 3;      else if (s->width == 128 && s->height == 96)        format = 4;      else if (s->width == 320 && s->height == 240)        format = 5;      else if (s->width == 160 && s->height == 120)        format = 6;      else if (s->width <= 255 && s->height <= 255)        format = 0; /* use 1 byte width & height */      else        format = 1; /* use 2 bytes width & height */      put_bits(&s->pb, 3, format); /* PictureSize */      if (format == 0) {        put_bits(&s->pb, 8, s->width);        put_bits(&s->pb, 8, s->height);      } else if (format == 1) {        put_bits(&s->pb, 16, s->width);        put_bits(&s->pb, 16, s->height);      }      put_bits(&s->pb, 2, s->pict_type == FF_P_TYPE); /* PictureType */      put_bits(&s->pb, 1, 1); /* DeblockingFlag: on */      put_bits(&s->pb, 5, s->qscale); /* Quantizer */      put_bits(&s->pb, 1, 0); /* ExtraInformation */      if(s->h263_aic){        s->y_dc_scale_table=          s->c_dc_scale_table= ff_aic_dc_scale_table;      }else{        s->y_dc_scale_table=          s->c_dc_scale_table= ff_mpeg1_dc_scale_table;      }}void h263_encode_picture_header(MpegEncContext * s, int picture_number){    int format, coded_frame_rate, coded_frame_rate_base, i, temp_ref;    int best_clock_code=1;    int best_divisor=60;    int best_error= INT_MAX;    if(s->h263_plus){        for(i=0; i<2; i++){            int div, error;            div= (s->avctx->time_base.num*1800000LL + 500LL*s->avctx->time_base.den) / ((1000LL+i)*s->avctx->time_base.den);            div= av_clip(div, 1, 127);            error= FFABS(s->avctx->time_base.num*1800000LL - (1000LL+i)*s->avctx->time_base.den*div);            if(error < best_error){                best_error= error;                best_divisor= div;                best_clock_code= i;            }        }    }    s->custom_pcf= best_clock_code!=1 || best_divisor!=60;    coded_frame_rate= 1800000;    coded_frame_rate_base= (1000+best_clock_code)*best_divisor;    align_put_bits(&s->pb);    /* Update the pointer to last GOB */    s->ptr_lastgob = pbBufPtr(&s->pb);    put_bits(&s->pb, 22, 0x20); /* PSC */    temp_ref= s->picture_number * (int64_t)coded_frame_rate * s->avctx->time_base.num / //FIXME use timestamp                         (coded_frame_rate_base * (int64_t)s->avctx->time_base.den);    put_bits(&s->pb, 8, temp_ref & 0xff); /* TemporalReference */    put_bits(&s->pb, 1, 1);     /* marker */    put_bits(&s->pb, 1, 0);     /* h263 id */    put_bits(&s->pb, 1, 0);     /* split screen off */    put_bits(&s->pb, 1, 0);     /* camera  off */    put_bits(&s->pb, 1, 0);     /* freeze picture release off */    format = h263_get_picture_format(s->width, s->height);    if (!s->h263_plus) {        /* H.263v1 */        put_bits(&s->pb, 3, format);        put_bits(&s->pb, 1, (s->pict_type == FF_P_TYPE));        /* By now UMV IS DISABLED ON H.263v1, since the restrictions        of H.263v1 UMV implies to check the predicted MV after        calculation of the current MB to see if we're on the limits */        put_bits(&s->pb, 1, 0);         /* Unrestricted Motion Vector: off */        put_bits(&s->pb, 1, 0);         /* SAC: off */        put_bits(&s->pb, 1, s->obmc);   /* Advanced Prediction */        put_bits(&s->pb, 1, 0);         /* only I/P frames, no PB frame */        put_bits(&s->pb, 5, s->qscale);        put_bits(&s->pb, 1, 0);         /* Continuous Presence Multipoint mode: off */    } else {        int ufep=1;        /* H.263v2 */        /* H.263 Plus PTYPE */        put_bits(&s->pb, 3, 7);        put_bits(&s->pb,3,ufep); /* Update Full Extended PTYPE */        if (format == 7)            put_bits(&s->pb,3,6); /* Custom Source Format */        else            put_bits(&s->pb, 3, format);        put_bits(&s->pb,1, s->custom_pcf);        put_bits(&s->pb,1, s->umvplus); /* Unrestricted Motion Vector */        put_bits(&s->pb,1,0); /* SAC: off */        put_bits(&s->pb,1,s->obmc); /* Advanced Prediction Mode */        put_bits(&s->pb,1,s->h263_aic); /* Advanced Intra Coding */        put_bits(&s->pb,1,s->loop_filter); /* Deblocking Filter */        put_bits(&s->pb,1,s->h263_slice_structured); /* Slice Structured */        put_bits(&s->pb,1,0); /* Reference Picture Selection: off */        put_bits(&s->pb,1,0); /* Independent Segment Decoding: off */        put_bits(&s->pb,1,s->alt_inter_vlc); /* Alternative Inter VLC */        put_bits(&s->pb,1,s->modified_quant); /* Modified Quantization: */        put_bits(&s->pb,1,1); /* "1" to prevent start code emulation */        put_bits(&s->pb,3,0); /* Reserved */        put_bits(&s->pb, 3, s->pict_type == FF_P_TYPE);        put_bits(&s->pb,1,0); /* Reference Picture Resampling: off */        put_bits(&s->pb,1,0); /* Reduced-Resolution Update: off */        put_bits(&s->pb,1,s->no_rounding); /* Rounding Type */        put_bits(&s->pb,2,0); /* Reserved */        put_bits(&s->pb,1,1); /* "1" to prevent start code emulation */        /* This should be here if PLUSPTYPE */        put_bits(&s->pb, 1, 0); /* Continuous Presence Multipoint mode: off */                if (format == 7) {            /* Custom Picture Format (CPFMT) */            aspect_to_info(s, s->avctx->sample_aspect_ratio);            put_bits(&s->pb,4,s->aspect_ratio_info);            put_bits(&s->pb,9,(s->width >> 2) - 1);            put_bits(&s->pb,1,1); /* "1" to prevent start code emulation */            put_bits(&s->pb,9,(s->height >> 2));            if (s->aspect_ratio_info == FF_ASPECT_EXTENDED){                put_bits(&s->pb, 8, s->avctx->sample_aspect_ratio.num);                put_bits(&s->pb, 8, s->avctx->sample_aspect_ratio.den);            }        }        if(s->custom_pcf){            if(ufep){                put_bits(&s->pb, 1, best_clock_code);                put_bits(&s->pb, 7, best_divisor);            }            put_bits(&s->pb, 2, (temp_ref>>8)&3);        }        /* Unlimited Unrestricted Motion Vectors Indicator (UUI) */        if (s->umvplus)//            put_bits(&s->pb,1,1); /* Limited according tables of Annex D *///FIXME check actual requested range            put_bits(&s->pb,2,1); /* unlimited */        if(s->h263_slice_structured)            put_bits(&s->pb,2,0); /* no weird submodes */        put_bits(&s->pb, 5, s->qscale);    }    put_bits(&s->pb, 1, 0);     /* no PEI */    if(s->h263_slice_structured){        put_bits(&s->pb, 1, 1);        assert(s->mb_x == 0 && s->mb_y == 0);        ff_h263_encode_mba(s);        put_bits(&s->pb, 1, 1);    }    if(s->h263_aic){         s->y_dc_scale_table=         s->c_dc_scale_table= ff_aic_dc_scale_table;    }else{        s->y_dc_scale_table=        s->c_dc_scale_table= ff_mpeg1_dc_scale_table;    }}/** * Encodes a group of blocks header. */void h263_encode_gob_header(MpegEncContext * s, int mb_line){    put_bits(&s->pb, 17, 1); /* GBSC */    if(s->h263_slice_structured){        put_bits(&s->pb, 1, 1);        ff_h263_encode_mba(s);        if(s->mb_num > 1583)            put_bits(&s->pb, 1, 1);        put_bits(&s->pb, 5, s->qscale); /* GQUANT */        put_bits(&s->pb, 1, 1);        put_bits(&s->pb, 2, s->pict_type == FF_I_TYPE); /* GFID */    }else{        int gob_number= mb_line / s->gob_index;        put_bits(&s->pb, 5, gob_number); /* GN */        put_bits(&s->pb, 2, s->pict_type == FF_I_TYPE); /* GFID */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美高清激情brazzers| 色先锋久久av资源部| 亚洲福利视频三区| ●精品国产综合乱码久久久久| 久久伊人中文字幕| 久久精品一区二区三区四区| 精品黑人一区二区三区久久| 精品少妇一区二区三区| 精品国产一区二区国模嫣然| 久久久久高清精品| 久久久久久久久伊人| 国产日本一区二区| 亚洲日本青草视频在线怡红院 | 欧美性大战久久久| 91黄色激情网站| 91麻豆精品国产91久久久| 欧美精品日韩一本| 欧美mv日韩mv| 国产精品久久久久久久久快鸭| 亚洲色图在线视频| 日韩专区欧美专区| 国产一区二区三区香蕉| 91在线播放网址| 5月丁香婷婷综合| 欧美精品一区二区三区久久久| 欧美激情一区二区三区在线| 一区二区三区在线影院| 日本不卡的三区四区五区| 国产激情视频一区二区三区欧美 | 亚洲欧美激情在线| 亚洲国产欧美一区二区三区丁香婷| 日韩高清国产一区在线| 国产精品资源在线| 91福利国产成人精品照片| 精品国产露脸精彩对白| 亚洲视频每日更新| 国产在线视频精品一区| 色婷婷综合久久久中文一区二区| 欧美日本韩国一区| 国产精品免费av| 免费在线观看一区| 91免费视频网址| 欧美tk丨vk视频| 亚洲一级二级在线| 国产一区 二区| 宅男在线国产精品| 综合分类小说区另类春色亚洲小说欧美| 亚洲成人午夜影院| av激情成人网| 久久免费视频色| 天天操天天干天天综合网| 国产一区二区电影| 日韩精品一区二区在线观看| 一区二区在线观看不卡| 国产九九视频一区二区三区| 欧洲人成人精品| 亚洲欧美在线视频观看| 国产一区二区视频在线| 日韩一二三区不卡| 亚洲一区国产视频| 93久久精品日日躁夜夜躁欧美| 精品精品国产高清一毛片一天堂| 亚瑟在线精品视频| 91美女片黄在线| 国产精品久久久久久久久动漫| 精品综合免费视频观看| 欧美精品三级日韩久久| 亚洲成人免费在线观看| 在线观看日韩一区| 亚洲精品国久久99热| 91免费在线看| 亚洲激情av在线| 91成人免费网站| 亚洲欧美另类综合偷拍| 一本大道久久a久久精二百| 国产精品福利电影一区二区三区四区| 国产一区在线观看视频| 精品va天堂亚洲国产| 精品无人区卡一卡二卡三乱码免费卡 | 国产91色综合久久免费分享| 精品免费视频一区二区| 国产在线精品一区二区夜色 | 成年人午夜久久久| 国产精品国产精品国产专区不片 | 亚洲国产毛片aaaaa无费看| 欧美三级韩国三级日本三斤| 亚洲国产综合视频在线观看| 在线成人av网站| 九一久久久久久| 国产欧美久久久精品影院| 成人影视亚洲图片在线| 亚洲黄色av一区| 欧美猛男gaygay网站| 六月丁香综合在线视频| 久久久99免费| 91美女片黄在线观看91美女| 日韩电影免费在线观看网站| 久久久久九九视频| 91精彩视频在线| 久久精品二区亚洲w码| 国产女人18毛片水真多成人如厕 | 亚洲成年人影院| 欧美一级爆毛片| 北条麻妃国产九九精品视频| 一区二区三国产精华液| 日韩美女视频在线| 色香色香欲天天天影视综合网| 午夜精品一区在线观看| 久久精品欧美一区二区三区不卡 | 日韩美一区二区三区| 国产91精品一区二区麻豆网站| 国产精品久久久一本精品| 欧美在线制服丝袜| 国产一区二区三区综合| 亚洲国产婷婷综合在线精品| 久久久99免费| 欧美精品tushy高清| 成人免费看的视频| 日本视频免费一区| 亚洲欧美乱综合| 久久久久国产免费免费| 欧美美女激情18p| 成人av中文字幕| 奇米色一区二区三区四区| 中文字幕成人av| 欧美一区二区观看视频| 91丨porny丨国产| 狠狠狠色丁香婷婷综合激情 | 精品一区二区三区免费视频| 亚洲乱码精品一二三四区日韩在线| 欧美精品v国产精品v日韩精品| eeuss鲁片一区二区三区在线看| 理论片日本一区| 日韩国产精品久久久久久亚洲| 亚洲日本成人在线观看| 久久久久久免费毛片精品| 日韩欧美一区二区视频| 欧美精品乱人伦久久久久久| 一本久道久久综合中文字幕| 成人免费观看视频| 国产suv精品一区二区三区| 精品亚洲成a人| 麻豆成人av在线| 欧美aaaaa成人免费观看视频| 亚洲午夜久久久久久久久电影院| 国产精品国产三级国产三级人妇| 久久夜色精品国产欧美乱极品| 欧美一级日韩不卡播放免费| 欧美日韩精品高清| 欧美日韩一级二级| 欧美久久婷婷综合色| 在线观看日韩高清av| 欧美日韩在线播放一区| 欧美影视一区二区三区| 欧美日韩性生活| 欧美一区二区三区日韩视频| 69av一区二区三区| 欧美一级视频精品观看| 日韩免费在线观看| 久久理论电影网| 国产精品国产三级国产a| 亚洲欧美怡红院| 亚洲制服丝袜在线| 天堂av在线一区| 久久精品国产精品亚洲红杏| 国产精品一区二区在线观看不卡| 国产乱国产乱300精品| a级精品国产片在线观看| 色综合久久88色综合天天6 | 亚洲国产高清aⅴ视频| 国产精品九色蝌蚪自拍| 一区二区三区在线观看国产| 视频一区在线视频| 国产一区二区三区综合| 91视频国产资源| 欧美欧美欧美欧美| www精品美女久久久tv| 中文字幕中文字幕在线一区| 有码一区二区三区| 奇米色一区二区| 成人精品免费网站| 欧美日韩中文一区| 26uuuu精品一区二区| 亚洲精选免费视频| 麻豆久久一区二区| 91蝌蚪porny成人天涯| 91精品国产麻豆| 中文字幕av一区 二区| 亚洲国产视频在线| 岛国精品在线播放| 91精品国产综合久久小美女 | 成人激情图片网| 欧美日韩极品在线观看一区| 久久免费看少妇高潮| 亚洲第一搞黄网站| 成人天堂资源www在线| 欧美一级一区二区| 一区二区三区国产精华| 国产精品自拍一区| 欧美一级欧美一级在线播放|