hwaccel: Rename priv_data_size to frame_priv_data_size
authorAnton Khirnov <anton@khirnov.net>
Thu, 6 Mar 2014 17:19:52 +0000 (18:19 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Sun, 11 May 2014 12:59:07 +0000 (14:59 +0200)
This describes more accurately what this field is for.

libavcodec/avcodec.h
libavcodec/dxva2_h264.c
libavcodec/dxva2_mpeg2.c
libavcodec/dxva2_vc1.c
libavcodec/h264_slice.c
libavcodec/mpegvideo.c
libavcodec/vdpau_h264.c
libavcodec/vdpau_mpeg12.c
libavcodec/vdpau_mpeg4.c
libavcodec/vdpau_vc1.c

index f72058988f139cfe4e18b760fc21044544869846..df061c172620a917ebef32ec3bd2c85e2522c830 100644 (file)
@@ -2987,13 +2987,13 @@ typedef struct AVHWAccel {
     int (*end_frame)(AVCodecContext *avctx);
 
     /**
-     * Size of HW accelerator private data.
+     * Size of per-frame hardware accelerator private data.
      *
      * Private data is allocated with av_mallocz() before
      * AVCodecContext.get_buffer() and deallocated after
      * AVCodecContext.release_buffer().
      */
-    int priv_data_size;
+    int frame_priv_data_size;
 } AVHWAccel;
 
 /**
index d80bd14e876a11dd5ca364beb3a12fe1e130b156..fa205c42d75f4458a444fafa05e9fe359dbf946f 100644 (file)
@@ -465,5 +465,5 @@ AVHWAccel ff_h264_dxva2_hwaccel = {
     .start_frame    = dxva2_h264_start_frame,
     .decode_slice   = dxva2_h264_decode_slice,
     .end_frame      = dxva2_h264_end_frame,
-    .priv_data_size = sizeof(struct dxva2_picture_context),
+    .frame_priv_data_size = sizeof(struct dxva2_picture_context),
 };
index c214e45a4d9dfc2f430c0b14594c6d3621755d0a..044e6693327667dda9d3c9a0258fcc995f51351c 100644 (file)
@@ -276,5 +276,5 @@ AVHWAccel ff_mpeg2_dxva2_hwaccel = {
     .start_frame    = dxva2_mpeg2_start_frame,
     .decode_slice   = dxva2_mpeg2_decode_slice,
     .end_frame      = dxva2_mpeg2_end_frame,
-    .priv_data_size = sizeof(struct dxva2_picture_context),
+    .frame_priv_data_size = sizeof(struct dxva2_picture_context),
 };
index 94fbbe4aa14d1d2f751f581651d12dccf84384ab..4f4dd1781233bdd2452344f5515b1e38792b1421 100644 (file)
@@ -279,7 +279,7 @@ AVHWAccel ff_wmv3_dxva2_hwaccel = {
     .start_frame    = dxva2_vc1_start_frame,
     .decode_slice   = dxva2_vc1_decode_slice,
     .end_frame      = dxva2_vc1_end_frame,
-    .priv_data_size = sizeof(struct dxva2_picture_context),
+    .frame_priv_data_size = sizeof(struct dxva2_picture_context),
 };
 #endif
 
@@ -291,5 +291,5 @@ AVHWAccel ff_vc1_dxva2_hwaccel = {
     .start_frame    = dxva2_vc1_start_frame,
     .decode_slice   = dxva2_vc1_decode_slice,
     .end_frame      = dxva2_vc1_end_frame,
-    .priv_data_size = sizeof(struct dxva2_picture_context),
+    .frame_priv_data_size = sizeof(struct dxva2_picture_context),
 };
index 133b588085dced225862bfd99e78be597a0617e5..e727233c58ecb74dd78b1414be064038977b8531 100644 (file)
@@ -258,8 +258,8 @@ static int alloc_picture(H264Context *h, H264Picture *pic)
     if (h->avctx->hwaccel) {
         const AVHWAccel *hwaccel = h->avctx->hwaccel;
         av_assert0(!pic->hwaccel_picture_private);
-        if (hwaccel->priv_data_size) {
-            pic->hwaccel_priv_buf = av_buffer_allocz(hwaccel->priv_data_size);
+        if (hwaccel->frame_priv_data_size) {
+            pic->hwaccel_priv_buf = av_buffer_allocz(hwaccel->frame_priv_data_size);
             if (!pic->hwaccel_priv_buf)
                 return AVERROR(ENOMEM);
             pic->hwaccel_picture_private = pic->hwaccel_priv_buf->data;
index f7f95a79ef27d5b8cb6efe2d5332a4c6f37c181c..4ec339ed248fb36370d7b5d17253447be3d58223 100644 (file)
@@ -460,8 +460,8 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
 
     if (s->avctx->hwaccel) {
         assert(!pic->hwaccel_picture_private);
-        if (s->avctx->hwaccel->priv_data_size) {
-            pic->hwaccel_priv_buf = av_buffer_allocz(s->avctx->hwaccel->priv_data_size);
+        if (s->avctx->hwaccel->frame_priv_data_size) {
+            pic->hwaccel_priv_buf = av_buffer_allocz(s->avctx->hwaccel->frame_priv_data_size);
             if (!pic->hwaccel_priv_buf) {
                 av_log(s->avctx, AV_LOG_ERROR, "alloc_frame_buffer() failed (hwaccel private data allocation)\n");
                 return -1;
index 7aa17efc29ad6b59c382fc762fcf9cbc7aaa0f41..32e9c2870665d215b6e327fef3f2386e59136917 100644 (file)
@@ -212,5 +212,5 @@ AVHWAccel ff_h264_vdpau_hwaccel = {
     .start_frame    = vdpau_h264_start_frame,
     .end_frame      = vdpau_h264_end_frame,
     .decode_slice   = vdpau_h264_decode_slice,
-    .priv_data_size = sizeof(struct vdpau_picture_context),
+    .frame_priv_data_size = sizeof(struct vdpau_picture_context),
 };
index 635629325375a3de46679e39d4e24cedea88100c..2b53e66edea24d1fd30a33646eda460eb2ab1cba 100644 (file)
@@ -103,7 +103,7 @@ AVHWAccel ff_mpeg1_vdpau_hwaccel = {
     .start_frame    = vdpau_mpeg_start_frame,
     .end_frame      = ff_vdpau_mpeg_end_frame,
     .decode_slice   = vdpau_mpeg_decode_slice,
-    .priv_data_size = sizeof(struct vdpau_picture_context),
+    .frame_priv_data_size = sizeof(struct vdpau_picture_context),
 };
 #endif
 
@@ -116,6 +116,6 @@ AVHWAccel ff_mpeg2_vdpau_hwaccel = {
     .start_frame    = vdpau_mpeg_start_frame,
     .end_frame      = ff_vdpau_mpeg_end_frame,
     .decode_slice   = vdpau_mpeg_decode_slice,
-    .priv_data_size = sizeof(struct vdpau_picture_context),
+    .frame_priv_data_size = sizeof(struct vdpau_picture_context),
 };
 #endif
index 57df86728fac8ef60598bf1845dfea06d3cc4047..64e781dec86f4d7466c80388c6fad5cceb381a84 100644 (file)
@@ -97,7 +97,7 @@ AVHWAccel ff_h263_vdpau_hwaccel = {
     .start_frame    = vdpau_mpeg4_start_frame,
     .end_frame      = ff_vdpau_mpeg_end_frame,
     .decode_slice   = vdpau_mpeg4_decode_slice,
-    .priv_data_size = sizeof(struct vdpau_picture_context),
+    .frame_priv_data_size = sizeof(struct vdpau_picture_context),
 };
 #endif
 
@@ -110,6 +110,6 @@ AVHWAccel ff_mpeg4_vdpau_hwaccel = {
     .start_frame    = vdpau_mpeg4_start_frame,
     .end_frame      = ff_vdpau_mpeg_end_frame,
     .decode_slice   = vdpau_mpeg4_decode_slice,
-    .priv_data_size = sizeof(struct vdpau_picture_context),
+    .frame_priv_data_size = sizeof(struct vdpau_picture_context),
 };
 #endif
index b100daa9819f9a7b9da896df1d7fd8579a6d6cd4..f7a7ecc3a5911b213ab477a4d9c3be25ff6bb0df 100644 (file)
@@ -118,7 +118,7 @@ AVHWAccel ff_wmv3_vdpau_hwaccel = {
     .start_frame    = vdpau_vc1_start_frame,
     .end_frame      = ff_vdpau_mpeg_end_frame,
     .decode_slice   = vdpau_vc1_decode_slice,
-    .priv_data_size = sizeof(struct vdpau_picture_context),
+    .frame_priv_data_size = sizeof(struct vdpau_picture_context),
 };
 #endif
 
@@ -130,5 +130,5 @@ AVHWAccel ff_vc1_vdpau_hwaccel = {
     .start_frame    = vdpau_vc1_start_frame,
     .end_frame      = ff_vdpau_mpeg_end_frame,
     .decode_slice   = vdpau_vc1_decode_slice,
-    .priv_data_size = sizeof(struct vdpau_picture_context),
+    .frame_priv_data_size = sizeof(struct vdpau_picture_context),
 };