资源简介
MPEG-2视频编解码 参考代码
c++源码
代码片段和文件信息
/* conform.c conformance checks */
#include
#include
#include “config.h“
#include “global.h“
/* check for (level independent) parameter limits */
void range_checks()
{
int i;
/* range and value checks */
if (horizontal_size<1 || horizontal_size>16383)
error(“horizontal_size must be between 1 and 16383“);
if (mpeg1 && horizontal_size>4095)
error(“horizontal_size must be less than 4096 (MPEG-1)“);
if ((horizontal_size&4095)==0)
error(“horizontal_size must not be a multiple of 4096“);
if (chroma_format!=CHROMA444 && horizontal_size%2 != 0)
error(“horizontal_size must be a even (4:2:0 / 4:2:2)“);
if (vertical_size<1 || vertical_size>16383)
error(“vertical_size must be between 1 and 16383“);
if (mpeg1 && vertical_size>4095)
error(“vertical size must be less than 4096 (MPEG-1)“);
if ((vertical_size&4095)==0)
error(“vertical_size must not be a multiple of 4096“);
if (chroma_format==CHROMA420 && vertical_size%2 != 0)
error(“vertical_size must be a even (4:2:0)“);
if(fieldpic)
{
if (vertical_size%2 != 0)
error(“vertical_size must be a even (field pictures)“);
if (chroma_format==CHROMA420 && vertical_size%4 != 0)
error(“vertical_size must be a multiple of 4 (4:2:0 field pictures)“);
}
if (mpeg1)
{
if (aspectratio<1 || aspectratio>14)
error(“pel_aspect_ratio must be between 1 and 14 (MPEG-1)“);
}
else
{
if (aspectratio<1 || aspectratio>4)
error(“aspect_ratio_information must be 1 2 3 or 4“);
}
if (frame_rate_code<1 || frame_rate_code>8)
error(“frame_rate code must be between 1 and 8“);
if (bit_rate<=0.0)
error(“bit_rate must be positive“);
if (bit_rate > ((1<<30)-1)*400.0)
error(“bit_rate must be less than 429 Gbit/s“);
if (mpeg1 && bit_rate > ((1<<18)-1)*400.0)
error(“bit_rate must be less than 104 Mbit/s (MPEG-1)“);
if (vbv_buffer_size<1 || vbv_buffer_size>0x3ffff)
error(“vbv_buffer_size must be in range 1..(2^18-1)“);
if (mpeg1 && vbv_buffer_size>=1024)
error(“vbv_buffer_size must be less than 1024 (MPEG-1)“);
if (chroma_formatCHROMA444)
error(“chroma_format must be in range 1...3“);
if (video_format<0 || video_format>4)
error(“video_format must be in range 0...4“);
if (color_primaries<1 || color_primaries>7 || color_primaries==3)
error(“color_primaries must be in range 1...2 or 4...7“);
if (transfer_characteristics<1 || transfer_characteristics>7
|| transfer_characteristics==3)
error(“transfer_characteristics must be in range 1...2 or 4...7“);
if (matrix_coefficients<1 || matrix_coefficients>7 || matrix_coefficients==3)
error(“matrix_coefficients must be in range 1...2 or 4...7“);
if (display_horizontal_size<0 || display_horizontal_size>16383)
error(“display_horizontal_size
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2004-07-05 11:48 V1.2
目录 0 2004-07-05 11:48 V1.2\BIN
文件 36864 2004-07-05 11:48 V1.2\BIN\EMU387
文件 131072 2004-07-05 11:48 V1.2\BIN\MPEG2DEC.EXE
文件 151552 2004-07-05 11:48 V1.2\BIN\MPEG2ENC.EXE
文件 2316 2004-07-05 11:48 V1.2\BIN\README.PC
目录 0 2004-07-05 11:48 V1.2\Debug
目录 0 2004-07-05 11:48 V1.2\DOC
文件 6708 2004-07-05 11:48 V1.2\DOC\ARCHITECTURE.doc
文件 85 2004-07-05 11:48 V1.2\DOC\Bugs.doc
文件 7718 2004-07-05 11:48 V1.2\DOC\M2D_OLD.DOC
文件 24606 2004-07-05 11:48 V1.2\DOC\MPEG2ENC.DOC
目录 0 2004-07-05 11:48 V1.2\PAR
文件 192 2004-07-05 11:48 V1.2\PAR\INTER.MAT
文件 192 2004-07-05 11:48 V1.2\PAR\INTRA.MAT
文件 3004 2004-07-05 11:48 V1.2\PAR\MPEG-1.PAR
文件 3003 2004-07-05 11:48 V1.2\PAR\NTSC.PAR
文件 3003 2004-07-05 11:48 V1.2\PAR\PAL.PAR
目录 0 2004-07-05 11:48 V1.2\SRC
目录 0 2004-07-05 11:48 V1.2\SRC\dec
文件 4963 2004-07-05 11:48 V1.2\SRC\dec\dec.dsp
文件 529 2004-07-05 11:48 V1.2\SRC\dec\dec.dsw
文件 66560 2004-07-05 11:48 V1.2\SRC\dec\dec.ncb
文件 55808 2004-07-05 11:48 V1.2\SRC\dec\dec.opt
文件 4131 2004-07-05 11:48 V1.2\SRC\dec\dec.plg
目录 0 2004-07-05 11:48 V1.2\SRC\MPEG2DEC
文件 2747 2004-07-05 11:48 V1.2\SRC\MPEG2DEC\CHANGES
文件 1583 2004-07-05 11:48 V1.2\SRC\MPEG2DEC\CONFIG.H
文件 34891 2004-07-05 11:48 V1.2\SRC\MPEG2DEC\DISPLAY.C
文件 1488 2004-07-05 11:48 V1.2\SRC\MPEG2DEC\EXAMPLES
............此处省略199个文件信息
- 上一篇:C-Minus编译器
- 下一篇:畅捷通T+相关插件CellWeb5
评论
共有 条评论