aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-10-22 12:01:21 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-10-22 12:01:21 +0000
commit45686da26db54f1ca7195b360230574f7be3b2f3 (patch)
tree662936a1109d8c76b5dd8d557afe05d42206a5e9 /libavcodec
parent642ccefbc8293b010fafaa9b112051b57aa1af3d (diff)
downloadffmpeg-45686da26db54f1ca7195b360230574f7be3b2f3.tar.gz
move blocks away MpegEncContext (7.4 -> 5.8k)
Originally committed as revision 2413 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c2
-rw-r--r--libavcodec/mpegvideo.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index b0580cb757..0af668d053 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -448,6 +448,7 @@ int MPV_common_init(MpegEncContext *s)
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->blocks, 64*6*2 * sizeof(DCTELEM))
CHECKED_ALLOCZ(s->picture, MAX_PICTURE_COUNT * sizeof(Picture))
@@ -569,6 +570,7 @@ void MPV_common_end(MpegEncContext *s)
av_freep(&s->q_inter_matrix);
av_freep(&s->q_intra_matrix16);
av_freep(&s->q_inter_matrix16);
+ av_freep(&s->blocks);
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 b7eed584f3..af01cba210 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -657,7 +657,7 @@ typedef struct MpegEncContext {
uint8_t *ptr_lastgob;
DCTELEM (*block)[64]; ///< points to one of the following blocks
- DCTELEM blocks[2][6][64] __align8; // for HQ mode we need to keep the best block
+ DCTELEM (*blocks)[6][64]; // for HQ mode we need to keep the best block
int (*decode_mb)(struct MpegEncContext *s, DCTELEM block[6][64]); // used by some codecs to avoid a switch()
#define SLICE_OK 0
#define SLICE_ERROR -1