This describes more accurately what this field is for.
Unified · Split
| @@ -2987,13 +2987,13 @@ typedef struct AVHWAccel { · 2986 unmodified lines | |||
| 2987 | int (*end_frame)(AVCodecContext *avctx); | 2987 | int (*end_frame)(AVCodecContext *avctx); |
| 2988 | 2988 | ||
| 2989 | /** | 2989 | /** |
| 2990 | * Size of HW accelerator private data. | 2990 | * Size of per-frame hardware accelerator private data. |
| 2991 | * | 2991 | * |
| 2992 | * Private data is allocated with av_mallocz() before | 2992 | * Private data is allocated with av_mallocz() before |
| 2993 | * AVCodecContext.get_buffer() and deallocated after | 2993 | * AVCodecContext.get_buffer() and deallocated after |
| 2994 | * AVCodecContext.release_buffer(). | 2994 | * AVCodecContext.release_buffer(). |
| 2995 | */ | 2995 | */ |
| 2996 | int priv_data_size; | 2996 | int frame_priv_data_size; |
| 2997 | } AVHWAccel; | 2997 | } AVHWAccel; |
| 2998 | 2998 | ||
| 2999 | /** | 2999 | /** |
| @@ -465,5 +465,5 @@ AVHWAccel ff_h264_dxva2_hwaccel = { · 464 unmodified lines | |||
| 465 | .start_frame = dxva2_h264_start_frame, | 465 | .start_frame = dxva2_h264_start_frame, |
| 466 | .decode_slice = dxva2_h264_decode_slice, | 466 | .decode_slice = dxva2_h264_decode_slice, |
| 467 | .end_frame = dxva2_h264_end_frame, | 467 | .end_frame = dxva2_h264_end_frame, |
| 468 | .priv_data_size = sizeof(struct dxva2_picture_context), | 468 | .frame_priv_data_size = sizeof(struct dxva2_picture_context), |
| 469 | }; | 469 | }; |
| @@ -276,5 +276,5 @@ AVHWAccel ff_mpeg2_dxva2_hwaccel = { · 275 unmodified lines | |||
| 276 | .start_frame = dxva2_mpeg2_start_frame, | 276 | .start_frame = dxva2_mpeg2_start_frame, |
| 277 | .decode_slice = dxva2_mpeg2_decode_slice, | 277 | .decode_slice = dxva2_mpeg2_decode_slice, |
| 278 | .end_frame = dxva2_mpeg2_end_frame, | 278 | .end_frame = dxva2_mpeg2_end_frame, |
| 279 | .priv_data_size = sizeof(struct dxva2_picture_context), | 279 | .frame_priv_data_size = sizeof(struct dxva2_picture_context), |
| 280 | }; | 280 | }; |
| @@ -279,7 +279,7 @@ AVHWAccel ff_wmv3_dxva2_hwaccel = { · 278 unmodified lines | |||
| 279 | .start_frame = dxva2_vc1_start_frame, | 279 | .start_frame = dxva2_vc1_start_frame, |
| 280 | .decode_slice = dxva2_vc1_decode_slice, | 280 | .decode_slice = dxva2_vc1_decode_slice, |
| 281 | .end_frame = dxva2_vc1_end_frame, | 281 | .end_frame = dxva2_vc1_end_frame, |
| 282 | .priv_data_size = sizeof(struct dxva2_picture_context), | 282 | .frame_priv_data_size = sizeof(struct dxva2_picture_context), |
| 283 | }; | 283 | }; |
| 284 | #endif | 284 | #endif |
| 285 | 285 | ||
| @@ -291,5 +291,5 @@ AVHWAccel ff_vc1_dxva2_hwaccel = { · 5 unmodified lines | |||
| 291 | .start_frame = dxva2_vc1_start_frame, | 291 | .start_frame = dxva2_vc1_start_frame, |
| 292 | .decode_slice = dxva2_vc1_decode_slice, | 292 | .decode_slice = dxva2_vc1_decode_slice, |
| 293 | .end_frame = dxva2_vc1_end_frame, | 293 | .end_frame = dxva2_vc1_end_frame, |
| 294 | .priv_data_size = sizeof(struct dxva2_picture_context), | 294 | .frame_priv_data_size = sizeof(struct dxva2_picture_context), |
| 295 | }; | 295 | }; |
| @@ -258,8 +258,8 @@ static int alloc_picture(H264Context *h, H264Picture *pic) · 257 unmodified lines | |||
| 258 | if (h->avctx->hwaccel) { | 258 | if (h->avctx->hwaccel) { |
| 259 | const AVHWAccel *hwaccel = h->avctx->hwaccel; | 259 | const AVHWAccel *hwaccel = h->avctx->hwaccel; |
| 260 | av_assert0(!pic->hwaccel_picture_private); | 260 | av_assert0(!pic->hwaccel_picture_private); |
| 261 | if (hwaccel->priv_data_size) { | 261 | if (hwaccel->frame_priv_data_size) { |
| 262 | pic->hwaccel_priv_buf = av_buffer_allocz(hwaccel->priv_data_size); | 262 | pic->hwaccel_priv_buf = av_buffer_allocz(hwaccel->frame_priv_data_size); |
| 263 | if (!pic->hwaccel_priv_buf) | 263 | if (!pic->hwaccel_priv_buf) |
| 264 | return AVERROR(ENOMEM); | 264 | return AVERROR(ENOMEM); |
| 265 | pic->hwaccel_picture_private = pic->hwaccel_priv_buf->data; | 265 | pic->hwaccel_picture_private = pic->hwaccel_priv_buf->data; |
| @@ -460,8 +460,8 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic) · 459 unmodified lines | |||
| 460 | 460 | ||
| 461 | if (s->avctx->hwaccel) { | 461 | if (s->avctx->hwaccel) { |
| 462 | assert(!pic->hwaccel_picture_private); | 462 | assert(!pic->hwaccel_picture_private); |
| 463 | if (s->avctx->hwaccel->priv_data_size) { | 463 | if (s->avctx->hwaccel->frame_priv_data_size) { |
| 464 | pic->hwaccel_priv_buf = av_buffer_allocz(s->avctx->hwaccel->priv_data_size); | 464 | pic->hwaccel_priv_buf = av_buffer_allocz(s->avctx->hwaccel->frame_priv_data_size); |
| 465 | if (!pic->hwaccel_priv_buf) { | 465 | if (!pic->hwaccel_priv_buf) { |
| 466 | av_log(s->avctx, AV_LOG_ERROR, "alloc_frame_buffer() failed (hwaccel private data allocation)\n"); | 466 | av_log(s->avctx, AV_LOG_ERROR, "alloc_frame_buffer() failed (hwaccel private data allocation)\n"); |
| 467 | return -1; | 467 | return -1; |
| @@ -212,5 +212,5 @@ AVHWAccel ff_h264_vdpau_hwaccel = { · 211 unmodified lines | |||
| 212 | .start_frame = vdpau_h264_start_frame, | 212 | .start_frame = vdpau_h264_start_frame, |
| 213 | .end_frame = vdpau_h264_end_frame, | 213 | .end_frame = vdpau_h264_end_frame, |
| 214 | .decode_slice = vdpau_h264_decode_slice, | 214 | .decode_slice = vdpau_h264_decode_slice, |
| 215 | .priv_data_size = sizeof(struct vdpau_picture_context), | 215 | .frame_priv_data_size = sizeof(struct vdpau_picture_context), |
| 216 | }; | 216 | }; |
| @@ -103,7 +103,7 @@ AVHWAccel ff_mpeg1_vdpau_hwaccel = { · 102 unmodified lines | |||
| 103 | .start_frame = vdpau_mpeg_start_frame, | 103 | .start_frame = vdpau_mpeg_start_frame, |
| 104 | .end_frame = ff_vdpau_mpeg_end_frame, | 104 | .end_frame = ff_vdpau_mpeg_end_frame, |
| 105 | .decode_slice = vdpau_mpeg_decode_slice, | 105 | .decode_slice = vdpau_mpeg_decode_slice, |
| 106 | .priv_data_size = sizeof(struct vdpau_picture_context), | 106 | .frame_priv_data_size = sizeof(struct vdpau_picture_context), |
| 107 | }; | 107 | }; |
| 108 | #endif | 108 | #endif |
| 109 | 109 | ||
| @@ -116,6 +116,6 @@ AVHWAccel ff_mpeg2_vdpau_hwaccel = { · 6 unmodified lines | |||
| 116 | .start_frame = vdpau_mpeg_start_frame, | 116 | .start_frame = vdpau_mpeg_start_frame, |
| 117 | .end_frame = ff_vdpau_mpeg_end_frame, | 117 | .end_frame = ff_vdpau_mpeg_end_frame, |
| 118 | .decode_slice = vdpau_mpeg_decode_slice, | 118 | .decode_slice = vdpau_mpeg_decode_slice, |
| 119 | .priv_data_size = sizeof(struct vdpau_picture_context), | 119 | .frame_priv_data_size = sizeof(struct vdpau_picture_context), |
| 120 | }; | 120 | }; |
| 121 | #endif | 121 | #endif |
| @@ -97,7 +97,7 @@ AVHWAccel ff_h263_vdpau_hwaccel = { · 96 unmodified lines | |||
| 97 | .start_frame = vdpau_mpeg4_start_frame, | 97 | .start_frame = vdpau_mpeg4_start_frame, |
| 98 | .end_frame = ff_vdpau_mpeg_end_frame, | 98 | .end_frame = ff_vdpau_mpeg_end_frame, |
| 99 | .decode_slice = vdpau_mpeg4_decode_slice, | 99 | .decode_slice = vdpau_mpeg4_decode_slice, |
| 100 | .priv_data_size = sizeof(struct vdpau_picture_context), | 100 | .frame_priv_data_size = sizeof(struct vdpau_picture_context), |
| 101 | }; | 101 | }; |
| 102 | #endif | 102 | #endif |
| 103 | 103 | ||
| @@ -110,6 +110,6 @@ AVHWAccel ff_mpeg4_vdpau_hwaccel = { · 6 unmodified lines | |||
| 110 | .start_frame = vdpau_mpeg4_start_frame, | 110 | .start_frame = vdpau_mpeg4_start_frame, |
| 111 | .end_frame = ff_vdpau_mpeg_end_frame, | 111 | .end_frame = ff_vdpau_mpeg_end_frame, |
| 112 | .decode_slice = vdpau_mpeg4_decode_slice, | 112 | .decode_slice = vdpau_mpeg4_decode_slice, |
| 113 | .priv_data_size = sizeof(struct vdpau_picture_context), | 113 | .frame_priv_data_size = sizeof(struct vdpau_picture_context), |
| 114 | }; | 114 | }; |
| 115 | #endif | 115 | #endif |
| @@ -118,7 +118,7 @@ AVHWAccel ff_wmv3_vdpau_hwaccel = { · 117 unmodified lines | |||
| 118 | .start_frame = vdpau_vc1_start_frame, | 118 | .start_frame = vdpau_vc1_start_frame, |
| 119 | .end_frame = ff_vdpau_mpeg_end_frame, | 119 | .end_frame = ff_vdpau_mpeg_end_frame, |
| 120 | .decode_slice = vdpau_vc1_decode_slice, | 120 | .decode_slice = vdpau_vc1_decode_slice, |
| 121 | .priv_data_size = sizeof(struct vdpau_picture_context), | 121 | .frame_priv_data_size = sizeof(struct vdpau_picture_context), |
| 122 | }; | 122 | }; |
| 123 | #endif | 123 | #endif |
| 124 | 124 | ||
| @@ -130,5 +130,5 @@ AVHWAccel ff_vc1_vdpau_hwaccel = { · 5 unmodified lines | |||
| 130 | .start_frame = vdpau_vc1_start_frame, | 130 | .start_frame = vdpau_vc1_start_frame, |
| 131 | .end_frame = ff_vdpau_mpeg_end_frame, | 131 | .end_frame = ff_vdpau_mpeg_end_frame, |
| 132 | .decode_slice = vdpau_vc1_decode_slice, | 132 | .decode_slice = vdpau_vc1_decode_slice, |
| 133 | .priv_data_size = sizeof(struct vdpau_picture_context), | 133 | .frame_priv_data_size = sizeof(struct vdpau_picture_context), |
| 134 | }; | 134 | }; |