negative linesize support (so mplayer -flip works)

Originally committed as revision 1395 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2003-01-05 17:59:26 +00:00
parent 369fe5993f
commit f7b47594dc
2 changed files with 5 additions and 3 deletions

View File

@ -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);

View File

@ -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*/