| 1883 | } |
| 1884 | |
| 1885 | static void frame_start(MPVMainEncContext *const m) |
| 1886 | { |
| 1887 | MPVEncContext *const s = &m->s; |
| 1888 | |
| 1889 | s->c.cur_pic.ptr->f->pict_type = s->c.pict_type; |
| 1890 | |
| 1891 | if (s->c.pict_type != AV_PICTURE_TYPE_B) { |
| 1892 | ff_mpv_replace_picture(&s->c.last_pic, &s->c.next_pic); |
| 1893 | ff_mpv_replace_picture(&s->c.next_pic, &s->c.cur_pic); |
| 1894 | } |
| 1895 | |
| 1896 | av_assert2(!!m->noise_reduction == !!s->dct_error_sum); |
| 1897 | if (s->dct_error_sum) { |
| 1898 | update_noise_reduction(m); |
| 1899 | } |
| 1900 | } |
| 1901 | |
| 1902 | int ff_mpv_encode_picture(AVCodecContext *avctx, AVPacket *pkt, |
| 1903 | const AVFrame *pic_arg, int *got_packet) |
no test coverage detected