1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit 'd43a165bda0eae95f4c7a168c7d13d94966c1a09'

* commit 'd43a165bda0eae95f4c7a168c7d13d94966c1a09':
  imgconvert: Add the proper API guards to a deprecated function

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This commit is contained in:
Derek Buitenhuis 2016-01-27 20:06:01 +00:00
commit e15e108885
2 changed files with 4 additions and 0 deletions

View File

@ -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
*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,

View File

@ -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)