亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
乱一区二区av| 精品久久五月天| 欧美成人乱码一区二区三区| 国产精品乱码人人做人人爱| 亚洲午夜影视影院在线观看| 国产二区国产一区在线观看| 欧美久久久久久蜜桃| 国产精品国产自产拍高清av| 奇米精品一区二区三区在线观看一| 成人va在线观看| 2020国产精品| 免费精品99久久国产综合精品| 色婷婷久久久综合中文字幕| 国产日韩欧美综合一区| 精品一区二区三区av| 欧美日韩高清不卡| 亚洲自拍偷拍网站| 色婷婷精品大在线视频 | 欧美一区二视频| 专区另类欧美日韩| 成人免费视频国产在线观看| 精品欧美一区二区三区精品久久| 亚洲一线二线三线久久久| 99re6这里只有精品视频在线观看| 精品国产髙清在线看国产毛片| 亚洲sss视频在线视频| 91麻豆高清视频| 中文字幕一区在线观看| 国产999精品久久久久久绿帽| 日韩欧美色综合| 日韩激情在线观看| 91精品国产综合久久精品app | 色天天综合色天天久久| 国产日韩欧美一区二区三区乱码 | 91免费观看国产| 亚洲欧洲国产日本综合| 99久久国产免费看| 国产精品家庭影院| 色综合久久综合网欧美综合网| 亚洲日本在线看| 在线欧美小视频| 天天av天天翘天天综合网| 欧美日韩一级视频| 日本不卡中文字幕| 欧美一区二区免费观在线| 视频一区免费在线观看| 欧美成人bangbros| 国产成人精品一区二| 国产精品成人网| 欧美午夜在线一二页| 奇米综合一区二区三区精品视频| 精品国产乱子伦一区| 国产69精品一区二区亚洲孕妇| 国产精品系列在线| 在线视频国内自拍亚洲视频| 日韩专区一卡二卡| 日韩精品中午字幕| 成人av在线资源| 五月激情丁香一区二区三区| 精品久久久久久久久久久久久久久| 国产91丝袜在线18| 一区二区三区四区五区视频在线观看| 日本二三区不卡| 激情综合网av| 亚洲人成在线播放网站岛国| 日韩一区二区影院| 波波电影院一区二区三区| 亚洲国产色一区| 久久老女人爱爱| 色视频一区二区| 精品一区二区在线看| 综合久久国产九一剧情麻豆| 欧美一区二区三区性视频| 成人免费看视频| 丝袜亚洲另类欧美| 国产精品美女久久福利网站| 欧美日韩在线观看一区二区| 国产裸体歌舞团一区二区| 亚洲精选视频在线| 精品粉嫩超白一线天av| 色老汉一区二区三区| 精品一区二区三区在线播放 | 91福利国产成人精品照片| 久久精品99久久久| 亚洲成人一二三| 日本一区二区久久| 亚洲精品一区二区三区香蕉| 欧美网站一区二区| 99re在线视频这里只有精品| 韩国欧美国产1区| 午夜av一区二区| 亚洲欧美日韩电影| 国产精品夫妻自拍| 久久久不卡影院| 精品国产1区2区3区| 欧美日韩一区二区三区在线看| 99久久夜色精品国产网站| 精品亚洲成a人在线观看| 午夜视黄欧洲亚洲| 亚洲精品免费电影| 亚洲丝袜自拍清纯另类| 国产亚洲1区2区3区| 欧美成人video| 日韩美女天天操| 欧美精选午夜久久久乱码6080| 在线视频观看一区| 色天天综合色天天久久| 91丨九色丨蝌蚪富婆spa| 成人av集中营| 成人激情av网| av中文字幕不卡| eeuss国产一区二区三区| av中文字幕亚洲| 91在线小视频| 日本精品一区二区三区高清 | 午夜不卡av免费| 日本不卡1234视频| 久久综合综合久久综合| 另类综合日韩欧美亚洲| 狠狠色丁香婷综合久久| 激情综合网激情| 国产a精品视频| jlzzjlzz亚洲女人18| 91麻豆国产自产在线观看| 99re视频精品| 欧美日韩另类一区| 4438亚洲最大| 日韩久久精品一区| 国产片一区二区| 亚洲人xxxx| 天天操天天色综合| 精品一区二区在线观看| 成熟亚洲日本毛茸茸凸凹| 91同城在线观看| 欧美亚洲一区三区| 日韩一级完整毛片| 久久久夜色精品亚洲| 国产精品久久久久永久免费观看| 中文字幕亚洲不卡| 亚洲成人av在线电影| 免费观看在线综合| 制服丝袜中文字幕亚洲| 色嗨嗨av一区二区三区| 国产99久久久国产精品免费看 | 欧美第一区第二区| 精品国产免费视频| 亚洲少妇最新在线视频| 天堂精品中文字幕在线| 国产伦精品一区二区三区免费迷| 成人av电影免费在线播放| 欧美日韩在线一区二区| 久久精品人人做人人综合| 综合中文字幕亚洲| 日韩电影免费一区| 成人免费毛片嘿嘿连载视频| 欧美色老头old∨ideo| 久久久精品国产免费观看同学| 中文字幕免费一区| 亚洲成人av资源| 成人国产精品免费观看| 欧美一区二区在线观看| 中文字幕中文字幕一区| 奇米影视一区二区三区| 色综合久久久久久久久久久| 91麻豆精品国产自产在线| 一色桃子久久精品亚洲| 日本系列欧美系列| 91福利小视频| 国产精品久久免费看| 麻豆精品一区二区三区| 在线精品国精品国产尤物884a| 久久久av毛片精品| 天涯成人国产亚洲精品一区av| 成人爱爱电影网址| 欧美精品一区二区三区一线天视频| 一区二区三区久久| 成人高清视频在线| wwww国产精品欧美| 丝袜诱惑亚洲看片| 欧美性xxxxx极品少妇| 亚洲国产激情av| 激情成人午夜视频| 欧美精品久久99久久在免费线| 亚洲欧美经典视频| caoporn国产一区二区| 国产日韩精品视频一区| 精品一区二区三区视频 | 在线视频国内自拍亚洲视频| 国产日产欧产精品推荐色| 九色|91porny| 欧美xxxxx裸体时装秀| 麻豆一区二区三| 91精品午夜视频| 日韩激情视频在线观看| 欧美日韩一区二区三区四区| 亚洲午夜私人影院| 欧美自拍偷拍一区| 亚洲18女电影在线观看| 欧美日韩一级片网站| 亚洲资源中文字幕|