summaryrefslogtreecommitdiff
path: root/libavcodec/dnxhddata.h
diff options
context:
space:
mode:
authorMark Reid <mindmark@gmail.com>2016-02-13 21:44:32 -0800
committerMichael Niedermayer <michael@niedermayer.cc>2016-02-14 19:17:36 +0100
commit8395b6eeaa279cff5c1c5d2b2ddfd5be087ca3ee (patch)
tree1b5834e1adcacc81f73f312ed413bcb72076a3e6 /libavcodec/dnxhddata.h
parentb8bc6b14a556e11e3f6cb49ead9d21d9a769b7c8 (diff)
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/dnxhddata.h')
-rw-r--r--libavcodec/dnxhddata.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/libavcodec/dnxhddata.h b/libavcodec/dnxhddata.h
index d97388818d..3ae4683a6c 100644
--- a/libavcodec/dnxhddata.h
+++ b/libavcodec/dnxhddata.h
@@ -31,6 +31,12 @@
#define DNXHD_MBAFF (1<<1)
#define DNXHD_444 (1<<2)
+/** Frame headers, extra 0x00 added to end for parser */
+#define DNXHD_HEADER_INITIAL 0x000002800100
+#define DNXHD_HEADER_444 0x000002800200
+#define DNXHD_HEADER_HR1 0x000002800300
+#define DNXHD_HEADER_HR2 0x0000038C0300
+
/** Indicate that a CIDEntry value must be read in the bitstream */
#define DNXHD_VARIABLE 0
@@ -59,7 +65,17 @@ int ff_dnxhd_get_cid_table(int cid);
int ff_dnxhd_find_cid(AVCodecContext *avctx, int bit_depth);
void ff_dnxhd_print_profiles(AVCodecContext *avctx, int loglevel);
+static av_always_inline uint64_t ff_dnxhd_check_header_prefix(uint64_t prefix)
+{
+ if (prefix == DNXHD_HEADER_INITIAL ||
+ prefix == DNXHD_HEADER_444 ||
+ prefix == DNXHD_HEADER_HR1 ||
+ prefix == DNXHD_HEADER_HR2)
+ return prefix;
+ return 0;
+}
+
int avpriv_dnxhd_get_frame_size(int cid);
int avpriv_dnxhd_get_interlaced(int cid);
-
+uint64_t avpriv_dnxhd_parse_header_prefix(const uint8_t *buf);
#endif /* AVCODEC_DNXHDDATA_H */