History

avcodec/vp8: Convert to ProgressFrame API

Andreas Rheinhardt committed 4 years ago

Commit d48d7bc1 parent d74102e4 files · +40 −74Browse files

Unified · Split

4 files
  1. libavcodec/pthread_frame.c +1 −1
  2. libavcodec/vp8.c +34 −70
  3. libavcodec/vp8.h +3 −2
  4. libavcodec/webp.c +2 −1
libavcodec/pthread_frame.c+1−1
@@ -986,7 +986,7 @@ int ff_thread_get_ext_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags) · 985 unmodified lines
986 /* Hint: It is possible for this function to be called with codecs986 /* Hint: It is possible for this function to be called with codecs
987 * that don't support frame threading at all, namely in case987 * that don't support frame threading at all, namely in case
988 * a frame-threaded decoder shares code with codecs that are not.988 * a frame-threaded decoder shares code with codecs that are not.
989 * This currently affects non-MPEG-4 mpegvideo codecs and and VP7.989 * This currently affects non-MPEG-4 mpegvideo codecs.
990 * The following check will always be true for them. */990 * The following check will always be true for them. */
991 if (!(avctx->active_thread_type & FF_THREAD_FRAME))991 if (!(avctx->active_thread_type & FF_THREAD_FRAME))
992 return ff_get_buffer(avctx, f->f, flags);992 return ff_get_buffer(avctx, f->f, flags);
libavcodec/vp8.c+34−70
@@ -35,9 +35,9 @@ · 34 unmodified lines
35#include "hwaccel_internal.h"35#include "hwaccel_internal.h"
36#include "hwconfig.h"36#include "hwconfig.h"
37#include "mathops.h"37#include "mathops.h"
38#include "progressframe.h"
38#include "refstruct.h"39#include "refstruct.h"
39#include "thread.h"40#include "thread.h"
40#include "threadframe.h"
41#include "vp8.h"41#include "vp8.h"
42#include "vp89_rac.h"42#include "vp89_rac.h"
43#include "vp8data.h"43#include "vp8data.h"
@@ -103,9 +103,9 @@ static void free_buffers(VP8Context *s) · 59 unmodified lines
103 103
104static int vp8_alloc_frame(VP8Context *s, VP8Frame *f, int ref)104static int vp8_alloc_frame(VP8Context *s, VP8Frame *f, int ref)
105{105{
106 int ret;106 int ret = ff_progress_frame_get_buffer(s->avctx, &f->tf,
107 if ((ret = ff_thread_get_ext_buffer(s->avctx, &f->tf,107 ref ? AV_GET_BUFFER_FLAG_REF : 0);
108 ref ? AV_GET_BUFFER_FLAG_REF : 0)) < 0)108 if (ret < 0)
109 return ret;109 return ret;
110 if (!(f->seg_map = ff_refstruct_allocz(s->mb_width * s->mb_height)))110 if (!(f->seg_map = ff_refstruct_allocz(s->mb_width * s->mb_height)))
111 goto fail;111 goto fail;
@@ -117,7 +117,7 @@ static int vp8_alloc_frame(VP8Context *s, VP8Frame *f, int ref) · 5 unmodified lines
117 117
118fail:118fail:
119 ff_refstruct_unref(&f->seg_map);119 ff_refstruct_unref(&f->seg_map);
120 ff_thread_release_ext_buffer(&f->tf);120 ff_progress_frame_unref(&f->tf);
121 return ret;121 return ret;
122}122}
123 123
@@ -125,26 +125,9 @@ static void vp8_release_frame(VP8Frame *f) · 1 unmodified line
125{125{
126 ff_refstruct_unref(&f->seg_map);126 ff_refstruct_unref(&f->seg_map);
127 ff_refstruct_unref(&f->hwaccel_picture_private);127 ff_refstruct_unref(&f->hwaccel_picture_private);
128 ff_thread_release_ext_buffer(&f->tf);128 ff_progress_frame_unref(&f->tf);
129}129}
130 130
131#if CONFIG_VP8_DECODER
132static int vp8_ref_frame(VP8Frame *dst, const VP8Frame *src)
133{
134 int ret;
135
136 vp8_release_frame(dst);
137
138 if ((ret = ff_thread_ref_frame(&dst->tf, &src->tf)) < 0)
139 return ret;
140 ff_refstruct_replace(&dst->seg_map, src->seg_map);
141 ff_refstruct_replace(&dst->hwaccel_picture_private,
142 src->hwaccel_picture_private);
143
144 return 0;
145}
146#endif /* CONFIG_VP8_DECODER */
147
148static void vp8_decode_flush_impl(AVCodecContext *avctx, int free_mem)131static void vp8_decode_flush_impl(AVCodecContext *avctx, int free_mem)
149{132{
150 VP8Context *s = avctx->priv_data;133 VP8Context *s = avctx->priv_data;
@@ -184,7 +167,7 @@ static VP8Frame *vp8_find_free_buffer(VP8Context *s) · 33 unmodified lines
184 av_log(s->avctx, AV_LOG_FATAL, "Ran out of free frames!\n");167 av_log(s->avctx, AV_LOG_FATAL, "Ran out of free frames!\n");
185 abort();168 abort();
186 }169 }
187 if (frame->tf.f->buf[0])170 if (frame->tf.f)
188 vp8_release_frame(frame);171 vp8_release_frame(frame);
189 172
190 return frame;173 return frame;
@@ -1830,7 +1813,7 @@ static const uint8_t subpel_idx[3][8] = { · 1639 unmodified lines
1830 */1813 */
1831static av_always_inline1814static av_always_inline
1832void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst,1815void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst,
1833 const ThreadFrame *ref, const VP8mv *mv,1816 const ProgressFrame *ref, const VP8mv *mv,
1834 int x_off, int y_off, int block_w, int block_h,1817 int x_off, int y_off, int block_w, int block_h,
1835 int width, int height, ptrdiff_t linesize,1818 int width, int height, ptrdiff_t linesize,
1836 vp8_mc_func mc_func[3][3])1819 vp8_mc_func mc_func[3][3])
@@ -1847,7 +1830,7 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst, · 10 unmodified lines
1847 y_off += mv->y >> 2;1830 y_off += mv->y >> 2;
1848 1831
1849 // edge emulation1832 // edge emulation
1850 ff_thread_await_progress(ref, (3 + y_off + block_h + subpel_idx[2][my]) >> 4, 0);1833 ff_progress_frame_await(ref, (3 + y_off + block_h + subpel_idx[2][my]) >> 4);
1851 src += y_off * linesize + x_off;1834 src += y_off * linesize + x_off;
1852 if (x_off < mx_idx || x_off >= width - block_w - subpel_idx[2][mx] ||1835 if (x_off < mx_idx || x_off >= width - block_w - subpel_idx[2][mx] ||
1853 y_off < my_idx || y_off >= height - block_h - subpel_idx[2][my]) {1836 y_off < my_idx || y_off >= height - block_h - subpel_idx[2][my]) {
@@ -1863,7 +1846,7 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst, · 9 unmodified lines
1863 }1846 }
1864 mc_func[my_idx][mx_idx](dst, linesize, src, src_linesize, block_h, mx, my);1847 mc_func[my_idx][mx_idx](dst, linesize, src, src_linesize, block_h, mx, my);
1865 } else {1848 } else {
1866 ff_thread_await_progress(ref, (3 + y_off + block_h) >> 4, 0);1849 ff_progress_frame_await(ref, (3 + y_off + block_h) >> 4);
1867 mc_func[0][0](dst, linesize, src + y_off * linesize + x_off,1850 mc_func[0][0](dst, linesize, src + y_off * linesize + x_off,
1868 linesize, block_h, 0, 0);1851 linesize, block_h, 0, 0);
1869 }1852 }
@@ -1888,7 +1871,7 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst, · 18 unmodified lines
1888 */1871 */
1889static av_always_inline1872static av_always_inline
1890void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1,1873void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1,
1891 uint8_t *dst2, const ThreadFrame *ref, const VP8mv *mv,1874 uint8_t *dst2, const ProgressFrame *ref, const VP8mv *mv,
1892 int x_off, int y_off, int block_w, int block_h,1875 int x_off, int y_off, int block_w, int block_h,
1893 int width, int height, ptrdiff_t linesize,1876 int width, int height, ptrdiff_t linesize,
1894 vp8_mc_func mc_func[3][3])1877 vp8_mc_func mc_func[3][3])
@@ -1905,7 +1888,7 @@ void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1, · 10 unmodified lines
1905 // edge emulation1888 // edge emulation
1906 src1 += y_off * linesize + x_off;1889 src1 += y_off * linesize + x_off;
1907 src2 += y_off * linesize + x_off;1890 src2 += y_off * linesize + x_off;
1908 ff_thread_await_progress(ref, (3 + y_off + block_h + subpel_idx[2][my]) >> 3, 0);1891 ff_progress_frame_await(ref, (3 + y_off + block_h + subpel_idx[2][my]) >> 3);
1909 if (x_off < mx_idx || x_off >= width - block_w - subpel_idx[2][mx] ||1892 if (x_off < mx_idx || x_off >= width - block_w - subpel_idx[2][mx] ||
1910 y_off < my_idx || y_off >= height - block_h - subpel_idx[2][my]) {1893 y_off < my_idx || y_off >= height - block_h - subpel_idx[2][my]) {
1911 s->vdsp.emulated_edge_mc(td->edge_emu_buffer,1894 s->vdsp.emulated_edge_mc(td->edge_emu_buffer,
@@ -1930,7 +1913,7 @@ void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1, · 18 unmodified lines
1930 mc_func[my_idx][mx_idx](dst2, linesize, src2, linesize, block_h, mx, my);1913 mc_func[my_idx][mx_idx](dst2, linesize, src2, linesize, block_h, mx, my);
1931 }1914 }
1932 } else {1915 } else {
1933 ff_thread_await_progress(ref, (3 + y_off + block_h) >> 3, 0);1916 ff_progress_frame_await(ref, (3 + y_off + block_h) >> 3);
1934 mc_func[0][0](dst1, linesize, src1 + y_off * linesize + x_off, linesize, block_h, 0, 0);1917 mc_func[0][0](dst1, linesize, src1 + y_off * linesize + x_off, linesize, block_h, 0, 0);
1935 mc_func[0][0](dst2, linesize, src2 + y_off * linesize + x_off, linesize, block_h, 0, 0);1918 mc_func[0][0](dst2, linesize, src2 + y_off * linesize + x_off, linesize, block_h, 0, 0);
1936 }1919 }
@@ -1938,7 +1921,7 @@ void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1, · 1 unmodified line
1938 1921
1939static av_always_inline1922static av_always_inline
1940void vp8_mc_part(VP8Context *s, VP8ThreadData *td, uint8_t *const dst[3],1923void vp8_mc_part(VP8Context *s, VP8ThreadData *td, uint8_t *const dst[3],
1941 const ThreadFrame *ref_frame, int x_off, int y_off,1924 const ProgressFrame *ref_frame, int x_off, int y_off,
1942 int bx_off, int by_off, int block_w, int block_h,1925 int bx_off, int by_off, int block_w, int block_h,
1943 int width, int height, const VP8mv *mv)1926 int width, int height, const VP8mv *mv)
1944{1927{
@@ -2003,7 +1986,7 @@ void inter_predict(VP8Context *s, VP8ThreadData *td, uint8_t *const dst[3], · 58 unmodified lines
2003{1986{
2004 int x_off = mb_x << 4, y_off = mb_y << 4;1987 int x_off = mb_x << 4, y_off = mb_y << 4;
2005 int width = 16 * s->mb_width, height = 16 * s->mb_height;1988 int width = 16 * s->mb_width, height = 16 * s->mb_height;
2006 const ThreadFrame *ref = &s->framep[mb->ref_frame]->tf;1989 const ProgressFrame *ref = &s->framep[mb->ref_frame]->tf;
2007 const VP8mv *bmv = mb->bmv;1990 const VP8mv *bmv = mb->bmv;
2008 1991
2009 switch (mb->partitioning) {1992 switch (mb->partitioning) {
@@ -2423,7 +2406,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void · 413 unmodified lines
2423 // if we re-use the same map.2406 // if we re-use the same map.
2424 if (prev_frame && s->segmentation.enabled &&2407 if (prev_frame && s->segmentation.enabled &&
2425 !s->segmentation.update_map)2408 !s->segmentation.update_map)
2426 ff_thread_await_progress(&prev_frame->tf, mb_y, 0);2409 ff_progress_frame_await(&prev_frame->tf, mb_y);
2427 mb = s->macroblocks + (s->mb_height - mb_y - 1) * 2;2410 mb = s->macroblocks + (s->mb_height - mb_y - 1) * 2;
2428 memset(mb - 1, 0, sizeof(*mb)); // zero left macroblock2411 memset(mb - 1, 0, sizeof(*mb)); // zero left macroblock
2429 AV_WN32A(s->intra4x4_pred_mode_left, DC_PRED * 0x01010101);2412 AV_WN32A(s->intra4x4_pred_mode_left, DC_PRED * 0x01010101);
@@ -2631,7 +2614,7 @@ int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr, · 201 unmodified lines
2631 td->mv_bounds.mv_max.y -= 64 * num_jobs;2614 td->mv_bounds.mv_max.y -= 64 * num_jobs;
2632 2615
2633 if (avctx->active_thread_type == FF_THREAD_FRAME)2616 if (avctx->active_thread_type == FF_THREAD_FRAME)
2634 ff_thread_report_progress(&curframe->tf, mb_y, 0);2617 ff_progress_frame_report(&curframe->tf, mb_y);
2635 }2618 }
2636 2619
2637 return 0;2620 return 0;
@@ -2699,7 +2682,7 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, · 61 unmodified lines
2699 2682
2700 // release no longer referenced frames2683 // release no longer referenced frames
2701 for (i = 0; i < 5; i++)2684 for (i = 0; i < 5; i++)
2702 if (s->frames[i].tf.f->buf[0] &&2685 if (s->frames[i].tf.f &&
2703 &s->frames[i] != prev_frame &&2686 &s->frames[i] != prev_frame &&
2704 &s->frames[i] != s->framep[VP8_FRAME_PREVIOUS] &&2687 &s->frames[i] != s->framep[VP8_FRAME_PREVIOUS] &&
2705 &s->frames[i] != s->framep[VP8_FRAME_GOLDEN] &&2688 &s->frames[i] != s->framep[VP8_FRAME_GOLDEN] &&
@@ -2728,14 +2711,14 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, · 22 unmodified lines
2728 goto err;2711 goto err;
2729 }2712 }
2730 2713
2714 if ((ret = vp8_alloc_frame(s, curframe, referenced)) < 0)
2715 goto err;
2731 if (s->keyframe)2716 if (s->keyframe)
2732 curframe->tf.f->flags |= AV_FRAME_FLAG_KEY;2717 curframe->tf.f->flags |= AV_FRAME_FLAG_KEY;
2733 else2718 else
2734 curframe->tf.f->flags &= ~AV_FRAME_FLAG_KEY;2719 curframe->tf.f->flags &= ~AV_FRAME_FLAG_KEY;
2735 curframe->tf.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I2720 curframe->tf.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I
2736 : AV_PICTURE_TYPE_P;2721 : AV_PICTURE_TYPE_P;
2737 if ((ret = vp8_alloc_frame(s, curframe, referenced)) < 0)
2738 goto err;
2739 2722
2740 // check if golden and altref are swapped2723 // check if golden and altref are swapped
2741 if (s->update_altref != VP8_FRAME_NONE)2724 if (s->update_altref != VP8_FRAME_NONE)
@@ -2792,7 +2775,7 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, · 50 unmodified lines
2792 // if we re-use the same map.2775 // if we re-use the same map.
2793 if (prev_frame && s->segmentation.enabled &&2776 if (prev_frame && s->segmentation.enabled &&
2794 !s->segmentation.update_map)2777 !s->segmentation.update_map)
2795 ff_thread_await_progress(&prev_frame->tf, 1, 0);2778 ff_progress_frame_await(&prev_frame->tf, 1);
2796 if (is_vp7)2779 if (is_vp7)
2797 ret = vp7_decode_mv_mb_modes(avctx, curframe, prev_frame);2780 ret = vp7_decode_mv_mb_modes(avctx, curframe, prev_frame);
2798 else2781 else
@@ -2823,7 +2806,7 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, · 24 unmodified lines
2823 num_jobs);2806 num_jobs);
2824 }2807 }
2825 2808
2826 ff_thread_report_progress(&curframe->tf, INT_MAX, 0);2809 ff_progress_frame_report(&curframe->tf, INT_MAX);
2827 memcpy(&s->framep[0], &s->next_framep[0], sizeof(s->framep[0]) * 4);2810 memcpy(&s->framep[0], &s->next_framep[0], sizeof(s->framep[0]) * 4);
2828 2811
2829skip_decode:2812skip_decode:
@@ -2860,24 +2843,8 @@ static int vp7_decode_frame(AVCodecContext *avctx, AVFrame *frame, · 30 unmodified lines
2860 2843
2861av_cold int ff_vp8_decode_free(AVCodecContext *avctx)2844av_cold int ff_vp8_decode_free(AVCodecContext *avctx)
2862{2845{
2863 VP8Context *s = avctx->priv_data;
2864 int i;
2865
2866 vp8_decode_flush_impl(avctx, 1);2846 vp8_decode_flush_impl(avctx, 1);
2867 for (i = 0; i < FF_ARRAY_ELEMS(s->frames); i++)
2868 av_frame_free(&s->frames[i].tf.f);
2869
2870 return 0;
2871}
2872 2847
2873static av_cold int vp8_init_frames(VP8Context *s)
2874{
2875 int i;
2876 for (i = 0; i < FF_ARRAY_ELEMS(s->frames); i++) {
2877 s->frames[i].tf.f = av_frame_alloc();
2878 if (!s->frames[i].tf.f)
2879 return AVERROR(ENOMEM);
2880 }
2881 return 0;2848 return 0;
2882}2849}
2883 2850
@@ -2885,7 +2852,6 @@ static av_always_inline · 1 unmodified line
2885int vp78_decode_init(AVCodecContext *avctx, int is_vp7)2852int vp78_decode_init(AVCodecContext *avctx, int is_vp7)
2886{2853{
2887 VP8Context *s = avctx->priv_data;2854 VP8Context *s = avctx->priv_data;
2888 int ret;
2889 2855
2890 s->avctx = avctx;2856 s->avctx = avctx;
2891 s->pix_fmt = AV_PIX_FMT_NONE;2857 s->pix_fmt = AV_PIX_FMT_NONE;
@@ -2909,11 +2875,6 @@ int vp78_decode_init(AVCodecContext *avctx, int is_vp7) · 17 unmodified lines
2909 /* does not change for VP8 */2875 /* does not change for VP8 */
2910 memcpy(s->prob[0].scan, ff_zigzag_scan, sizeof(s->prob[0].scan));2876 memcpy(s->prob[0].scan, ff_zigzag_scan, sizeof(s->prob[0].scan));
2911 2877
2912 if ((ret = vp8_init_frames(s)) < 0) {
2913 ff_vp8_decode_free(avctx);
2914 return ret;
2915 }
2916
2917 return 0;2878 return 0;
2918}2879}
2919 2880
@@ -2931,13 +2892,20 @@ av_cold int ff_vp8_decode_init(AVCodecContext *avctx) · 11 unmodified lines
2931 2892
2932#if CONFIG_VP8_DECODER2893#if CONFIG_VP8_DECODER
2933#if HAVE_THREADS2894#if HAVE_THREADS
2895static void vp8_replace_frame(VP8Frame *dst, const VP8Frame *src)
2896{
2897 ff_progress_frame_replace(&dst->tf, &src->tf);
2898 ff_refstruct_replace(&dst->seg_map, src->seg_map);
2899 ff_refstruct_replace(&dst->hwaccel_picture_private,
2900 src->hwaccel_picture_private);
2901}
2902
2934#define REBASE(pic) ((pic) ? (pic) - &s_src->frames[0] + &s->frames[0] : NULL)2903#define REBASE(pic) ((pic) ? (pic) - &s_src->frames[0] + &s->frames[0] : NULL)
2935 2904
2936static int vp8_decode_update_thread_context(AVCodecContext *dst,2905static int vp8_decode_update_thread_context(AVCodecContext *dst,
2937 const AVCodecContext *src)2906 const AVCodecContext *src)
2938{2907{
2939 VP8Context *s = dst->priv_data, *s_src = src->priv_data;2908 VP8Context *s = dst->priv_data, *s_src = src->priv_data;
2940 int i;
2941 2909
2942 if (s->macroblocks_base &&2910 if (s->macroblocks_base &&
2943 (s_src->mb_width != s->mb_width || s_src->mb_height != s->mb_height)) {2911 (s_src->mb_width != s->mb_width || s_src->mb_height != s->mb_height)) {
@@ -2952,13 +2920,8 @@ static int vp8_decode_update_thread_context(AVCodecContext *dst, · 8 unmodified lines
2952 s->lf_delta = s_src->lf_delta;2920 s->lf_delta = s_src->lf_delta;
2953 memcpy(s->sign_bias, s_src->sign_bias, sizeof(s->sign_bias));2921 memcpy(s->sign_bias, s_src->sign_bias, sizeof(s->sign_bias));
2954 2922
2955 for (i = 0; i < FF_ARRAY_ELEMS(s_src->frames); i++) {2923 for (int i = 0; i < FF_ARRAY_ELEMS(s_src->frames); i++)
2956 if (s_src->frames[i].tf.f->buf[0]) {2924 vp8_replace_frame(&s->frames[i], &s_src->frames[i]);
2957 int ret = vp8_ref_frame(&s->frames[i], &s_src->frames[i]);
2958 if (ret < 0)
2959 return ret;
2960 }
2961 }
2962 2925
2963 s->framep[0] = REBASE(s_src->next_framep[0]);2926 s->framep[0] = REBASE(s_src->next_framep[0]);
2964 s->framep[1] = REBASE(s_src->next_framep[1]);2927 s->framep[1] = REBASE(s_src->next_framep[1]);
@@ -2982,6 +2945,7 @@ const FFCodec ff_vp7_decoder = { · 17 unmodified lines
2982 FF_CODEC_DECODE_CB(vp7_decode_frame),2945 FF_CODEC_DECODE_CB(vp7_decode_frame),
2983 .p.capabilities = AV_CODEC_CAP_DR1,2946 .p.capabilities = AV_CODEC_CAP_DR1,
2984 .flush = vp8_decode_flush,2947 .flush = vp8_decode_flush,
2948 .caps_internal = FF_CODEC_CAP_USES_PROGRESSFRAMES,
2985};2949};
2986#endif /* CONFIG_VP7_DECODER */2950#endif /* CONFIG_VP7_DECODER */
2987 2951
@@ -2997,7 +2961,7 @@ const FFCodec ff_vp8_decoder = { · 9 unmodified lines
2997 FF_CODEC_DECODE_CB(ff_vp8_decode_frame),2961 FF_CODEC_DECODE_CB(ff_vp8_decode_frame),
2998 .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |2962 .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS |
2999 AV_CODEC_CAP_SLICE_THREADS,2963 AV_CODEC_CAP_SLICE_THREADS,
3000 .caps_internal = FF_CODEC_CAP_ALLOCATE_PROGRESS,2964 .caps_internal = FF_CODEC_CAP_USES_PROGRESSFRAMES,
3001 .flush = vp8_decode_flush,2965 .flush = vp8_decode_flush,
3002 UPDATE_THREAD_CONTEXT(vp8_decode_update_thread_context),2966 UPDATE_THREAD_CONTEXT(vp8_decode_update_thread_context),
3003 .hw_configs = (const AVCodecHWConfigInternal *const []) {2967 .hw_configs = (const AVCodecHWConfigInternal *const []) {
libavcodec/vp8.h+3−2
@@ -31,8 +31,9 @@ · 30 unmodified lines
31#include "libavutil/mem_internal.h"31#include "libavutil/mem_internal.h"
32#include "libavutil/thread.h"32#include "libavutil/thread.h"
33 33
34#include "avcodec.h"
34#include "h264pred.h"35#include "h264pred.h"
35#include "threadframe.h"36#include "progressframe.h"
36#include "videodsp.h"37#include "videodsp.h"
37#include "vp8dsp.h"38#include "vp8dsp.h"
38#include "vpx_rac.h"39#include "vpx_rac.h"
@@ -150,7 +151,7 @@ typedef struct VP8ThreadData { · 111 unmodified lines
150} VP8ThreadData;151} VP8ThreadData;
151 152
152typedef struct VP8Frame {153typedef struct VP8Frame {
153 ThreadFrame tf;154 ProgressFrame tf;
154 uint8_t *seg_map; ///< RefStruct reference155 uint8_t *seg_map; ///< RefStruct reference
155 156
156 void *hwaccel_picture_private; ///< RefStruct reference157 void *hwaccel_picture_private; ///< RefStruct reference
libavcodec/webp.c+2−1
@@ -1571,5 +1571,6 @@ const FFCodec ff_webp_decoder = { · 1570 unmodified lines
1571 FF_CODEC_DECODE_CB(webp_decode_frame),1571 FF_CODEC_DECODE_CB(webp_decode_frame),
1572 .close = webp_decode_close,1572 .close = webp_decode_close,
1573 .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,1573 .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS,
1574 .caps_internal = FF_CODEC_CAP_ICC_PROFILES,1574 .caps_internal = FF_CODEC_CAP_ICC_PROFILES |
1575 FF_CODEC_CAP_USES_PROGRESSFRAMES,
1575};1576};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t