summaryrefslogtreecommitdiff
path: root/libavcodec/huffyuv.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2008-09-03 12:33:21 +0000
committerDiego Biurrun <diego@biurrun.de>2008-09-03 12:33:21 +0000
commitf544a5fc84975879746f619e01b6f1e80844e59e (patch)
tree888967928796e772987ca8a3ad5834b7029beb27 /libavcodec/huffyuv.c
parentbb6c34e55b158c457272046ed9f22b974e832fb5 (diff)
Replace generic CONFIG_ENCODERS preprocessor conditionals by more specific
CONFIG_FOO_ENCODER conditionals where appropriate. Originally committed as revision 15174 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/huffyuv.c')
-rw-r--r--libavcodec/huffyuv.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index b262cd66f1..9d1a49a807 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -261,7 +261,7 @@ static int generate_bits_table(uint32_t *dst, uint8_t *len_table){
return 0;
}
-#ifdef CONFIG_ENCODERS
+#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
typedef struct {
uint64_t val;
int name;
@@ -317,7 +317,7 @@ static void generate_len_table(uint8_t *dst, uint64_t *stats, int size){
if(i==size) break;
}
}
-#endif /* CONFIG_ENCODERS */
+#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
static void generate_joint_tables(HYuvContext *s){
uint16_t symbols[1<<VLC_BITS];
@@ -575,7 +575,7 @@ s->bgr32=1;
}
#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
-#ifdef CONFIG_ENCODERS
+#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){
int i;
int index= 0;
@@ -725,7 +725,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
return 0;
}
-#endif /* CONFIG_ENCODERS */
+#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
/* TODO instead of restarting the read when the code isn't in the first level
* of the joint table, jump into the 2nd level of the individual table. */
@@ -761,7 +761,7 @@ static void decode_gray_bitstream(HYuvContext *s, int count){
}
}
-#ifdef CONFIG_ENCODERS
+#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
static int encode_422_bitstream(HYuvContext *s, int count){
int i;
@@ -854,7 +854,7 @@ static int encode_gray_bitstream(HYuvContext *s, int count){
}
return 0;
}
-#endif /* CONFIG_ENCODERS */
+#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
static av_always_inline void decode_bgr_1(HYuvContext *s, int count, int decorrelate, int alpha){
int i;
@@ -1226,7 +1226,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
}
#endif /* defined(CONFIG_HUFFYUV_DECODER) || defined(CONFIG_FFVHUFF_DECODER) */
-#ifdef CONFIG_ENCODERS
+#if defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER)
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
HYuvContext *s = avctx->priv_data;
AVFrame *pict = data;
@@ -1431,7 +1431,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
return 0;
}
-#endif /* CONFIG_ENCODERS */
+#endif /* defined(CONFIG_HUFFYUV_ENCODER) || defined(CONFIG_FFVHUFF_ENCODER) */
#ifdef CONFIG_HUFFYUV_DECODER
AVCodec huffyuv_decoder = {
@@ -1465,8 +1465,7 @@ AVCodec ffvhuff_decoder = {
};
#endif
-#ifdef CONFIG_ENCODERS
-
+#ifdef CONFIG_HUFFYUV_ENCODER
AVCodec huffyuv_encoder = {
"huffyuv",
CODEC_TYPE_VIDEO,
@@ -1478,7 +1477,9 @@ AVCodec huffyuv_encoder = {
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"),
};
+#endif
+#ifdef CONFIG_FFVHUFF_ENCODER
AVCodec ffvhuff_encoder = {
"ffvhuff",
CODEC_TYPE_VIDEO,
@@ -1490,5 +1491,4 @@ AVCodec ffvhuff_encoder = {
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"),
};
-
-#endif //CONFIG_ENCODERS
+#endif