aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpeg12enc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-02 14:57:41 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-07 00:39:02 +0200
commit8238bc0b5e3dba271217b1223a901b3f9713dc6e (patch)
tree2809c5b9d9b26042d584c92afeb76b059484c00f /libavcodec/mpeg12enc.c
parent0c6e5f321bf5c4054e8b98232692465b342b42b4 (diff)
downloadffmpeg-8238bc0b5e3dba271217b1223a901b3f9713dc6e.tar.gz
avcodec/defs: Add AV_PROFILE_* defines, deprecate FF_PROFILE_* defines
These defines are also used in other contexts than just AVCodecContext ones, e.g. in libavformat. Furthermore, given that these defines are public, the AV-prefix is the right one, so deprecate (and not just move) the FF-macros. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpeg12enc.c')
-rw-r--r--libavcodec/mpeg12enc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 4aa45e9e86..0135623c0e 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -203,23 +203,23 @@ static av_cold int encode_init(AVCodecContext *avctx)
}
}
- if (avctx->profile == FF_PROFILE_UNKNOWN) {
- if (avctx->level != FF_LEVEL_UNKNOWN) {
+ if (avctx->profile == AV_PROFILE_UNKNOWN) {
+ if (avctx->level != AV_LEVEL_UNKNOWN) {
av_log(avctx, AV_LOG_ERROR, "Set profile and level\n");
return AVERROR(EINVAL);
}
/* Main or 4:2:2 */
- avctx->profile = avctx->pix_fmt == AV_PIX_FMT_YUV420P ? FF_PROFILE_MPEG2_MAIN
- : FF_PROFILE_MPEG2_422;
+ avctx->profile = avctx->pix_fmt == AV_PIX_FMT_YUV420P ? AV_PROFILE_MPEG2_MAIN
+ : AV_PROFILE_MPEG2_422;
}
- if (avctx->level == FF_LEVEL_UNKNOWN) {
- if (avctx->profile == FF_PROFILE_MPEG2_422) { /* 4:2:2 */
+ if (avctx->level == AV_LEVEL_UNKNOWN) {
+ if (avctx->profile == AV_PROFILE_MPEG2_422) { /* 4:2:2 */
if (avctx->width <= 720 && avctx->height <= 608)
avctx->level = 5; /* Main */
else
avctx->level = 2; /* High */
} else {
- if (avctx->profile != FF_PROFILE_MPEG2_HIGH &&
+ if (avctx->profile != AV_PROFILE_MPEG2_HIGH &&
avctx->pix_fmt != AV_PIX_FMT_YUV420P) {
av_log(avctx, AV_LOG_ERROR,
"Only High(1) and 4:2:2(0) profiles support 4:2:2 color sampling\n");
@@ -366,7 +366,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
put_header(s, EXT_START_CODE);
put_bits(&s->pb, 4, 1); // seq ext
- put_bits(&s->pb, 1, s->avctx->profile == FF_PROFILE_MPEG2_422); // escx 1 for 4:2:2 profile
+ put_bits(&s->pb, 1, s->avctx->profile == AV_PROFILE_MPEG2_422); // escx 1 for 4:2:2 profile
put_bits(&s->pb, 3, s->avctx->profile); // profile
put_bits(&s->pb, 4, s->avctx->level); // level