summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-15 21:27:05 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-15 21:27:10 +0100
commit38c3ffbd55deb91622a58d8e20b15d263aadf131 (patch)
tree75c675e884aa74af613d4cf35d32b151f5844bc7 /libavcodec
parent0a3ffcfc8224d38b3fe635d243ff1ec74df17c84 (diff)
parentd75190aa93206c02cb4f18a66d2c927d6a0198e1 (diff)
Merge commit 'd75190aa93206c02cb4f18a66d2c927d6a0198e1'
* commit 'd75190aa93206c02cb4f18a66d2c927d6a0198e1': mpegvideo: move REBASE_PICTURE where it is used Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264_slice.c2
-rw-r--r--libavcodec/mpegvideo.c5
-rw-r--r--libavcodec/mpegvideo.h5
3 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 53f61caa7d..216e96394d 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -443,7 +443,7 @@ static void clone_tables(H264Context *dst, H264Context *src, int i)
}
#define IN_RANGE(a, b, size) (((a) >= (b)) && ((a) < ((b) + (size))))
-#undef REBASE_PICTURE
+
#define REBASE_PICTURE(pic, new_ctx, old_ctx) \
(((pic) && (pic) >= (old_ctx)->DPB && \
(pic) < (old_ctx)->DPB + H264_MAX_PICTURE_COUNT) ? \
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 35a10b9c0b..ce4fa59b54 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1016,6 +1016,11 @@ do {\
UPDATE_PICTURE(last_picture);
UPDATE_PICTURE(next_picture);
+#define REBASE_PICTURE(pic, new_ctx, old_ctx) \
+ ((pic && pic >= old_ctx->picture && \
+ pic < old_ctx->picture + MAX_PICTURE_COUNT) ? \
+ &new_ctx->picture[pic - old_ctx->picture] : NULL)
+
s->last_picture_ptr = REBASE_PICTURE(s1->last_picture_ptr, s, s1);
s->current_picture_ptr = REBASE_PICTURE(s1->current_picture_ptr, s, s1);
s->next_picture_ptr = REBASE_PICTURE(s1->next_picture_ptr, s, s1);
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 266e971f8c..c39b228708 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -681,11 +681,6 @@ typedef struct MpegEncContext {
AVFrame *tmp_frames[MAX_B_FRAMES + 2];
} MpegEncContext;
-#define REBASE_PICTURE(pic, new_ctx, old_ctx) \
- ((pic && pic >= old_ctx->picture && \
- pic < old_ctx->picture + MAX_PICTURE_COUNT) ? \
- &new_ctx->picture[pic - old_ctx->picture] : NULL)
-
/* mpegvideo_enc common options */
#define FF_MPV_FLAG_SKIP_RD 0x0001
#define FF_MPV_FLAG_STRICT_GOP 0x0002