---
Split from the conversion to follow, as suggested by Diego.

 libavcodec/vaapi_h264.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
index 931357a..8769786 100644
--- a/libavcodec/vaapi_h264.c
+++ b/libavcodec/vaapi_h264.c
@@ -52,9 +52,9 @@ static void init_vaapi_pic(VAPictureH264 *va_pic)
  * @param[in]  pic_structure   The picture field type (as defined in 
mpegvideo.h),
  *                             supersedes pic's field type if nonzero.
  */
-static void fill_vaapi_pic(VAPictureH264 *va_pic,
-                           H264Picture   *pic,
-                           int            pic_structure)
+static void fill_vaapi_pic(VAPictureH264     *va_pic,
+                           const H264Picture *pic,
+                           int                pic_structure)
 {
     if (pic_structure == 0)
         pic_structure = pic->reference;
@@ -123,7 +123,7 @@ static int dpb_add(DPB *dpb, H264Picture *pic)

 /** Fill in VA API reference frames array. */
 static int fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param,
-                                      H264Context                  *h)
+                                      const H264Context            *h)
 {
     DPB dpb;
     int i;
@@ -156,9 +156,9 @@ static int 
fill_vaapi_ReferenceFrames(VAPictureParameterBufferH264 *pic_param,
  * @param[in]  ref_list    A pointer to the Libav reference list
  * @param[in]  ref_count   The number of reference pictures in ref_list
  */
-static void fill_vaapi_RefPicList(VAPictureH264 RefPicList[32],
-                                  H264Ref  *ref_list,
-                                  unsigned int  ref_count)
+static void fill_vaapi_RefPicList(VAPictureH264  RefPicList[32],
+                                  const H264Ref *ref_list,
+                                  unsigned int   ref_count)
 {
     unsigned int i, n = 0;
     for (i = 0; i < ref_count; i++)
@@ -184,7 +184,7 @@ static void fill_vaapi_RefPicList(VAPictureH264 
RefPicList[32],
  * @param[out] chroma_weight       VA API plain chroma weight table
  * @param[out] chroma_offset       VA API plain chroma offset table
  */
-static void fill_vaapi_plain_pred_weight_table(H264Context   *h,
+static void fill_vaapi_plain_pred_weight_table(const H264Context *h,
                                                int            list,
                                                unsigned char *luma_weight_flag,
                                                short          luma_weight[32],
@@ -226,12 +226,12 @@ static int vaapi_h264_start_frame(AVCodecContext          
*avctx,
                                   av_unused const uint8_t *buffer,
                                   av_unused uint32_t       size)
 {
-    H264Context * const h = avctx->priv_data;
-    struct vaapi_context * const vactx = avctx->hwaccel_context;
-    const PPS *pps = h->ps.pps;
-    const SPS *sps = h->ps.sps;
+    struct vaapi_context *vactx = avctx->hwaccel_context;
+    const H264Context  *h   = avctx->priv_data;
+    const PPS          *pps = h->ps.pps;
+    const SPS          *sps = h->ps.sps;
     VAPictureParameterBufferH264 *pic_param;
-    VAIQMatrixBufferH264 *iq_matrix;
+    VAIQMatrixBufferH264         *iq_matrix;

     vactx->slice_param_size = sizeof(VASliceParameterBufferH264);

@@ -292,9 +292,9 @@ static int vaapi_h264_start_frame(AVCodecContext          
*avctx,
 /** End a hardware decoding based frame. */
 static int vaapi_h264_end_frame(AVCodecContext *avctx)
 {
-    struct vaapi_context * const vactx = avctx->hwaccel_context;
-    H264Context * const h = avctx->priv_data;
-    H264SliceContext *sl = &h->slice_ctx[0];
+    struct vaapi_context *vactx = avctx->hwaccel_context;
+    const H264Context  *h   = avctx->priv_data;
+    H264SliceContext   *sl  = &h->slice_ctx[0];
     int ret;

     ret = ff_vaapi_commit_slices(vactx);
@@ -317,8 +317,8 @@ static int vaapi_h264_decode_slice(AVCodecContext *avctx,
                                    const uint8_t  *buffer,
                                    uint32_t        size)
 {
-    H264Context * const h = avctx->priv_data;
-    H264SliceContext *sl  = &h->slice_ctx[0];
+    const H264Context      *h   = avctx->priv_data;
+    const H264SliceContext *sl  = &h->slice_ctx[0];
     VASliceParameterBufferH264 *slice_param;

     /* Fill in VASliceParameterBufferH264. */
-- 
2.8.1

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to