diff options
author | Mark Reid <mindmark@gmail.com> | 2016-02-13 21:44:32 -0800 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-02-14 19:17:36 +0100 |
commit | 8395b6eeaa279cff5c1c5d2b2ddfd5be087ca3ee (patch) | |
tree | 1b5834e1adcacc81f73f312ed413bcb72076a3e6 /libavcodec/dnxhd_parser.c | |
parent | b8bc6b14a556e11e3f6cb49ead9d21d9a769b7c8 (diff) | |
download | ffmpeg-8395b6eeaa279cff5c1c5d2b2ddfd5be087ca3ee.tar.gz |
libavcodec/dnxhd_parser: add parser and probe support raw 444 and dnxhr formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dnxhd_parser.c')
-rw-r--r-- | libavcodec/dnxhd_parser.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/dnxhd_parser.c b/libavcodec/dnxhd_parser.c index fffb98fa48..033b8ee7e1 100644 --- a/libavcodec/dnxhd_parser.c +++ b/libavcodec/dnxhd_parser.c @@ -25,8 +25,7 @@ */ #include "parser.h" - -#define DNXHD_HEADER_PREFIX 0x000002800100 +#include "dnxhddata.h" typedef struct { ParseContext pc; @@ -47,7 +46,7 @@ static int dnxhd_find_frame_end(DNXHDParserContext *dctx, if (!pic_found) { for (i = 0; i < buf_size; i++) { state = (state << 8) | buf[i]; - if ((state & 0xffffffffff00LL) == DNXHD_HEADER_PREFIX) { + if (ff_dnxhd_check_header_prefix(state & 0xffffffffff00LL) != 0) { i++; pic_found = 1; interlaced = (state&2)>>1; /* byte following the 5-byte header prefix */ @@ -62,7 +61,7 @@ static int dnxhd_find_frame_end(DNXHDParserContext *dctx, return 0; for (; i < buf_size; i++) { state = (state << 8) | buf[i]; - if ((state & 0xffffffffff00LL) == DNXHD_HEADER_PREFIX) { + if (ff_dnxhd_check_header_prefix(state & 0xffffffffff00LL) != 0) { if (!interlaced || dctx->cur_field) { pc->frame_start_found = 0; pc->state64 = -1; |