[SCM] libav/experimental: 112 bytes smaller MpegEncContext
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 15:38:02 UTC 2013
The following commit has been merged in the experimental branch:
commit 9d9e31722ad6dda86da0ccb7eb72004c99057274
Author: Michael Niedermayer <michaelni at gmx.at>
Date: Wed Oct 22 15:36:46 2003 +0000
112 bytes smaller MpegEncContext
Originally committed as revision 2414 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 0af668d..aaf6b87 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -447,6 +447,8 @@ int MPV_common_init(MpegEncContext *s)
CHECKED_ALLOCZ(s->q_inter_matrix, 64*32 * sizeof(int))
CHECKED_ALLOCZ(s->q_intra_matrix16, 64*32*2 * sizeof(uint16_t))
CHECKED_ALLOCZ(s->q_inter_matrix16, 64*32*2 * sizeof(uint16_t))
+ CHECKED_ALLOCZ(s->input_picture, MAX_PICTURE_COUNT * sizeof(Picture*))
+ CHECKED_ALLOCZ(s->reordered_input_picture, MAX_PICTURE_COUNT * sizeof(Picture*))
}
CHECKED_ALLOCZ(s->blocks, 64*6*2 * sizeof(DCTELEM))
@@ -571,6 +573,8 @@ void MPV_common_end(MpegEncContext *s)
av_freep(&s->q_intra_matrix16);
av_freep(&s->q_inter_matrix16);
av_freep(&s->blocks);
+ av_freep(&s->input_picture);
+ av_freep(&s->reordered_input_picture);
for(i=0; i<MAX_PICTURE_COUNT; i++){
free_picture(s, &s->picture[i]);
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index af01cba..40a3bdf 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -302,8 +302,8 @@ typedef struct MpegEncContext {
int linesize; ///< line size, in bytes, may be different from width
int uvlinesize; ///< line size, for chroma in bytes, may be different from width
Picture *picture; ///< main picture buffer
- Picture *input_picture[MAX_PICTURE_COUNT]; ///< next pictures on display order for encoding
- Picture *reordered_input_picture[MAX_PICTURE_COUNT]; ///< pointer to the next pictures in codedorder for encoding
+ Picture **input_picture; ///< next pictures on display order for encoding
+ Picture **reordered_input_picture; ///< pointer to the next pictures in codedorder for encoding
/**
* copy of the previous picture structure.
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list