aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2018-11-02 15:23:16 -0400
committerVittorio Giovara <vittorio.giovara@gmail.com>2018-11-05 12:36:05 -0500
commitcdc487bfc841ce47e64bdd774f7bcc40e3f4a626 (patch)
tree526a68fe956665b4e9fae8c83e0d59c40a8b7363
parentfebaa63b0f7f7ef7e80cfc5031e1d0982d9c74ea (diff)
downloadffmpeg-cdc487bfc841ce47e64bdd774f7bcc40e3f4a626.tar.gz
prores: Use profile names in the various encoders and decoders
Export FF_PROFILE_PRORES_* symbols publicly, add a missing one.
-rw-r--r--libavcodec/avcodec.h7
-rw-r--r--libavcodec/codec_desc.c1
-rw-r--r--libavcodec/profiles.c10
-rw-r--r--libavcodec/profiles.h1
-rw-r--r--libavcodec/proresdec2.c2
-rw-r--r--libavcodec/proresenc_anatoliy.c11
-rw-r--r--libavcodec/proresenc_kostya.c2
-rw-r--r--libavcodec/version.h2
8 files changed, 27 insertions, 9 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 80fa469f26..3922e89331 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2971,6 +2971,13 @@ typedef struct AVCodecContext {
#define FF_PROFILE_SBC_MSBC 1
+#define FF_PROFILE_PRORES_PROXY 0
+#define FF_PROFILE_PRORES_LT 1
+#define FF_PROFILE_PRORES_STANDARD 2
+#define FF_PROFILE_PRORES_HQ 3
+#define FF_PROFILE_PRORES_4444 4
+#define FF_PROFILE_PRORES_XQ 5
+
/**
* level
* - encoding: Set by user.
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 1a159f7e13..ce9d39d924 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1077,6 +1077,7 @@ static const AVCodecDescriptor codec_descriptors[] = {
.name = "prores",
.long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"),
.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY,
+ .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
},
{
.id = AV_CODEC_ID_JV,
diff --git a/libavcodec/profiles.c b/libavcodec/profiles.c
index c31399f83e..8a4447e438 100644
--- a/libavcodec/profiles.c
+++ b/libavcodec/profiles.c
@@ -151,4 +151,14 @@ const AVProfile ff_sbc_profiles[] = {
{ FF_PROFILE_UNKNOWN },
};
+const AVProfile ff_prores_profiles[] = {
+ { FF_PROFILE_PRORES_PROXY, "Proxy" },
+ { FF_PROFILE_PRORES_LT, "LT" },
+ { FF_PROFILE_PRORES_STANDARD, "Standard" },
+ { FF_PROFILE_PRORES_HQ, "HQ" },
+ { FF_PROFILE_PRORES_4444, "4444" },
+ { FF_PROFILE_PRORES_XQ, "XQ" },
+ { FF_PROFILE_UNKNOWN }
+};
+
#endif /* !CONFIG_SMALL */
diff --git a/libavcodec/profiles.h b/libavcodec/profiles.h
index 9d7e211e15..4669dad8d5 100644
--- a/libavcodec/profiles.h
+++ b/libavcodec/profiles.h
@@ -33,5 +33,6 @@ extern const AVProfile ff_vc1_profiles[];
extern const AVProfile ff_vp9_profiles[];
extern const AVProfile ff_av1_profiles[];
extern const AVProfile ff_sbc_profiles[];
+extern const AVProfile ff_prores_profiles[];
#endif /* AVCODEC_PROFILES_H */
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index d818e5d8da..6b3021bdfa 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -33,6 +33,7 @@
#include "get_bits.h"
#include "idctdsp.h"
#include "internal.h"
+#include "profiles.h"
#include "simple_idct.h"
#include "proresdec.h"
#include "proresdata.h"
@@ -730,4 +731,5 @@ AVCodec ff_prores_decoder = {
.close = decode_close,
.decode = decode_frame,
.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS,
+ .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
};
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index dbbf13f4c0..f35f049a78 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -30,6 +30,7 @@
#include "avcodec.h"
#include "dct.h"
#include "internal.h"
+#include "profiles.h"
#include "proresdata.h"
#include "put_bits.h"
#include "bytestream.h"
@@ -37,12 +38,6 @@
#define DEFAULT_SLICE_MB_WIDTH 8
-#define FF_PROFILE_PRORES_PROXY 0
-#define FF_PROFILE_PRORES_LT 1
-#define FF_PROFILE_PRORES_STANDARD 2
-#define FF_PROFILE_PRORES_HQ 3
-#define FF_PROFILE_PRORES_4444 4
-
static const AVProfile profiles[] = {
{ FF_PROFILE_PRORES_PROXY, "apco"},
{ FF_PROFILE_PRORES_LT, "apcs"},
@@ -679,7 +674,7 @@ AVCodec ff_prores_aw_encoder = {
.encode2 = prores_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_NONE},
.capabilities = AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_INTRA_ONLY,
- .profiles = profiles
+ .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
};
AVCodec ff_prores_encoder = {
@@ -693,5 +688,5 @@ AVCodec ff_prores_encoder = {
.encode2 = prores_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]){AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_NONE},
.capabilities = AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_INTRA_ONLY,
- .profiles = profiles
+ .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
};
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 81f3865ea6..9a77d24fb6 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -28,6 +28,7 @@
#include "avcodec.h"
#include "fdctdsp.h"
#include "put_bits.h"
+#include "profiles.h"
#include "bytestream.h"
#include "internal.h"
#include "proresdata.h"
@@ -1431,4 +1432,5 @@ AVCodec ff_prores_ks_encoder = {
AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_NONE
},
.priv_class = &proresenc_class,
+ .profiles = NULL_IF_CONFIG_SMALL(ff_prores_profiles),
};
diff --git a/libavcodec/version.h b/libavcodec/version.h
index aaf1dadf74..893ab9b0d1 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,7 +28,7 @@
#include "libavutil/version.h"
#define LIBAVCODEC_VERSION_MAJOR 58
-#define LIBAVCODEC_VERSION_MINOR 37
+#define LIBAVCODEC_VERSION_MINOR 38
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \