Commit e15e1088 authored by Derek Buitenhuis's avatar Derek Buitenhuis

Merge commit 'd43a165b'

* commit 'd43a165b':
  imgconvert: Add the proper API guards to a deprecated function
Merged-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parents fa6c7ccc d43a165b
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "libavutil/internal.h" #include "libavutil/internal.h"
#include "libavutil/imgutils.h" #include "libavutil/imgutils.h"
#if FF_API_GETCHROMA
void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift) void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
{ {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt); const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
...@@ -41,6 +42,7 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int ...@@ -41,6 +42,7 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int
*h_shift = desc->log2_chroma_w; *h_shift = desc->log2_chroma_w;
*v_shift = desc->log2_chroma_h; *v_shift = desc->log2_chroma_h;
} }
#endif
int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt,
enum AVPixelFormat src_pix_fmt, enum AVPixelFormat src_pix_fmt,
......
...@@ -60,6 +60,8 @@ ...@@ -60,6 +60,8 @@
#endif #endif
#ifndef FF_API_AVCODEC_RESAMPLE #ifndef FF_API_AVCODEC_RESAMPLE
#define FF_API_AVCODEC_RESAMPLE FF_API_AUDIO_CONVERT #define FF_API_AVCODEC_RESAMPLE FF_API_AUDIO_CONVERT
#ifndef FF_API_GETCHROMA
#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 58)
#endif #endif
#ifndef FF_API_MISSING_SAMPLE #ifndef FF_API_MISSING_SAMPLE
#define FF_API_MISSING_SAMPLE (LIBAVCODEC_VERSION_MAJOR < 58) #define FF_API_MISSING_SAMPLE (LIBAVCODEC_VERSION_MAJOR < 58)
......
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