Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "libavutil/intreadwrite.h"
00024 #include "avformat.h"
00025 #include "rawdec.h"
00026
00027 static int dnxhd_probe(AVProbeData *p)
00028 {
00029 static const uint8_t header[] = {0x00,0x00,0x02,0x80,0x01};
00030 int w, h, compression_id;
00031 if (p->buf_size < 0x2c)
00032 return 0;
00033 if (memcmp(p->buf, header, 5))
00034 return 0;
00035 h = AV_RB16(p->buf + 0x18);
00036 w = AV_RB16(p->buf + 0x1a);
00037 if (!w || !h)
00038 return 0;
00039 compression_id = AV_RB32(p->buf + 0x28);
00040 if (compression_id < 1237 || compression_id > 1253)
00041 return 0;
00042 return AVPROBE_SCORE_MAX;
00043 }
00044
00045 FF_DEF_RAWVIDEO_DEMUXER(dnxhd, "raw DNxHD (SMPTE VC-3)", dnxhd_probe, NULL, CODEC_ID_DNXHD)