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
1515
1616 API changes, most recent first:
1717
18+2014-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+
1823 2014-01-19 - xxxxxxx - lavf 55.25.100 - avformat.h
1924 Add avformat_get_mov_video_tags() and avformat_get_mov_audio_tags().
2025
libavcodec/avcodec.h+13−8
@@ -729,7 +729,13 @@ typedef struct RcOverride{ · 728 unmodified lines
729729 #define CODEC_FLAG_PASS1 0x0200 ///< Use internal 2pass ratecontrol in first pass mode.
730730 #define CODEC_FLAG_PASS2 0x0400 ///< Use internal 2pass ratecontrol in second pass mode.
731731 #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
733739 #define CODEC_FLAG_PSNR 0x8000 ///< error[?] variables will be set during encoding.
734740 #define CODEC_FLAG_TRUNCATED 0x00010000 /** Input bitstream might be truncated at a random
735741 location instead of only at frame boundaries. */
@@ -2152,9 +2158,6 @@ typedef struct AVCodecContext { · 1416 unmodified lines
21522158 * If AV_GET_BUFFER_FLAG_REF is set in flags then the frame may be reused
21532159 * (read and/or written to if it is writable) later by libavcodec.
21542160 *
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− *
21582161 * avcodec_align_dimensions2() should be used to find the required width and
21592162 * height, as they normally need to be rounded up to the next multiple of 16.
21602163 *
@@ -3738,14 +3741,20 @@ attribute_deprecated int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame · 1577 unmodified lines
37383741 */
37393742 int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
37403743
3744+#if FF_API_EMU_EDGE
37413745 /**
37423746 * Return the amount of padding in pixels which the get_buffer callback must
37433747 * provide around the edge of the image for codecs which do not have the
37443748 * CODEC_FLAG_EMU_EDGE flag.
37453749 *
37463750 * @return Required padding in pixels.
3751+ *
3752+ * @deprecated CODEC_FLAG_EMU_EDGE is deprecated, so this function is no longer
3753+ * needed
37473754 */
3755+attribute_deprecated
37483756 unsigned avcodec_get_edge_width(void);
3757+#endif
37493758
37503759 /**
37513760 * 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
37533762 * padding.
37543763 *
37553764 * 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.
37583765 */
37593766 void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
37603767
@@ -3764,8 +3771,6 @@ void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height); · 3 unmodified lines
37643771 * line sizes are a multiple of the respective linesize_align[i].
37653772 *
37663773 * 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.
37693774 */
37703775 void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
37713776 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
222222 codec->init_static_data(codec);
223223 }
224224
225+#if FF_API_EMU_EDGE
225226 unsigned avcodec_get_edge_width(void)
226227 {
227228 return EDGE_WIDTH;
228229 }
230+#endif
229231
230232 #if FF_API_SET_DIMENSIONS
231233 void 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
14911493 }
14921494 }
14931495 }
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
14941501 }
14951502 end:
14961503 ff_unlock_avcodec();
libavcodec/version.h+4−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
3030
3131 #define LIBAVCODEC_VERSION_MAJOR 55
3232 #define LIBAVCODEC_VERSION_MINOR 48
33−#define LIBAVCODEC_VERSION_MICRO 101
33+#define LIBAVCODEC_VERSION_MICRO 102
3434
3535 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
3636 LIBAVCODEC_VERSION_MINOR, \
@@ -138,5 +138,8 @@ · 101 unmodified lines
138138 #ifndef FF_API_NEG_LINESIZES
139139 #define FF_API_NEG_LINESIZES (LIBAVCODEC_VERSION_MAJOR < 56)
140140 #endif
141+#ifndef FF_API_EMU_EDGE
142+#define FF_API_EMU_EDGE (LIBAVCODEC_VERSION_MAJOR < 56)
143+#endif
141144
142145 #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