Showing the changes to libavfilter (1 of 1 file). Show all
Unified · Split
| @@ -396,12 +396,12 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *picref) · 395 unmodified lines | |||
| 396 | copy_picture_field(tinterlace, out->data, out->linesize, | 396 | copy_picture_field(tinterlace, out->data, out->linesize, |
| 397 | (const uint8_t **)cur->data, cur->linesize, | 397 | (const uint8_t **)cur->data, cur->linesize, |
| 398 | inlink->format, inlink->w, inlink->h, | 398 | inlink->format, inlink->w, inlink->h, |
| 399 | FIELD_UPPER_AND_LOWER, 1, tinterlace->mode == MODE_MERGEX2 ? inlink->frame_count_out & 1 ? FIELD_LOWER : FIELD_UPPER : FIELD_UPPER, tinterlace->flags); | 399 | FIELD_UPPER_AND_LOWER, 1, tinterlace->mode == MODE_MERGEX2 ? (1 + inlink->frame_count_out) & 1 ? FIELD_LOWER : FIELD_UPPER : FIELD_UPPER, tinterlace->flags); |
| 400 | /* write even frame lines into the lower field of the new frame */ | 400 | /* write even frame lines into the lower field of the new frame */ |
| 401 | copy_picture_field(tinterlace, out->data, out->linesize, | 401 | copy_picture_field(tinterlace, out->data, out->linesize, |
| 402 | (const uint8_t **)next->data, next->linesize, | 402 | (const uint8_t **)next->data, next->linesize, |
| 403 | inlink->format, inlink->w, inlink->h, | 403 | inlink->format, inlink->w, inlink->h, |
| 404 | FIELD_UPPER_AND_LOWER, 1, tinterlace->mode == MODE_MERGEX2 ? inlink->frame_count_out & 1 ? FIELD_UPPER : FIELD_LOWER : FIELD_LOWER, tinterlace->flags); | 404 | FIELD_UPPER_AND_LOWER, 1, tinterlace->mode == MODE_MERGEX2 ? (1 + inlink->frame_count_out) & 1 ? FIELD_UPPER : FIELD_LOWER : FIELD_LOWER, tinterlace->flags); |
| 405 | if (tinterlace->mode != MODE_MERGEX2) | 405 | if (tinterlace->mode != MODE_MERGEX2) |
| 406 | av_frame_free(&tinterlace->next); | 406 | av_frame_free(&tinterlace->next); |
| 407 | break; | 407 | break; |