summaryrefslogtreecommitdiff
path: root/libavcodec/h264.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-26 02:27:14 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-26 02:27:14 +0000
commit0af6967ee747346bbb89b819b30dea11b498d1dd (patch)
tree2c4595739a6aac281f52256f6e632d927d99a01e /libavcodec/h264.h
parent385c820b4a1bff625936ec66be9c151ea2f9718b (diff)
chroma_format_idc=0 aka grayscale support.
Can be disabled by removing #define ALLOW_NOCHROMA in case the extra if() slow the code down measurably. Fixes at least FRExt/HPCAMOLQ_BRCM_B.264 FRExt/HPCVMOLQ_BRCM_B.264 Originally committed as revision 14407 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.h')
-rw-r--r--libavcodec/h264.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 889c94c6bc..93e7856f62 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -57,6 +57,8 @@
* of progressive decoding by about 2%. */
#define ALLOW_INTERLACE
+#define ALLOW_NOCHROMA
+
#ifdef ALLOW_INTERLACE
#define MB_MBAFF h->mb_mbaff
#define MB_FIELD h->mb_field_decoding_flag
@@ -72,6 +74,12 @@
#endif
#define FIELD_OR_MBAFF_PICTURE (FRAME_MBAFF || FIELD_PICTURE)
+#ifdef ALLOW_NOCHROMA
+#define CHROMA h->sps.chroma_format_idc
+#else
+#define CHROMA 1
+#endif
+
#ifndef ENABLE_H264_ENCODER
#define ENABLE_H264_ENCODER 0
#endif
@@ -83,6 +91,7 @@ typedef struct SPS{
int profile_idc;
int level_idc;
+ int chroma_format_idc;
int transform_bypass; ///< qpprime_y_zero_transform_bypass_flag
int log2_max_frame_num; ///< log2_max_frame_num_minus4 + 4
int poc_type; ///< pic_order_cnt_type