# HG changeset patch # User koorogi # Date 1270104076 0 # Node ID 1025297f5624dec6083e2d7673d5421b4be032e8 # Parent 214a2a8b9e587f962993b8fc88cb2367601a48fe Add function to export EDGE_WIDTH from libavcodec. diff -r 214a2a8b9e58 -r 1025297f5624 avcodec.h --- a/avcodec.h Wed Mar 31 21:10:52 2010 +0000 +++ b/avcodec.h Thu Apr 01 06:41:16 2010 +0000 @@ -30,7 +30,7 @@ #include "libavutil/avutil.h" #define LIBAVCODEC_VERSION_MAJOR 52 -#define LIBAVCODEC_VERSION_MINOR 65 +#define LIBAVCODEC_VERSION_MINOR 66 #define LIBAVCODEC_VERSION_MICRO 0 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ @@ -3290,6 +3290,15 @@ int avcodec_default_get_buffer(AVCodecContext *s, AVFrame *pic); void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic); int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic); + +/** + * Returns 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. + */ +unsigned avcodec_get_edge_width(void); /** * Modifies 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 -r 214a2a8b9e58 -r 1025297f5624 utils.c --- a/utils.c Wed Mar 31 21:10:52 2010 +0000 +++ b/utils.c Thu Apr 01 06:41:16 2010 +0000 @@ -101,6 +101,11 @@ } #endif +unsigned avcodec_get_edge_width(void) +{ + return EDGE_WIDTH; +} + void avcodec_set_dimensions(AVCodecContext *s, int width, int height){ s->coded_width = width; s->coded_height= height;