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

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

?? dv.c

?? F:圖像處理資料264264書籍ffmpeg-0.4.9-pre1VideoStream.rar 一個視頻解壓縮源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
/*  * General DV muxer/demuxer  * Copyright (c) 2003 Roman Shaposhnick * * Many thanks to Dan Dennedy <dan@dennedy.org> for providing wealth * of DV technical info. * * Raw DV format * Copyright (c) 2002 Fabrice Bellard. * * This library 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 of the License, or (at your option) any later version. * * This library 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 this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#include <time.h>#include "avformat.h"#include "dvdata.h"#include "dv.h"struct DVDemuxContext {    AVFormatContext* fctx;    AVStream*        vst;    AVStream*        ast[2];           AVPacket         audio_pkt[2];    int              ach;    int              frames;    uint64_t         abytes;};struct DVMuxContext {    const DVprofile*  sys;    /* Current DV profile. E.g.: 525/60, 625/50 */    uint8_t     frame_buf[144000]; /* frame under contruction */    FifoBuffer  audio_data;   /* Fifo for storing excessive amounts of PCM */    int         frames;       /* Number of a current frame */    time_t      start_time;   /* Start time of recording */    uint8_t     aspect;       /* Aspect ID 0 - 4:3, 7 - 16:9 */    int         has_audio;    /* frame under contruction has audio */    int         has_video;    /* frame under contruction has video */};enum dv_section_type {     dv_sect_header  = 0x1f,     dv_sect_subcode = 0x3f,     dv_sect_vaux    = 0x56,     dv_sect_audio   = 0x76,     dv_sect_video   = 0x96,};enum dv_pack_type {     dv_header525     = 0x3f, /* see dv_write_pack for important details on */      dv_header625     = 0xbf, /* these two packs */     dv_timecode      = 0x13,     dv_audio_source  = 0x50,     dv_audio_control = 0x51,     dv_audio_recdate = 0x52,     dv_audio_rectime = 0x53,     dv_video_source  = 0x60,     dv_video_control = 0x61,     dv_viedo_recdate = 0x62,     dv_video_rectime = 0x63,     dv_unknown_pack  = 0xff,};/* * The reason why the following three big ugly looking tables are * here is my lack of DV spec IEC 61834. The tables were basically  * constructed to make code that places packs in SSYB, VAUX and  * AAUX blocks very simple and table-driven. They conform to the * SMPTE 314M and the output of my personal DV camcorder, neither * of which is sufficient for a reliable DV stream producing. Thus * while code is still in development I'll be gathering input from * people with different DV equipment and modifying the tables to * accommodate all the quirks. Later on, if possible, some of them * will be folded into smaller tables and/or switch-if logic. For  * now, my only excuse is -- they don't eat up that much of a space. */static const int dv_ssyb_packs_dist[12][6] = {    { 0x13, 0x13, 0x13, 0x13, 0x13, 0x13 },    { 0x13, 0x13, 0x13, 0x13, 0x13, 0x13 },    { 0x13, 0x13, 0x13, 0x13, 0x13, 0x13 },    { 0x13, 0x13, 0x13, 0x13, 0x13, 0x13 },    { 0x13, 0x13, 0x13, 0x13, 0x13, 0x13 },    { 0x13, 0x13, 0x13, 0x13, 0x13, 0x13 },    { 0x13, 0x62, 0x63, 0x13, 0x62, 0x63 },    { 0x13, 0x62, 0x63, 0x13, 0x62, 0x63 },    { 0x13, 0x62, 0x63, 0x13, 0x62, 0x63 },    { 0x13, 0x62, 0x63, 0x13, 0x62, 0x63 },    { 0x13, 0x62, 0x63, 0x13, 0x62, 0x63 },    { 0x13, 0x62, 0x63, 0x13, 0x62, 0x63 },};static const int dv_vaux_packs_dist[12][15] = {    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },    { 0x60, 0x61, 0x62, 0x63, 0xff, 0xff, 0xff, 0xff, 0xff,       0x60, 0x61, 0x62, 0x63, 0xff, 0xff },};static const int dv_aaux_packs_dist[12][9] = {    { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },    { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },    { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },    { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },    { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },    { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },    { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },    { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },    { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },    { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },    { 0xff, 0xff, 0xff, 0x50, 0x51, 0x52, 0x53, 0xff, 0xff },    { 0x50, 0x51, 0x52, 0x53, 0xff, 0xff, 0xff, 0xff, 0xff },};static inline uint16_t dv_audio_12to16(uint16_t sample){    uint16_t shift, result;        sample = (sample < 0x800) ? sample : sample | 0xf000;    shift = (sample & 0xf00) >> 8;    if (shift < 0x2 || shift > 0xd) {	result = sample;    } else if (shift < 0x8) {        shift--;	result = (sample - (256 * shift)) << shift;    } else {	shift = 0xe - shift;	result = ((sample + ((256 * shift) + 1)) << shift) - 1;    }    return result;}static int dv_audio_frame_size(const DVprofile* sys, int frame){    return sys->audio_samples_dist[frame % (sizeof(sys->audio_samples_dist)/		                            sizeof(sys->audio_samples_dist[0]))];}static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* buf){    struct tm tc;    time_t ct;    int ltc_frame;    buf[0] = (uint8_t)pack_id;    switch (pack_id) {    case dv_header525: /* I can't imagine why these two weren't defined as real */    case dv_header625: /* packs in SMPTE314M -- they definitely look like ones */          buf[1] = 0xf8 |               /* reserved -- always 1 */	           (0 & 0x07);          /* APT: Track application ID */          buf[2] = (0 << 7)    | /* TF1: audio data is 0 - valid; 1 - invalid */	           (0x0f << 3) | /* reserved -- always 1 */		   (0 & 0x07);   /* AP1: Audio application ID */          buf[3] = (0 << 7)    | /* TF2: video data is 0 - valid; 1 - invalid */  	           (0x0f << 3) | /* reserved -- always 1 */		   (0 & 0x07);   /* AP2: Video application ID */          buf[4] = (0 << 7)    | /* TF3: subcode(SSYB) is 0 - valid; 1 - invalid */ 	           (0x0f << 3) | /* reserved -- always 1 */		   (0 & 0x07);   /* AP3: Subcode application ID */	  break;    case dv_timecode:          ct = (time_t)(c->frames / ((float)c->sys->frame_rate /                                      (float)c->sys->frame_rate_base));          localtime_r(&ct, &tc);          /*            * LTC drop-frame frame counter drops two frames (0 and 1) every            * minute, unless it is exactly divisible by 10           */          ltc_frame = (c->frames + 2*ct/60 - 2*ct/600) % c->sys->ltc_divisor;	  buf[1] = (0 << 7) | /* Color fame: 0 - unsync; 1 - sync mode */		   (1 << 6) | /* Drop frame timecode: 0 - nondrop; 1 - drop */		   ((ltc_frame / 10) << 4) | /* Tens of frames */		   (ltc_frame % 10);         /* Units of frames */	  buf[2] = (1 << 7) | /* Biphase mark polarity correction: 0 - even; 1 - odd */		   ((tc.tm_sec / 10) << 4) | /* Tens of seconds */		   (tc.tm_sec % 10);         /* Units of seconds */	  buf[3] = (1 << 7) | /* Binary group flag BGF0 */		   ((tc.tm_min / 10) << 4) | /* Tens of minutes */		   (tc.tm_min % 10);         /* Units of minutes */	  buf[4] = (1 << 7) | /* Binary group flag BGF2 */		   (1 << 6) | /* Binary group flag BGF1 */	           ((tc.tm_hour / 10) << 4) | /* Tens of hours */		   (tc.tm_hour % 10);         /* Units of hours */          break;    case dv_audio_source:  /* AAUX source pack */          buf[1] = (0 << 7) | /* locked mode       */                   (1 << 6) | /* reserved -- always 1 */	           (dv_audio_frame_size(c->sys, c->frames) -		    c->sys->audio_min_samples[0]);	                      /* # of samples      */          buf[2] = (0 << 7) | /* multi-stereo      */                   (0 << 5) | /* #of audio channels per block: 0 -- 1 channel */                   (0 << 4) | /* pair bit: 0 -- one pair of channels */	            0;        /* audio mode        */          buf[3] = (1 << 7) | /* res               */                   (1 << 6) | /* multi-language flag */	           (c->sys->dsf << 5) | /*  system: 60fields/50fields */	            0;        /* definition: 0 -- SD (525/625) */          buf[4] = (1 << 7) | /* emphasis: 1 -- off */                   (0 << 6) | /* emphasis time constant: 0 -- reserved */	           (0 << 3) | /* frequency: 0 -- 48Khz, 1 -- 44,1Khz, 2 -- 32Khz */                    0;        /* quantization: 0 -- 16bit linear, 1 -- 12bit nonlinear */			              break;    case dv_audio_control:          buf[1] = (0 << 6) | /* copy protection: 0 -- unrestricted */                   (1 << 4) | /* input source: 1 -- digital input */	           (3 << 2) | /* compression: 3 -- no information */	            0;        /* misc. info/SMPTE emphasis off */          buf[2] = (1 << 7) | /* recording start point: 1 -- no */                   (1 << 6) | /* recording end point: 1 -- no */	           (1 << 3) | /* recording mode: 1 -- original */	            7;                   buf[3] = (1 << 7) | /* direction: 1 -- forward */                    0x20;     /* speed */          buf[4] = (1 << 7) | /* reserved -- always 1 */                    0x7f;     /* genre category */	  break;    case dv_audio_recdate:    case dv_viedo_recdate:  /* VAUX recording date */          ct = c->start_time + (time_t)(c->frames / 	       ((float)c->sys->frame_rate / (float)c->sys->frame_rate_base));          localtime_r(&ct, &tc);	  buf[1] = 0xff; /* ds, tm, tens of time zone, units of time zone */	                 /* 0xff is very likely to be "unknown" */	  buf[2] = (3 << 6) | /* reserved -- always 1 */		   ((tc.tm_mday / 10) << 4) | /* Tens of day */		   (tc.tm_mday % 10);         /* Units of day */	  buf[3] = /* we set high 4 bits to 0, shouldn't we set them to week? */		   (tc.tm_mon % 10);         /* Units of month */	  buf[4] = (((tc.tm_year % 100) / 10) << 4) | /* Tens of year */		   (tc.tm_year % 10);                 /* Units of year */          break;    case dv_audio_rectime:  /* AAUX recording time */    case dv_video_rectime:  /* VAUX recording time */          ct = c->start_time + (time_t)(c->frames / 	       ((float)c->sys->frame_rate / (float)c->sys->frame_rate_base));          localtime_r(&ct, &tc);	  buf[1] = (3 << 6) | /* reserved -- always 1 */		   0x3f; /* tens of frame, units of frame: 0x3f - "unknown" ? */	  buf[2] = (1 << 7) | /* reserved -- always 1 */ 		   ((tc.tm_sec / 10) << 4) | /* Tens of seconds */		   (tc.tm_sec % 10);         /* Units of seconds */	  buf[3] = (1 << 7) | /* reserved -- always 1 */		   ((tc.tm_min / 10) << 4) | /* Tens of minutes */		   (tc.tm_min % 10);         /* Units of minutes */	  buf[4] = (3 << 6) | /* reserved -- always 1 */ 	           ((tc.tm_hour / 10) << 4) | /* Tens of hours */		   (tc.tm_hour % 10);         /* Units of hours */	  break;    case dv_video_source:	  buf[1] = 0xff; /* reserved -- always 1 */	  buf[2] = (1 << 7) | /* B/W: 0 - b/w, 1 - color */		   (1 << 6) | /* following CLF is valid - 0, invalid - 1 */		   (3 << 4) | /* CLF: color frames id (see ITU-R BT.470-4) */		   0xf; /* reserved -- always 1 */	  buf[3] = (3 << 6) | /* reserved -- always 1 */		   (c->sys->dsf << 5) | /*  system: 60fields/50fields */		   0; /* signal type video compression */	  buf[4] = 0xff; /* VISC: 0xff -- no information */          break;    case dv_video_control:	  buf[1] = (0 << 6) | /* Copy generation management (CGMS) 0 -- free */		   0x3f; /* reserved -- always 1 */	  buf[2] = 0xc8 | /* reserved -- always b11001xxx */		   c->aspect;	  buf[3] = (1 << 7) | /* Frame/field flag 1 -- frame, 0 -- field */		   (1 << 6) | /* First/second field flag 0 -- field 2, 1 -- field 1 */		   (1 << 5) | /* Frame change flag 0 -- same picture as before, 1 -- different */		   (1 << 4) | /* 1 - interlaced, 0 - noninterlaced */		   0xc; /* reserved -- always b1100 */	  buf[4] = 0xff; /* reserved -- always 1 */          break;    default:          buf[1] = buf[2] = buf[3] = buf[4] = 0xff;    }    return 5;}static inline int dv_write_dif_id(enum dv_section_type t, uint8_t seq_num,                                   uint8_t dif_num, uint8_t* buf){    buf[0] = (uint8_t)t;    /* Section type */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美α欧美αv大片| 久草精品在线观看| 欧美欧美午夜aⅴ在线观看| 日本色综合中文字幕| 色综合婷婷久久| 一区二区三区在线高清| 欧美一级欧美一级在线播放| 粉嫩一区二区三区在线看| 一级中文字幕一区二区| 日韩一级片在线观看| 在线观看国产一区二区| 懂色av一区二区三区蜜臀| 日韩一区二区三区观看| 亚洲摸摸操操av| 色综合天天综合狠狠| 日韩国产一二三区| 国产精品私人影院| 91在线观看下载| 麻豆成人在线观看| 亚洲私人影院在线观看| 日韩精品在线一区二区| 国产成人免费视频网站高清观看视频 | 久久国产麻豆精品| 国产精品麻豆久久久| 日韩欧美中文一区二区| 欧美日免费三级在线| 94色蜜桃网一区二区三区| 国产91色综合久久免费分享| 久久疯狂做爰流白浆xx| 日本中文一区二区三区| 亚洲国产综合人成综合网站| 91在线视频免费91| 五月天欧美精品| 国产精品成人一区二区三区夜夜夜| 欧洲精品视频在线观看| 麻豆成人av在线| 自拍偷自拍亚洲精品播放| 91蝌蚪porny九色| 视频一区欧美精品| 国产精品白丝在线| 日韩三级视频在线观看| 日本精品裸体写真集在线观看| 欧美国产在线观看| 欧美性猛交一区二区三区精品| 99九九99九九九视频精品| 99久久婷婷国产综合精品| 99综合电影在线视频| 91麻豆免费视频| 色婷婷av一区二区三区gif| 91福利视频久久久久| 欧美色视频在线观看| 欧美美女直播网站| 欧美一区二区精品在线| 精品久久国产97色综合| 久久久久久9999| 国产精品久久久久三级| 亚洲欧洲精品成人久久奇米网| 亚洲免费av观看| 天天色综合天天| 国产一区二区视频在线| 国产不卡在线一区| 在线视频欧美精品| 日韩欧美中文字幕公布| 中文字幕高清一区| 樱花草国产18久久久久| 强制捆绑调教一区二区| 91精品国产aⅴ一区二区| 日韩欧美国产一区在线观看| 国产日韩欧美综合在线| 亚洲美女屁股眼交| 美女脱光内衣内裤视频久久影院| 国产在线一区二区综合免费视频| 懂色中文一区二区在线播放| 色呦呦日韩精品| 日韩精品一区二区三区四区视频 | 亚洲一卡二卡三卡四卡五卡| 日本欧美一区二区| 国产成人福利片| 欧美无人高清视频在线观看| 精品成人一区二区| 亚洲天堂2014| 麻豆精品一区二区| 一本色道a无线码一区v| 日韩色视频在线观看| 国产精品少妇自拍| 日韩av中文在线观看| 波多野结衣中文字幕一区| 欧美一三区三区四区免费在线看 | 国产日韩精品一区二区三区在线| 国产精品久久久久一区二区三区共| 国产喂奶挤奶一区二区三区| 亚洲精品你懂的| 久久国产尿小便嘘嘘| 欧美午夜片在线看| 国产精品系列在线| 欧美日韩国产天堂| 精品视频色一区| 中文字幕乱码日本亚洲一区二区 | 亚洲一区二区在线免费看| 毛片不卡一区二区| 色久综合一二码| 中文字幕中文字幕一区二区| 国产精品乡下勾搭老头1| 另类小说色综合网站| 91国偷自产一区二区开放时间| 精品国产凹凸成av人导航| 欧美主播一区二区三区美女| av一二三不卡影片| 精品对白一区国产伦| 香蕉乱码成人久久天堂爱免费| 成人一级片网址| 亚洲精品一区二区三区蜜桃下载 | 久久99久久精品| 欧美视频中文字幕| 中文字幕一区二区不卡| 国模无码大尺度一区二区三区| 欧美亚洲动漫精品| 国产精品久久久久久久久图文区| 九色综合狠狠综合久久| 欧美高清一级片在线| 亚洲黄色小说网站| av毛片久久久久**hd| 久久久精品影视| 久久99精品网久久| 欧美va亚洲va| 奇米色一区二区三区四区| 欧美日韩国产精品成人| 亚洲综合视频在线| 欧美中文字幕一区二区三区 | 午夜视频一区二区| 在线视频一区二区三| 亚洲最大色网站| 欧美在线观看视频一区二区三区| 成人免费在线视频观看| 99久久99久久综合| 国产精品成人免费在线| 成人精品鲁一区一区二区| 亚洲国产精品精华液2区45| 国产欧美一区二区精品婷婷| 成人免费高清在线| 日韩av午夜在线观看| 欧美性色欧美a在线播放| 亚洲精品少妇30p| 日韩视频中午一区| 欧美午夜免费电影| 成人午夜免费av| 图片区小说区区亚洲影院| 中文字幕免费一区| 欧美v日韩v国产v| 欧美日韩国产综合一区二区| 免费xxxx性欧美18vr| 亚洲女子a中天字幕| 欧美激情一区二区三区全黄| 国产乱妇无码大片在线观看| 国产日韩欧美一区二区三区综合| 国产sm精品调教视频网站| 中文字幕一区二区三区色视频| 成人av中文字幕| 一区二区在线观看av| 91精品一区二区三区久久久久久| 蜜乳av一区二区| 国产亚洲一二三区| 99久久伊人久久99| 性感美女极品91精品| 欧美mv日韩mv亚洲| 成a人片国产精品| 日韩伦理av电影| 欧美精品第1页| 国产成人精品免费看| 亚洲婷婷国产精品电影人久久| 一本大道av伊人久久综合| 免费美女久久99| 国产精品乱码一区二区三区软件 | 国产黄人亚洲片| **网站欧美大片在线观看| 欧美日高清视频| 国产suv精品一区二区883| 亚洲成人综合视频| 欧美大片一区二区三区| 成人avav影音| 蜜桃av一区二区| 亚洲日穴在线视频| 精品国产区一区| 91麻豆免费视频| 国产一区二区调教| 亚洲小少妇裸体bbw| 国产亚洲一区字幕| 欧美精选午夜久久久乱码6080| 国产成人精品亚洲777人妖| 亚洲成人动漫av| 欧美国产在线观看| 日韩一区二区免费在线观看| 99精品视频在线观看| 国产主播一区二区三区| 亚洲国产精品久久久久婷婷884| 久久婷婷成人综合色| 欧美日韩不卡在线| 91毛片在线观看| 从欧美一区二区三区| 日本午夜精品视频在线观看|