PDA

View Full Version : Require VC-1 standard


Ahlucard
20th July 2009, 07:53
i m learning VC-1.
I want a link of
"VC-1 Compressed Video Bitstream Format and Decoding Process"

Plz share it.

my email: terry_kim@21cn.com

Ghitulescu
20th July 2009, 09:13
VC-1 is SMPTE 421M.
https://store.smpte.org/
However, be prepared to face a juridic issue: parts of it are protected by patents issued mostly to Microsoft. While the use of a patent is generally allowed for individuals in non-profit situations, it might be an issue when you will public your algorithm (if).

neuron2
20th July 2009, 15:15
Plz share it. Can't do that as it is not in the public domain. You'll have to buy it.

Death KnightŪ
22nd July 2009, 19:55
i m learning VC-1.
I want a link of
"VC-1 Compressed Video Bitstream Format and Decoding Process"

Plz share it.

my email: terry_kim@21cn.com

If wonder that if you know how can I detect KeyFrames in VC-1 streams.
I am searching for that this days...

neuron2
22nd July 2009, 20:42
Here's parsing code from DGVC1DecNV.

int parse_nalu(NALU_t *_nalu, unsigned __int64 ftell_position)
{
int ret = PICTURE_NOT_YET_FOUND;
static int interlace, tfcntr, pulldown;
char frame_type[10];
char frame_mode_str[10];
unsigned char c;
int frame_mode;

switch (_nalu->buf[3])
{
case 0x0f:
// Sequence header.
profile = _nalu->buf[4] >> 6;
level = (_nalu->buf[4] >> 3) & 7;
tfcntr = (_nalu->buf[9] >> 5) & 1;
interlace = (_nalu->buf[9] >> 6) & 1;
pulldown = (_nalu->buf[9] >> 7) & 1;
if (Operation == OP_SAVE)
{
if (SystemStream_Flag == MATROSKA_STREAM)
fprintf(p_aif, "\nSEQ %I64u %s %s",
mkv_current_tc, interlace ? "INTERLACE" : "!INTERLACE", pulldown ? "PULLDOWN" : "!PULLDOWN");
else
fprintf(p_aif, "\nSEQ %I64u %s %s",
ftell_position, interlace ? "INTERLACE" : "!INTERLACE", pulldown ? "PULLDOWN" : "!PULLDOWN");
}
break;
case 0x0e:
// Entry point header.
// Don't accept entry points until we've seen a sequence header.
if (profile == -1)
break;
if (Operation == OP_SAVE)
{
if (SystemStream_Flag == MATROSKA_STREAM)
fprintf(p_aif, "\nENTRY %I64u %s %s", mkv_current_tc, _nalu->buf[4] & 0x80 ? "BROKEN" : "!BROKEN", _nalu->buf[4] & 0x40 ? "CLOSED" : "!CLOSED");
else
fprintf(p_aif, "\nENTRY %I64u %s %s", ftell_position, _nalu->buf[4] & 0x80 ? "BROKEN" : "!BROKEN", _nalu->buf[4] & 0x40 ? "CLOSED" : "!CLOSED");
}
break;
case 0x0d:
// Picture header.
// Don't accept pictures until we've seen a sequence header.
if (profile == -1)
break;
if (Operation == OP_SAVE)
{
coded++;
playback++;
c = _nalu->buf[4];
frame_mode = 1;
if (interlace)
{
if ((c & 0x80) == 0x00)
{
// Progressive.
strcpy(frame_mode_str, "PROG");
c <<= 1;
}
else if ((c & 0xc0) == 0x80)
{
// Frame interlace.
strcpy(frame_mode_str, "FRAME");
c <<= 2;
}
else if ((c & 0xc0) == 0xc0)
{
// Field interlace.
strcpy(frame_mode_str, "FIELD");
c <<= 2;
c >>= 5;
frame_mode = 0;
}
}
else
strcpy(frame_mode_str, "PROG");
if (frame_mode)
{
if ((c & 0xe0) == 0xc0)
{
strcpy(frame_type, "I");
AnchorPictureSeen = 1;
}
else if ((c & 0x80) == 0x00)
strcpy(frame_type, "P");
else if ((c & 0xc0) == 0x80)
strcpy(frame_type, "B");
else if ((c & 0xf0) == 0xe0)
strcpy(frame_type, "BI");
else if ((c & 0xf0) == 0xf0)
strcpy(frame_type, "Pskip");
}
else
{
if (c < 3)
{
strcpy(frame_type, "I");
AnchorPictureSeen = 1;
}
else if (c == 3)
strcpy(frame_type, "P");
else if (c == 4)
strcpy(frame_type, "B");
else
strcpy(frame_type, "BI");
}
fprintf(p_aif, "\nFRM %s %s", frame_type, frame_mode_str);
}
if (Operation == OP_INITIAL_PARSE)
ret = EOS;
else
ret = PICTURE_FOUND;
break;
}
return ret;
}

Death KnightŪ
24th July 2009, 00:46
Oh :thanks: