History

Merge remote-tracking branch 'qatar/master'

* qatar/master: lavc: deprecate CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width(). Conflicts: doc/APIchanges libavcodec/utils.c libavcodec/version.h

Michael Niedermayer committed 12 years ago

Commit eef74b22 parents 8001e9f 93c553c4 files · +29 −9Browse files

Unified · Split

4 files
  1. doc/APIchanges +5 −0
  2. libavcodec/avcodec.h +13 −8
  3. libavcodec/utils.c +7 −0
  4. libavcodec/version.h +4 −1
doc/APIchanges+5−0
@@ -15,6 +15,11 @@ libavutil: 2012-10-22 · 14 unmodified lines
15 15
16API changes, most recent first:16API changes, most recent first:
17 17
182014-01-xx - xxxxxxx - lavc 55.32.1 - avcodec.h
19 Edges are not required anymore on video buffers allocated by get_buffer2()
20 (i.e. as if the CODEC_FLAG_EMU_EDGE flag was always on). Deprecate
21 CODEC_FLAG_EMU_EDGE and avcodec_get_edge_width().
22
182014-01-19 - xxxxxxx - lavf 55.25.100 - avformat.h232014-01-19 - xxxxxxx - lavf 55.25.100 - avformat.h
19 Add avformat_get_mov_video_tags() and avformat_get_mov_audio_tags().24 Add avformat_get_mov_video_tags() and avformat_get_mov_audio_tags().
20 25
libavcodec/avcodec.h+13−8
@@ -729,7 +729,13 @@ typedef struct RcOverride{ · 728 unmodified lines
729#define CODEC_FLAG_PASS1 0x0200 ///< Use internal 2pass ratecontrol in first pass mode.729#define CODEC_FLAG_PASS1 0x0200 ///< Use internal 2pass ratecontrol in first pass mode.
730#define CODEC_FLAG_PASS2 0x0400 ///< Use internal 2pass ratecontrol in second pass mode.730#define CODEC_FLAG_PASS2 0x0400 ///< Use internal 2pass ratecontrol in second pass mode.
731#define CODEC_FLAG_GRAY 0x2000 ///< Only decode/encode grayscale.731#define CODEC_FLAG_GRAY 0x2000 ///< Only decode/encode grayscale.
732#define CODEC_FLAG_EMU_EDGE 0x4000 ///< Don't draw edges.732#if FF_API_EMU_EDGE
733/**
734 * @deprecated edges are not used/required anymore. I.e. this flag is now always
735 * set.
736 */
737#define CODEC_FLAG_EMU_EDGE 0x4000
738#endif
733#define CODEC_FLAG_PSNR 0x8000 ///< error[?] variables will be set during encoding.739#define CODEC_FLAG_PSNR 0x8000 ///< error[?] variables will be set during encoding.
734#define CODEC_FLAG_TRUNCATED 0x00010000 /** Input bitstream might be truncated at a random740#define CODEC_FLAG_TRUNCATED 0x00010000 /** Input bitstream might be truncated at a random
735 location instead of only at frame boundaries. */741 location instead of only at frame boundaries. */
@@ -2152,9 +2158,6 @@ typedef struct AVCodecContext { · 1416 unmodified lines
2152 * If AV_GET_BUFFER_FLAG_REF is set in flags then the frame may be reused2158 * If AV_GET_BUFFER_FLAG_REF is set in flags then the frame may be reused
2153 * (read and/or written to if it is writable) later by libavcodec.2159 * (read and/or written to if it is writable) later by libavcodec.
2154 *2160 *
2155 * If CODEC_FLAG_EMU_EDGE is not set in s->flags, the buffer must contain an
2156 * edge of the size returned by avcodec_get_edge_width() on all sides.
2157 *
2158 * avcodec_align_dimensions2() should be used to find the required width and2161 * avcodec_align_dimensions2() should be used to find the required width and
2159 * height, as they normally need to be rounded up to the next multiple of 16.2162 * height, as they normally need to be rounded up to the next multiple of 16.
2160 *2163 *
@@ -3738,14 +3741,20 @@ attribute_deprecated int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame · 1577 unmodified lines
3738 */3741 */
3739int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);3742int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
3740 3743
3744#if FF_API_EMU_EDGE
3741/**3745/**
3742 * Return the amount of padding in pixels which the get_buffer callback must3746 * Return the amount of padding in pixels which the get_buffer callback must
3743 * provide around the edge of the image for codecs which do not have the3747 * provide around the edge of the image for codecs which do not have the
3744 * CODEC_FLAG_EMU_EDGE flag.3748 * CODEC_FLAG_EMU_EDGE flag.
3745 *3749 *
3746 * @return Required padding in pixels.3750 * @return Required padding in pixels.
3751 *
3752 * @deprecated CODEC_FLAG_EMU_EDGE is deprecated, so this function is no longer
3753 * needed
3747 */3754 */
3755attribute_deprecated
3748unsigned avcodec_get_edge_width(void);3756unsigned avcodec_get_edge_width(void);
3757#endif
3749 3758
3750/**3759/**
3751 * Modify width and height values so that they will result in a memory3760 * Modify width and height values so that they will result in a memory
@@ -3753,8 +3762,6 @@ unsigned avcodec_get_edge_width(void); · 1 unmodified line
3753 * padding.3762 * padding.
3754 *3763 *
3755 * May only be used if a codec with CODEC_CAP_DR1 has been opened.3764 * May only be used if a codec with CODEC_CAP_DR1 has been opened.
3756 * If CODEC_FLAG_EMU_EDGE is not set, the dimensions must have been increased
3757 * according to avcodec_get_edge_width() before.
3758 */3765 */
3759void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);3766void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
3760 3767
@@ -3764,8 +3771,6 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height); · 3 unmodified lines
3764 * line sizes are a multiple of the respective linesize_align[i].3771 * line sizes are a multiple of the respective linesize_align[i].
3765 *3772 *
3766 * May only be used if a codec with CODEC_CAP_DR1 has been opened.3773 * May only be used if a codec with CODEC_CAP_DR1 has been opened.
3767 * If CODEC_FLAG_EMU_EDGE is not set, the dimensions must have been increased
3768 * according to avcodec_get_edge_width() before.
3769 */3774 */
3770void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,3775void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
3771 int linesize_align[AV_NUM_DATA_POINTERS]);3776 int linesize_align[AV_NUM_DATA_POINTERS]);
libavcodec/utils.c+7−0
@@ -222,10 +222,12 @@ av_cold void avcodec_register(AVCodec *codec) · 221 unmodified lines
222 codec->init_static_data(codec);222 codec->init_static_data(codec);
223}223}
224 224
225#if FF_API_EMU_EDGE
225unsigned avcodec_get_edge_width(void)226unsigned avcodec_get_edge_width(void)
226{227{
227 return EDGE_WIDTH;228 return EDGE_WIDTH;
228}229}
230#endif
229 231
230#if FF_API_SET_DIMENSIONS232#if FF_API_SET_DIMENSIONS
231void avcodec_set_dimensions(AVCodecContext *s, int width, int height)233void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
@@ -1491,6 +1493,11 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code · 1259 unmodified lines
1491 }1493 }
1492 }1494 }
1493 }1495 }
1496
1497#if FF_API_EMU_EDGE
1498 /* force the emu edge flag on, since it's now always active */
1499 avctx->flags |= CODEC_FLAG_EMU_EDGE;
1500#endif
1494 }1501 }
1495end:1502end:
1496 ff_unlock_avcodec();1503 ff_unlock_avcodec();
libavcodec/version.h+4−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30 30
31#define LIBAVCODEC_VERSION_MAJOR 5531#define LIBAVCODEC_VERSION_MAJOR 55
32#define LIBAVCODEC_VERSION_MINOR 4832#define LIBAVCODEC_VERSION_MINOR 48
33#define LIBAVCODEC_VERSION_MICRO 10133#define LIBAVCODEC_VERSION_MICRO 102
34 34
35#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \35#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
36 LIBAVCODEC_VERSION_MINOR, \36 LIBAVCODEC_VERSION_MINOR, \
@@ -138,5 +138,8 @@ · 101 unmodified lines
138#ifndef FF_API_NEG_LINESIZES138#ifndef FF_API_NEG_LINESIZES
139#define FF_API_NEG_LINESIZES (LIBAVCODEC_VERSION_MAJOR < 56)139#define FF_API_NEG_LINESIZES (LIBAVCODEC_VERSION_MAJOR < 56)
140#endif140#endif
141#ifndef FF_API_EMU_EDGE
142#define FF_API_EMU_EDGE (LIBAVCODEC_VERSION_MAJOR < 56)
143#endif
141 144
142#endif /* AVCODEC_VERSION_H */145#endif /* AVCODEC_VERSION_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t