summaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo.c5
-rw-r--r--libavcodec/mpegvideo.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index ce3c435..8206df4 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -382,7 +382,8 @@ int MPV_common_init(MpegEncContext *s)
+ (toupper((s->avctx->fourcc>>16)&0xFF)<<16)
+ (toupper((s->avctx->fourcc>>24)&0xFF)<<24);
- CHECKED_ALLOCZ(s->edge_emu_buffer, (s->width+64)*2*17*2); //(width + edge + align)*interlaced*MBsize*tolerance
+ CHECKED_ALLOCZ(s->allocated_edge_emu_buffer, (s->width+64)*2*17*2); //(width + edge + align)*interlaced*MBsize*tolerance
+ s->edge_emu_buffer= s->allocated_edge_emu_buffer + (s->width+64)*2*17;
s->avctx->coded_frame= (AVFrame*)&s->current_picture;
@@ -513,7 +514,7 @@ void MPV_common_end(MpegEncContext *s)
av_freep(&s->bitstream_buffer);
av_freep(&s->tex_pb_buffer);
av_freep(&s->pb2_buffer);
- av_freep(&s->edge_emu_buffer);
+ av_freep(&s->allocated_edge_emu_buffer); s->edge_emu_buffer= NULL;
av_freep(&s->co_located_type_table);
av_freep(&s->field_mv_table);
av_freep(&s->field_select_table);
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 6d794d8..e690981 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -232,7 +232,8 @@ typedef struct MpegEncContext {
UINT8 *mbintra_table; /* used to avoid setting {ac, dc, cbp}-pred stuff to zero on inter MB decoding */
UINT8 *cbp_table; /* used to store cbp, ac_pred for partitioned decoding */
UINT8 *pred_dir_table; /* used to store pred_dir for partitioned decoding */
- UINT8 *edge_emu_buffer;
+ uint8_t *allocated_edge_emu_buffer;
+ uint8_t *edge_emu_buffer; /* points into the middle of allocated_edge_emu_buffer */
int qscale; /* QP */
float frame_qscale; /* qscale from the frame level rc FIXME remove*/
OpenPOWER on IntegriCloud