Unified · Split
| @@ -727,7 +727,7 @@ do {\ · 726 unmodified lines | |||
| 727 | return 0; | 727 | return 0; |
| 728 | } | 728 | } |
| 729 | 729 | ||
| 730 | int ff_mpeg_ref_picture(MpegEncContext *s, Picture *dst, Picture *src) | 730 | int ff_mpeg_ref_picture(AVCodecContext *avctx, Picture *dst, Picture *src) |
| 731 | { | 731 | { |
| 732 | int ret; | 732 | int ret; |
| 733 | 733 | ||
| @@ -761,7 +761,7 @@ int ff_mpeg_ref_picture(MpegEncContext *s, Picture *dst, Picture *src) · 27 unmodified lines | |||
| 761 | 761 | ||
| 762 | return 0; | 762 | return 0; |
| 763 | fail: | 763 | fail: |
| 764 | ff_mpeg_unref_picture(s->avctx, dst); | 764 | ff_mpeg_unref_picture(avctx, dst); |
| 765 | return ret; | 765 | return ret; |
| 766 | } | 766 | } |
| 767 | 767 | ||
| @@ -937,7 +937,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, · 169 unmodified lines | |||
| 937 | for (i = 0; i < MAX_PICTURE_COUNT; i++) { | 937 | for (i = 0; i < MAX_PICTURE_COUNT; i++) { |
| 938 | ff_mpeg_unref_picture(s->avctx, &s->picture[i]); | 938 | ff_mpeg_unref_picture(s->avctx, &s->picture[i]); |
| 939 | if (s1->picture[i].f->buf[0] && | 939 | if (s1->picture[i].f->buf[0] && |
| 940 | (ret = ff_mpeg_ref_picture(s, &s->picture[i], &s1->picture[i])) < 0) | 940 | (ret = ff_mpeg_ref_picture(s->avctx, &s->picture[i], &s1->picture[i])) < 0) |
| 941 | return ret; | 941 | return ret; |
| 942 | } | 942 | } |
| 943 | 943 | ||
| @@ -945,7 +945,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst, · 1 unmodified line | |||
| 945 | do {\ | 945 | do {\ |
| 946 | ff_mpeg_unref_picture(s->avctx, &s->pic);\ | 946 | ff_mpeg_unref_picture(s->avctx, &s->pic);\ |
| 947 | if (s1->pic.f->buf[0])\ | 947 | if (s1->pic.f->buf[0])\ |
| 948 | ret = ff_mpeg_ref_picture(s, &s->pic, &s1->pic);\ | 948 | ret = ff_mpeg_ref_picture(s->avctx, &s->pic, &s1->pic);\ |
| 949 | else\ | 949 | else\ |
| 950 | ret = update_picture_tables(&s->pic, &s1->pic);\ | 950 | ret = update_picture_tables(&s->pic, &s1->pic);\ |
| 951 | if (ret < 0)\ | 951 | if (ret < 0)\ |
| @@ -1741,7 +1741,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 789 unmodified lines | |||
| 1741 | // s->current_picture_ptr->quality = s->new_picture_ptr->quality; | 1741 | // s->current_picture_ptr->quality = s->new_picture_ptr->quality; |
| 1742 | s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; | 1742 | s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; |
| 1743 | 1743 | ||
| 1744 | if ((ret = ff_mpeg_ref_picture(s, &s->current_picture, | 1744 | if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture, |
| 1745 | s->current_picture_ptr)) < 0) | 1745 | s->current_picture_ptr)) < 0) |
| 1746 | return ret; | 1746 | return ret; |
| 1747 | 1747 | ||
| @@ -1822,14 +1822,14 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx) · 74 unmodified lines | |||
| 1822 | if (s->last_picture_ptr) { | 1822 | if (s->last_picture_ptr) { |
| 1823 | ff_mpeg_unref_picture(s->avctx, &s->last_picture); | 1823 | ff_mpeg_unref_picture(s->avctx, &s->last_picture); |
| 1824 | if (s->last_picture_ptr->f->buf[0] && | 1824 | if (s->last_picture_ptr->f->buf[0] && |
| 1825 | (ret = ff_mpeg_ref_picture(s, &s->last_picture, | 1825 | (ret = ff_mpeg_ref_picture(s->avctx, &s->last_picture, |
| 1826 | s->last_picture_ptr)) < 0) | 1826 | s->last_picture_ptr)) < 0) |
| 1827 | return ret; | 1827 | return ret; |
| 1828 | } | 1828 | } |
| 1829 | if (s->next_picture_ptr) { | 1829 | if (s->next_picture_ptr) { |
| 1830 | ff_mpeg_unref_picture(s->avctx, &s->next_picture); | 1830 | ff_mpeg_unref_picture(s->avctx, &s->next_picture); |
| 1831 | if (s->next_picture_ptr->f->buf[0] && | 1831 | if (s->next_picture_ptr->f->buf[0] && |
| 1832 | (ret = ff_mpeg_ref_picture(s, &s->next_picture, | 1832 | (ret = ff_mpeg_ref_picture(s->avctx, &s->next_picture, |
| 1833 | s->next_picture_ptr)) < 0) | 1833 | s->next_picture_ptr)) < 0) |
| 1834 | return ret; | 1834 | return ret; |
| 1835 | } | 1835 | } |
| @@ -863,7 +863,7 @@ void ff_wmv2_encode_mb(MpegEncContext * s, · 862 unmodified lines | |||
| 863 | int16_t block[6][64], | 863 | int16_t block[6][64], |
| 864 | int motion_x, int motion_y); | 864 | int motion_x, int motion_y); |
| 865 | 865 | ||
| 866 | int ff_mpeg_ref_picture(MpegEncContext *s, Picture *dst, Picture *src); | 866 | int ff_mpeg_ref_picture(AVCodecContext *avctx, Picture *dst, Picture *src); |
| 867 | void ff_mpeg_unref_picture(AVCodecContext *avctx, Picture *picture); | 867 | void ff_mpeg_unref_picture(AVCodecContext *avctx, Picture *picture); |
| 868 | void ff_free_picture_tables(Picture *pic); | 868 | void ff_free_picture_tables(Picture *pic); |
| 869 | 869 | ||
| @@ -1371,7 +1371,7 @@ no_output_pic: · 1370 unmodified lines | |||
| 1371 | AV_PICTURE_TYPE_B ? 3 : 0; | 1371 | AV_PICTURE_TYPE_B ? 3 : 0; |
| 1372 | 1372 | ||
| 1373 | ff_mpeg_unref_picture(s->avctx, &s->new_picture); | 1373 | ff_mpeg_unref_picture(s->avctx, &s->new_picture); |
| 1374 | if ((ret = ff_mpeg_ref_picture(s, &s->new_picture, s->reordered_input_picture[0]))) | 1374 | if ((ret = ff_mpeg_ref_picture(s->avctx, &s->new_picture, s->reordered_input_picture[0]))) |
| 1375 | return ret; | 1375 | return ret; |
| 1376 | 1376 | ||
| 1377 | if (s->reordered_input_picture[0]->shared || s->avctx->rc_buffer_size) { | 1377 | if (s->reordered_input_picture[0]->shared || s->avctx->rc_buffer_size) { |
| @@ -1406,7 +1406,7 @@ no_output_pic: · 28 unmodified lines | |||
| 1406 | } | 1406 | } |
| 1407 | } | 1407 | } |
| 1408 | ff_mpeg_unref_picture(s->avctx, &s->current_picture); | 1408 | ff_mpeg_unref_picture(s->avctx, &s->current_picture); |
| 1409 | if ((ret = ff_mpeg_ref_picture(s, &s->current_picture, | 1409 | if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture, |
| 1410 | s->current_picture_ptr)) < 0) | 1410 | s->current_picture_ptr)) < 0) |
| 1411 | return ret; | 1411 | return ret; |
| 1412 | 1412 | ||
| @@ -1500,7 +1500,7 @@ static int frame_start(MpegEncContext *s) · 87 unmodified lines | |||
| 1500 | s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; | 1500 | s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; |
| 1501 | 1501 | ||
| 1502 | ff_mpeg_unref_picture(s->avctx, &s->current_picture); | 1502 | ff_mpeg_unref_picture(s->avctx, &s->current_picture); |
| 1503 | if ((ret = ff_mpeg_ref_picture(s, &s->current_picture, | 1503 | if ((ret = ff_mpeg_ref_picture(s->avctx, &s->current_picture, |
| 1504 | s->current_picture_ptr)) < 0) | 1504 | s->current_picture_ptr)) < 0) |
| 1505 | return ret; | 1505 | return ret; |
| 1506 | 1506 | ||
| @@ -1513,14 +1513,14 @@ static int frame_start(MpegEncContext *s) · 6 unmodified lines | |||
| 1513 | if (s->last_picture_ptr) { | 1513 | if (s->last_picture_ptr) { |
| 1514 | ff_mpeg_unref_picture(s->avctx, &s->last_picture); | 1514 | ff_mpeg_unref_picture(s->avctx, &s->last_picture); |
| 1515 | if (s->last_picture_ptr->f->buf[0] && | 1515 | if (s->last_picture_ptr->f->buf[0] && |
| 1516 | (ret = ff_mpeg_ref_picture(s, &s->last_picture, | 1516 | (ret = ff_mpeg_ref_picture(s->avctx, &s->last_picture, |
| 1517 | s->last_picture_ptr)) < 0) | 1517 | s->last_picture_ptr)) < 0) |
| 1518 | return ret; | 1518 | return ret; |
| 1519 | } | 1519 | } |
| 1520 | if (s->next_picture_ptr) { | 1520 | if (s->next_picture_ptr) { |
| 1521 | ff_mpeg_unref_picture(s->avctx, &s->next_picture); | 1521 | ff_mpeg_unref_picture(s->avctx, &s->next_picture); |
| 1522 | if (s->next_picture_ptr->f->buf[0] && | 1522 | if (s->next_picture_ptr->f->buf[0] && |
| 1523 | (ret = ff_mpeg_ref_picture(s, &s->next_picture, | 1523 | (ret = ff_mpeg_ref_picture(s->avctx, &s->next_picture, |
| 1524 | s->next_picture_ptr)) < 0) | 1524 | s->next_picture_ptr)) < 0) |
| 1525 | return ret; | 1525 | return ret; |
| 1526 | } | 1526 | } |