summaryrefslogtreecommitdiffstats
path: root/video/img_format.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-16 15:14:55 +0100
committerwm4 <wm4@nowhere>2020-02-16 15:14:55 +0100
commit7d11eda72e90d7aa9df25127bd810aa7b191029c (patch)
tree5c474862236dc62d136fe44dfdf3737bc808b829 /video/img_format.c
parenta4eb8f75c0644ce5cf7c0bcea6b3efd2a886027d (diff)
downloadmpv-7d11eda72e90d7aa9df25127bd810aa7b191029c.tar.bz2
mpv-7d11eda72e90d7aa9df25127bd810aa7b191029c.tar.xz
Remove remains of Libav compatibility
Libav seems rather dead: no release for 2 years, no new git commits in master for almost a year (with one exception ~6 months ago). From what I can tell, some developers resigned themselves to the horrifying idea to post patches to ffmpeg-devel instead, while the rest of the developers went on to greener pastures. Libav was a better project than FFmpeg. Unfortunately, FFmpeg won, because it managed to keep the name and website. Libav was pushed more and more into obscurity: while there was initially a big push for Libav, FFmpeg just remained "in place" and visible for most people. FFmpeg was slowly draining all manpower and energy from Libav. A big part of this was that FFmpeg stole code from Libav (regular merges of the entire Libav git tree), making it some sort of Frankenstein mirror of Libav, think decaying zombie with additional legs ("features") nailed to it. "Stealing" surely is the wrong word; I'm just aping the language that some of the FFmpeg members used to use. All that is in the past now, I'm probably the only person left who is annoyed by this, and with this commit I'm putting this decade long problem finally to an end. I just thought I'd express my annoyance about this fucking shitshow one last time. The most intrusive change in this commit is the resample filter, which originally used libavresample. Since the FFmpeg developer refused to enable libavresample by default for drama reasons, and the API was slightly different, so the filter used some big preprocessor mess to make it compatible to libswresample. All that falls away now. The simplification to the build system is also significant.
Diffstat (limited to 'video/img_format.c')
-rw-r--r--video/img_format.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/video/img_format.c b/video/img_format.c
index a21ba6f9cb..63fdb34898 100644
--- a/video/img_format.c
+++ b/video/img_format.c
@@ -377,10 +377,8 @@ enum mp_component_type mp_imgfmt_get_component_type(int imgfmt)
if (!pixdesc || (pixdesc->flags & AV_PIX_FMT_FLAG_HWACCEL))
return MP_COMPONENT_TYPE_UNKNOWN;
-#if LIBAVUTIL_VERSION_MICRO >= 100
if (pixdesc->flags & AV_PIX_FMT_FLAG_FLOAT)
return MP_COMPONENT_TYPE_FLOAT;
-#endif
return MP_COMPONENT_TYPE_UINT;
}
@@ -509,10 +507,8 @@ bool mp_get_regular_imgfmt(struct mp_regular_imgfmt *dst, int imgfmt)
res.chroma_w = 1 << pixdesc->log2_chroma_w;
res.chroma_h = 1 << pixdesc->log2_chroma_h;
-#if LIBAVUTIL_VERSION_MICRO >= 100
if (pixdesc->flags & AV_PIX_FMT_FLAG_BAYER)
return false; // it's satan himself
-#endif
res.forced_csp = mp_imgfmt_get_forced_csp(imgfmt);
@@ -574,10 +570,6 @@ int mp_imgfmt_find(int xs, int ys, int planes, int component_bits, int flags)
return 0;
}
-#if LIBAVUTIL_VERSION_MICRO < 100
-#define avcodec_find_best_pix_fmt_of_list avcodec_find_best_pix_fmt2
-#endif
-
// Compare the dst image formats, and return the one which can carry more data
// (e.g. higher depth, more color components, lower chroma subsampling, etc.),
// with respect to what is required to keep most of the src format.