Changeset 4700
- Timestamp:
- Oct 19, 2010, 6:33:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpipi/trunk/pipi/sequence.c
r4694 r4700 92 92 ff->fmt_ctx->filename[sizeof(ff->fmt_ctx->filename) - 1] = '\0'; 93 93 94 ff->fmt_ctx->oformat = guess_format(NULL, file, NULL);94 ff->fmt_ctx->oformat = av_guess_format(NULL, file, NULL); 95 95 if (!ff->fmt_ctx->oformat) 96 ff->fmt_ctx->oformat = guess_format("mpeg", NULL, NULL);96 ff->fmt_ctx->oformat = av_guess_format("mpeg", NULL, NULL); 97 97 if (!ff->fmt_ctx->oformat) 98 98 goto error; … … 116 116 ff->cod_ctx->time_base.num = 1; 117 117 ff->cod_ctx->time_base.den = fps; 118 ff->cod_ctx->gop_size = fps * 3 / 4; /* empirical */ 118 119 119 ff->cod_ctx->pix_fmt = PIX_FMT_YUV420P; /* send YUV 420 */ 120 120 if (ff->cod_ctx->codec_id == CODEC_ID_MPEG2VIDEO) … … 122 122 if (ff->cod_ctx->codec_id == CODEC_ID_MPEG1VIDEO) 123 123 ff->cod_ctx->mb_decision = 2; 124 if (ff->cod_ctx->codec_id == CODEC_ID_H264) 125 { 126 /* Import x264 slow presets */ 127 ff->cod_ctx->coder_type = 1; 128 ff->cod_ctx->flags |= CODEC_FLAG_LOOP_FILTER; 129 ff->cod_ctx->me_cmp |= FF_CMP_CHROMA; 130 ff->cod_ctx->partitions |= X264_PART_I4X4 | X264_PART_I8X8 131 | X264_PART_P4X4 | X264_PART_P8X8; 132 ff->cod_ctx->me_method = ME_UMH; 133 ff->cod_ctx->me_subpel_quality = 8; 134 ff->cod_ctx->me_range = 16; 135 ff->cod_ctx->gop_size = 250; 136 ff->cod_ctx->keyint_min = 25; 137 ff->cod_ctx->scenechange_threshold = 40; 138 ff->cod_ctx->i_quant_factor = 0.71f; 139 ff->cod_ctx->b_frame_strategy = 2; 140 ff->cod_ctx->qcompress = 0.6f; 141 ff->cod_ctx->qmin = 10; 142 ff->cod_ctx->qmax = 51; 143 ff->cod_ctx->max_qdiff = 4; 144 ff->cod_ctx->max_b_frames = 3; 145 ff->cod_ctx->refs = 5; 146 ff->cod_ctx->directpred = 3; 147 ff->cod_ctx->trellis = 1; 148 ff->cod_ctx->flags2 |= CODEC_FLAG2_BPYRAMID | CODEC_FLAG2_MIXED_REFS 149 | CODEC_FLAG2_WPRED | CODEC_FLAG2_8X8DCT 150 | CODEC_FLAG2_FASTPSKIP; 151 ff->cod_ctx->weighted_p_pred = 2; 152 ff->cod_ctx->rc_lookahead = 50; 153 } 124 154 if (ff->fmt_ctx->oformat->flags & AVFMT_GLOBALHEADER) 125 155 ff->cod_ctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
Note: See TracChangeset
for help on using the changeset viewer.