mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/mpegvideo_enc: Reindentation
Also try to use loop-scope for iterators. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
b64dfe2bd1
commit
dceb73a22d
|
@ -1480,8 +1480,6 @@ fail:
|
|||
*/
|
||||
static int set_bframe_chain_length(MpegEncContext *s)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* Either nothing to do or can't do anything */
|
||||
if (s->reordered_input_picture[0] || !s->input_picture[0])
|
||||
return 0;
|
||||
|
@ -1510,7 +1508,7 @@ static int set_bframe_chain_length(MpegEncContext *s)
|
|||
int b_frames = 0;
|
||||
|
||||
if (s->avctx->flags & AV_CODEC_FLAG_PASS2) {
|
||||
for (i = 0; i < s->max_b_frames + 1; i++) {
|
||||
for (int i = 0; i < s->max_b_frames + 1; i++) {
|
||||
int pict_num = s->input_picture[0]->display_picture_number + i;
|
||||
|
||||
if (pict_num >= s->rc_context.num_entries)
|
||||
|
@ -1530,6 +1528,7 @@ static int set_bframe_chain_length(MpegEncContext *s)
|
|||
while (b_frames && !s->input_picture[b_frames])
|
||||
b_frames--;
|
||||
} else if (s->b_frame_strategy == 1) {
|
||||
int i;
|
||||
for (i = 1; i < s->max_b_frames + 1; i++) {
|
||||
if (s->input_picture[i] &&
|
||||
s->input_picture[i]->b_frame_score == 0) {
|
||||
|
@ -1563,7 +1562,7 @@ static int set_bframe_chain_length(MpegEncContext *s)
|
|||
|
||||
emms_c();
|
||||
|
||||
for (i = b_frames - 1; i >= 0; i--) {
|
||||
for (int i = b_frames - 1; i >= 0; i--) {
|
||||
int type = s->input_picture[i]->f->pict_type;
|
||||
if (type && type != AV_PICTURE_TYPE_B)
|
||||
b_frames = i;
|
||||
|
@ -1594,7 +1593,7 @@ static int set_bframe_chain_length(MpegEncContext *s)
|
|||
s->reordered_input_picture[0]->f->pict_type = AV_PICTURE_TYPE_P;
|
||||
s->reordered_input_picture[0]->coded_picture_number =
|
||||
s->coded_picture_number++;
|
||||
for (i = 0; i < b_frames; i++) {
|
||||
for (int i = 0; i < b_frames; i++) {
|
||||
s->reordered_input_picture[i + 1] = s->input_picture[i];
|
||||
s->reordered_input_picture[i + 1]->f->pict_type =
|
||||
AV_PICTURE_TYPE_B;
|
||||
|
|
Loading…
Reference in New Issue