comparison mpeg12.c @ 924:3814e9115672 libavcodec

cleanup / messup? fixes 20% speedloss bug removes redundant variables from MpegEncContext release buffers in avcodec_flush_buffers() (untested)
author michaelni
date Mon, 09 Dec 2002 00:29:17 +0000
parents f9e54ade14a1
children 7fccaa0d699d
comparison
equal deleted inserted replaced
923:3b5d9ecedc73 924:3814e9115672
1700 if(s->mpeg2) 1700 if(s->mpeg2)
1701 s->qscale >>=1; 1701 s->qscale >>=1;
1702 1702
1703 MPV_frame_end(s); 1703 MPV_frame_end(s);
1704 1704
1705 if (s->pict_type == B_TYPE) { 1705 if (s->pict_type == B_TYPE || s->low_delay) {
1706 *pict= *(AVVideoFrame*)&s->current_picture; 1706 *pict= *(AVVideoFrame*)&s->current_picture;
1707 } else { 1707 } else {
1708 s->picture_number++; 1708 s->picture_number++;
1709 /* latency of 1 frame for I and P frames */ 1709 /* latency of 1 frame for I and P frames */
1710 /* XXX: use another variable than picture_number */ 1710 /* XXX: use another variable than picture_number */
1754 if (s1->mpeg_enc_ctx_allocated) { 1754 if (s1->mpeg_enc_ctx_allocated) {
1755 MPV_common_end(s); 1755 MPV_common_end(s);
1756 } 1756 }
1757 s->width = width; 1757 s->width = width;
1758 s->height = height; 1758 s->height = height;
1759 avctx->has_b_frames= s->has_b_frames = 1; 1759 avctx->has_b_frames= 1;
1760 s->avctx = avctx; 1760 s->avctx = avctx;
1761 avctx->width = width; 1761 avctx->width = width;
1762 avctx->height = height; 1762 avctx->height = height;
1763 if (s->frame_rate_index >= 9) { 1763 if (s->frame_rate_index >= 9) {
1764 /* at least give a valid frame rate (some old mpeg1 have this) */ 1764 /* at least give a valid frame rate (some old mpeg1 have this) */