aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2017-10-23 16:04:31 -0300
committerJames Almer <jamrial@gmail.com>2017-10-23 16:04:31 -0300
commit7b550c5f84f21ce883e86bc91f16093641d5dc85 (patch)
tree5cffe208a3e3c1577e0be2efe49310745d889100
parentd658e04337c590043190718ec4a8137d3e8216b9 (diff)
parentb3739599bda740ac12d3dde31a331b744df99123 (diff)
downloadffmpeg-7b550c5f84f21ce883e86bc91f16093641d5dc85.tar.gz
Merge commit 'b3739599bda740ac12d3dde31a331b744df99123'
* commit 'b3739599bda740ac12d3dde31a331b744df99123': lavc: Drop deprecated emu edge functionality Merged-by: James Almer <jamrial@gmail.com>
-rw-r--r--fftools/ffmpeg_opt.c3
-rw-r--r--fftools/ffplay.c7
-rw-r--r--libavcodec/avcodec.h22
-rw-r--r--libavcodec/mjpegenc.c6
-rw-r--r--libavcodec/options_table.h3
-rw-r--r--libavcodec/snowenc.c6
-rw-r--r--libavcodec/utils.c7
-rw-r--r--libavcodec/version.h3
-rw-r--r--libavcodec/wmv2dec.c4
9 files changed, 1 insertions, 60 deletions
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
index d441d29390..3a947d8686 100644
--- a/fftools/ffmpeg_opt.c
+++ b/fftools/ffmpeg_opt.c
@@ -796,9 +796,6 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic)
ist->dec_ctx->height = st->codec->height;
ist->dec_ctx->coded_width = st->codec->coded_width;
ist->dec_ctx->coded_height = st->codec->coded_height;
-#if FF_API_EMU_EDGE
- ist->dec_ctx->flags |= CODEC_FLAG_EMU_EDGE;
-#endif
}
#endif
diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index 9f7774613c..8e88a77820 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -2604,15 +2604,8 @@ static int stream_component_open(VideoState *is, int stream_index)
}
av_codec_set_lowres(avctx, stream_lowres);
-#if FF_API_EMU_EDGE
- if(stream_lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
-#endif
if (fast)
avctx->flags2 |= AV_CODEC_FLAG2_FAST;
-#if FF_API_EMU_EDGE
- if(codec->capabilities & AV_CODEC_CAP_DR1)
- avctx->flags |= CODEC_FLAG_EMU_EDGE;
-#endif
opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index], codec);
if (!av_dict_get(opts, "threads", NULL, 0))
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 5a07aad5a9..3b68de6986 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1109,13 +1109,6 @@ typedef struct RcOverride{
#define CODEC_FLAG_PASS1 AV_CODEC_FLAG_PASS1
#define CODEC_FLAG_PASS2 AV_CODEC_FLAG_PASS2
#define CODEC_FLAG_GRAY AV_CODEC_FLAG_GRAY
-#if FF_API_EMU_EDGE
-/**
- * @deprecated edges are not used/required anymore. I.e. this flag is now always
- * set.
- */
-#define CODEC_FLAG_EMU_EDGE 0x4000
-#endif
#define CODEC_FLAG_PSNR AV_CODEC_FLAG_PSNR
#define CODEC_FLAG_TRUNCATED AV_CODEC_FLAG_TRUNCATED
@@ -4713,21 +4706,6 @@ AVCodec *avcodec_find_decoder_by_name(const char *name);
*/
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
-#if FF_API_EMU_EDGE
-/**
- * Return the amount of padding in pixels which the get_buffer callback must
- * provide around the edge of the image for codecs which do not have the
- * CODEC_FLAG_EMU_EDGE flag.
- *
- * @return Required padding in pixels.
- *
- * @deprecated CODEC_FLAG_EMU_EDGE is deprecated, so this function is no longer
- * needed
- */
-attribute_deprecated
-unsigned avcodec_get_edge_width(void);
-#endif
-
/**
* Modify width and height values so that they will result in a memory
* buffer that is acceptable for the codec if you do not use any horizontal
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index e6cdaf6376..d2fcb8e191 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -358,12 +358,6 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift, &chroma_v_shift);
-#if FF_API_EMU_EDGE
- //CODEC_FLAG_EMU_EDGE have to be cleared
- if(s->avctx->flags & CODEC_FLAG_EMU_EDGE)
- return AVERROR(EINVAL);
-#endif
-
if ((avctx->height & 15) && avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) {
av_log(avctx, AV_LOG_ERROR,
"Heights which are not a multiple of 16 might fail with some decoders, "
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h
index 68dce2a930..944c6c4f85 100644
--- a/libavcodec/options_table.h
+++ b/libavcodec/options_table.h
@@ -66,9 +66,6 @@ static const AVOption avcodec_options[] = {
{"pass1", "use internal 2-pass ratecontrol in first pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS1 }, INT_MIN, INT_MAX, 0, "flags"},
{"pass2", "use internal 2-pass ratecontrol in second pass mode", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PASS2 }, INT_MIN, INT_MAX, 0, "flags"},
{"gray", "only decode/encode grayscale", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_GRAY }, INT_MIN, INT_MAX, V|E|D, "flags"},
-#if FF_API_EMU_EDGE
-{"emu_edge", "do not draw edges", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_EMU_EDGE }, INT_MIN, INT_MAX, 0, "flags"},
-#endif
{"psnr", "error[?] variables will be set during encoding", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PSNR }, INT_MIN, INT_MAX, V|E, "flags"},
{"truncated", "Input bitstream might be randomly truncated", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, V|D, "flags"},
#if FF_API_NORMALIZE_AQP
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 0d800b9f49..3ffa701093 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1622,11 +1622,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
s->lambda = 0;
}//else keep previous frame's qlog until after motion estimation
- if (s->current_picture->data[0]
-#if FF_API_EMU_EDGE
- && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)
-#endif
- ) {
+ if (s->current_picture->data[0]) {
int w = s->avctx->width;
int h = s->avctx->height;
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 05f4302ad1..caf988ee4e 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -191,13 +191,6 @@ av_cold void avcodec_register(AVCodec *codec)
codec->init_static_data(codec);
}
-#if FF_API_EMU_EDGE
-unsigned avcodec_get_edge_width(void)
-{
- return EDGE_WIDTH;
-}
-#endif
-
int ff_set_dimensions(AVCodecContext *s, int width, int height)
{
int ret = av_image_check_size2(width, height, s->max_pixels, AV_PIX_FMT_NONE, 0, s);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 4565cd5aac..df427fbff4 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -57,9 +57,6 @@
#ifndef FF_API_DEBUG_MV
#define FF_API_DEBUG_MV (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
-#ifndef FF_API_EMU_EDGE
-#define FF_API_EMU_EDGE (LIBAVCODEC_VERSION_MAJOR < 58)
-#endif
#ifndef FF_API_UNUSED_MEMBERS
#define FF_API_UNUSED_MEMBERS (LIBAVCODEC_VERSION_MAJOR < 58)
#endif
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 20dbee5703..261d291c97 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -460,10 +460,6 @@ static av_cold int wmv2_decode_init(AVCodecContext *avctx)
Wmv2Context *const w = avctx->priv_data;
int ret;
-#if FF_API_EMU_EDGE
- avctx->flags |= CODEC_FLAG_EMU_EDGE;
-#endif
-
if ((ret = ff_msmpeg4_decode_init(avctx)) < 0)
return ret;