Mercurial > libavformat.hg
changeset 4456:833d30447d64 libavformat
rename wrongly named b_per_gop to b_per_i_or_p according to specs
author | bcoudurier |
---|---|
date | Wed, 11 Feb 2009 23:49:54 +0000 |
parents | 01e54ebe6ef7 |
children | 6ed62b8257dd |
files | gxfenc.c |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/gxfenc.c Wed Feb 11 23:34:57 2009 +0000 +++ b/gxfenc.c Wed Feb 11 23:49:54 2009 +0000 @@ -43,7 +43,7 @@ int pframes; int bframes; int p_per_gop; - int b_per_gop; + int b_per_i_or_p; ///< number of B frames per I frame or P frame int first_gop_closed; int64_t current_dts; int dts_delay; @@ -176,11 +176,11 @@ if (ctx->pframes % ctx->iframes) ctx->p_per_gop++; if (ctx->pframes) - ctx->b_per_gop = ctx->bframes / ctx->pframes; + ctx->b_per_i_or_p = ctx->bframes / ctx->pframes; if (ctx->p_per_gop > 9) ctx->p_per_gop = 9; /* ensure value won't take more than one char */ - if (ctx->b_per_gop > 9) - ctx->b_per_gop = 9; /* ensure value won't take more than one char */ + if (ctx->b_per_i_or_p > 9) + ctx->b_per_i_or_p = 9; /* ensure value won't take more than one char */ } if (ctx->codec->height == 512 || ctx->codec->height == 608) starting_line = 7; // VBI @@ -191,7 +191,7 @@ size = snprintf(buffer, 1024, "Ver 1\nBr %.6f\nIpg 1\nPpi %d\nBpiop %d\n" "Pix 0\nCf %d\nCg %d\nSl %d\nnl16 %d\nVi 1\nf1 1\n", - (float)ctx->codec->bit_rate, ctx->p_per_gop, ctx->b_per_gop, + (float)ctx->codec->bit_rate, ctx->p_per_gop, ctx->b_per_i_or_p, ctx->codec->pix_fmt == PIX_FMT_YUV422P ? 2 : 1, ctx->first_gop_closed == 1, starting_line, ctx->codec->height / 16); put_byte(pb, TRACK_MPG_AUX); @@ -441,7 +441,7 @@ put_le32(pb, 3); /* top = 1, bottom = 2, frame = 3, unknown = 0 */ put_le32(pb, 1); /* I picture per GOP */ put_le32(pb, stream->p_per_gop); - put_le32(pb, stream->b_per_gop); + put_le32(pb, stream->b_per_i_or_p); if (stream->codec->codec_id == CODEC_ID_MPEG2VIDEO) put_le32(pb, 2); else if (stream->codec->codec_id == CODEC_ID_MPEG1VIDEO)