[FFmpeg-devel] [PATCH]Rename FF_CODEC_PROPERTY_* as AV_CODEC_PROPERTY_*
Carl Eugen Hoyos
cehoyos at ag.or.at
Fri Jul 17 00:27:40 CEST 2015
Hi!
I am not really happy with attached patch as most defines in avcodec.h
use the FF_ prefix.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/doc/APIchanges b/doc/APIchanges
index 340515c..2748bcf 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,10 @@ libavutil: 2014-08-09
API changes, most recent first:
+2015-07-17 - xxxxxxxx - lavc 56.50.100
+ Rename FF_CODEC_PROPERTY_LOSSLESS and FF_CODEC_PROPERTY_CLOSED_CAPTIONS
+ as AV_CODEC_PROPERTY_LOSSLESS and AV_CODEC_PROPERTY_CLOSED_CAPTIONS
+
2015-07-16 - xxxxxxxx - lavc 56.49.100
Add av_codec_get_codec_properties(), FF_CODEC_PROPERTY_LOSSLESS
and FF_CODEC_PROPERTY_CLOSED_CAPTIONS
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index ad2f5b5..81e8174 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -3181,8 +3181,8 @@ typedef struct AVCodecContext {
* - decoding: set by libavcodec
*/
unsigned properties;
-#define FF_CODEC_PROPERTY_LOSSLESS 0x00000001
-#define FF_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
+#define AV_CODEC_PROPERTY_LOSSLESS 0x00000001
+#define AV_CODEC_PROPERTY_CLOSED_CAPTIONS 0x00000002
} AVCodecContext;
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index eb834f1..511134b 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -886,7 +886,7 @@ static void decode_postinit(H264Context *h, int setup_finished)
memcpy(sd->data, h->a53_caption, h->a53_caption_size);
av_freep(&h->a53_caption);
h->a53_caption_size = 0;
- h->avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
+ h->avctx->properties |= AV_CODEC_PROPERTY_CLOSED_CAPTIONS;
}
cur->mmco_reset = h->mmco_reset;
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index cc82a43..82d1ff0 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2059,7 +2059,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
goto fail;
break;
case SOF3:
- s->avctx->properties |= FF_CODEC_PROPERTY_LOSSLESS;
+ s->avctx->properties |= AV_CODEC_PROPERTY_LOSSLESS;
s->lossless = 1;
s->ls = 0;
s->progressive = 0;
@@ -2067,7 +2067,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
goto fail;
break;
case SOF48:
- s->avctx->properties |= FF_CODEC_PROPERTY_LOSSLESS;
+ s->avctx->properties |= AV_CODEC_PROPERTY_LOSSLESS;
s->lossless = 1;
s->ls = 1;
s->progressive = 0;
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 480cf41..7b07e0e 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -1685,7 +1685,7 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
if (sd)
memcpy(sd->data, s1->a53_caption, s1->a53_caption_size);
av_freep(&s1->a53_caption);
- avctx->properties |= FF_CODEC_PROPERTY_CLOSED_CAPTIONS;
+ avctx->properties |= AV_CODEC_PROPERTY_CLOSED_CAPTIONS;
}
if (s1->has_stereo3d) {
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index e4eb772..dca0ebc 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -3153,10 +3153,10 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", q=%d-%d", enc->qmin, enc->qmax);
} else {
- if (enc->properties & FF_CODEC_PROPERTY_CLOSED_CAPTIONS)
+ if (enc->properties & AV_CODEC_PROPERTY_CLOSED_CAPTIONS)
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", Closed Captions");
- if (enc->properties & FF_CODEC_PROPERTY_LOSSLESS)
+ if (enc->properties & AV_CODEC_PROPERTY_LOSSLESS)
snprintf(buf + strlen(buf), buf_size - strlen(buf),
", lossless");
}
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 778293a..df0f252 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 56
-#define LIBAVCODEC_VERSION_MINOR 49
+#define LIBAVCODEC_VERSION_MINOR 50
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 5b5ad99..84432f3 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -734,7 +734,7 @@ static int decode_frame_header(AVCodecContext *ctx,
s->lossless = s->yac_qi == 0 && s->ydc_qdelta == 0 &&
s->uvdc_qdelta == 0 && s->uvac_qdelta == 0;
if (s->lossless)
- ctx->properties |= FF_CODEC_PROPERTY_LOSSLESS;
+ ctx->properties |= AV_CODEC_PROPERTY_LOSSLESS;
/* segmentation header info */
s->segmentation.ignore_refmap = 0;
diff --git a/libavcodec/webp.c b/libavcodec/webp.c
index 8caa6a2..bd8bd2c 100644
--- a/libavcodec/webp.c
+++ b/libavcodec/webp.c
@@ -1417,7 +1417,7 @@ static int webp_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
chunk_size, 0);
if (ret < 0)
return ret;
- avctx->properties |= FF_CODEC_PROPERTY_LOSSLESS;
+ avctx->properties |= AV_CODEC_PROPERTY_LOSSLESS;
}
bytestream2_skip(&gb, chunk_size);
break;
More information about the ffmpeg-devel
mailing list