comparison mpegvideo.c @ 1188:c5f239397e90 libavcodec

check validity of some flags
author michaelni
date Mon, 14 Apr 2003 14:06:21 +0000
parents fea03d2c4946
children 818e75da4edd
comparison
equal deleted inserted replaced
1187:f3c659bfdb8e 1188:c5f239397e90
584 || s->avctx->p_masking) 584 || s->avctx->p_masking)
585 && !s->fixed_qscale; 585 && !s->fixed_qscale;
586 586
587 s->progressive_sequence= !(avctx->flags & CODEC_FLAG_INTERLACED_DCT); 587 s->progressive_sequence= !(avctx->flags & CODEC_FLAG_INTERLACED_DCT);
588 588
589 if((s->flags & CODEC_FLAG_4MV) && s->codec_id != CODEC_ID_MPEG4){
590 fprintf(stderr, "4MV not supporetd by codec\n");
591 return -1;
592 }
593
594 if(s->quarter_sample && s->codec_id != CODEC_ID_MPEG4){
595 fprintf(stderr, "qpel not supporetd by codec\n");
596 return -1;
597 }
598
599 if(s->data_partitioning && s->codec_id != CODEC_ID_MPEG4){
600 fprintf(stderr, "data partitioning not supporetd by codec\n");
601 return -1;
602 }
603
604 if(s->max_b_frames && (s->codec_id != CODEC_ID_MPEG4 || s->codec_id != CODEC_ID_MPEG1VIDEO)){
605 fprintf(stderr, "b frames not supporetd by codec\n");
606 return -1;
607 }
608
609 if(s->mpeg_quant && s->codec_id != CODEC_ID_MPEG4){ //FIXME mpeg2 uses that too
610 fprintf(stderr, "mpeg2 style quantization not supporetd by codec\n");
611 return -1;
612 }
613
589 if(s->codec_id==CODEC_ID_MJPEG){ 614 if(s->codec_id==CODEC_ID_MJPEG){
590 s->intra_quant_bias= 1<<(QUANT_BIAS_SHIFT-1); //(a + x/2)/x 615 s->intra_quant_bias= 1<<(QUANT_BIAS_SHIFT-1); //(a + x/2)/x
591 s->inter_quant_bias= 0; 616 s->inter_quant_bias= 0;
592 }else if(s->mpeg_quant || s->codec_id==CODEC_ID_MPEG1VIDEO){ 617 }else if(s->mpeg_quant || s->codec_id==CODEC_ID_MPEG1VIDEO){
593 s->intra_quant_bias= 3<<(QUANT_BIAS_SHIFT-3); //(a + x*3/8)/x 618 s->intra_quant_bias= 3<<(QUANT_BIAS_SHIFT-3); //(a + x*3/8)/x