Mercurial > libavcodec.hg
comparison mpeg12.c @ 844:1bd52b59bcd1 libavcodec
fixing -sameq with mpeg2
author | michaelni |
---|---|
date | Sat, 09 Nov 2002 13:57:54 +0000 |
parents | e460775adb38 |
children | eacc2dd8fd9d |
comparison
equal
deleted
inserted
replaced
843:8c81f1ee9271 | 844:1bd52b59bcd1 |
---|---|
1675 /* end of image */ | 1675 /* end of image */ |
1676 UINT8 **picture; | 1676 UINT8 **picture; |
1677 | 1677 |
1678 MPV_frame_end(s); | 1678 MPV_frame_end(s); |
1679 | 1679 |
1680 /* XXX: incorrect reported qscale for mpeg2 */ | |
1681 if (s->pict_type == B_TYPE) { | 1680 if (s->pict_type == B_TYPE) { |
1682 picture = s->current_picture; | 1681 picture = s->current_picture; |
1683 avctx->quality = s->qscale; | 1682 avctx->quality = s->qscale; |
1684 } else { | 1683 } else { |
1685 /* latency of 1 frame for I and P frames */ | 1684 /* latency of 1 frame for I and P frames */ |
1691 avctx->quality = s->last_qscale; | 1690 avctx->quality = s->last_qscale; |
1692 } | 1691 } |
1693 s->last_qscale = s->qscale; | 1692 s->last_qscale = s->qscale; |
1694 s->picture_number++; | 1693 s->picture_number++; |
1695 } | 1694 } |
1695 if(s->mpeg2) | |
1696 avctx->quality>>=1; | |
1696 if (picture) { | 1697 if (picture) { |
1697 pict->data[0] = picture[0]; | 1698 pict->data[0] = picture[0]; |
1698 pict->data[1] = picture[1]; | 1699 pict->data[1] = picture[1]; |
1699 pict->data[2] = picture[2]; | 1700 pict->data[2] = picture[2]; |
1700 pict->linesize[0] = s->linesize; | 1701 pict->linesize[0] = s->linesize; |