aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-04-30 13:44:29 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-04-30 13:44:29 +0000
commitbf266e195aa8ce938caab674c2b75defbf8db661 (patch)
treef6a9999149b207f5094ede46b2cfa09fd3ee991c /libavcodec/mpegvideo.c
parent26d4f26bb72622a5f8336f763bae75e97eb9217d (diff)
downloadffmpeg-bf266e195aa8ce938caab674c2b75defbf8db661.tar.gz
intra_dc_precission>0 encoding support
Originally committed as revision 3093 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 772775cdad..1fa39e0f1f 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -890,6 +890,7 @@ int MPV_encode_init(AVCodecContext *avctx)
s->quarter_sample= (avctx->flags & CODEC_FLAG_QPEL)!=0;
s->mpeg_quant= avctx->mpeg_quant;
s->rtp_mode= !!avctx->rtp_payload_size;
+ s->intra_dc_precision= avctx->intra_dc_precision;
if (s->gop_size <= 1) {
s->intra_only = 1;
@@ -4009,7 +4010,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
for(i=0; i<3; i++){
/* init last dc values */
/* note: quant matrix value (8) is implied here */
- s->last_dc[i] = 128;
+ s->last_dc[i] = 128 << s->intra_dc_precision;
s->current_picture_ptr->error[i] = 0;
}