Commit cdc487bf authored by Vittorio Giovara's avatar Vittorio Giovara

prores: Use profile names in the various encoders and decoders

Export FF_PROFILE_PRORES_* symbols publicly, add a missing one.
parent febaa63b
......@@ -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.
......
......@@ -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,
......
......@@ -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 */
......@@ -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 */
......@@ -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),
};
......@@ -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),
};
......@@ -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),
};
......@@ -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, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment