From patchwork Tue Oct 10 01:27:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 44218 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4e24:b0:15d:8365:d4b8 with SMTP id gk36csp1772872pzb; Mon, 9 Oct 2023 18:42:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFxrKtua2yV9HVuaLdapOjV14DFy5gPfF9FkV+rZ4vTJTl8CEG2ofoRH89QSZuH25Ke76Nd X-Received: by 2002:a17:907:7850:b0:9ae:75dc:4589 with SMTP id lb16-20020a170907785000b009ae75dc4589mr16898337ejc.64.1696902121492; Mon, 09 Oct 2023 18:42:01 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g5-20020a170906394500b00992e9af8186si4973683eje.13.2023.10.09.18.42.00; Mon, 09 Oct 2023 18:42:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=HtMRxoek; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AE2B468CA69; Tue, 10 Oct 2023 04:41:58 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01olkn2029.outbound.protection.outlook.com [40.92.66.29]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B52AF68C79A for ; Tue, 10 Oct 2023 04:41:56 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UmqxkzabTxHjf3lnj/hEf5xpFIjtmBcO7VNrJsPLjo2Hu1fFn8gFlAsF1THncJEqxmxlgRd5e5Ex5/8kNbnqnIk71zSZW2efeege2O/9OTUhlupugONkKCqsAgwIyVJ4Fy1jwisDGCFzamUwWWCLx5ed1e36H1CEHe5jKrqV3mKuf7aJjRMlz4mZp0x5kRob8cMD7BwOjUFKBAUCdwGLEJ1SfQT43kc1kvThMKoZFFtDmPv+g7RyemHxFGWhj+BwEmJnZHiaVvYohgFdWfJxhXQUXQ1Y/B4iDzqcblLOtNl0BOfKEAZxU1LjfKZDQgBcVVV7fgTCkMHL4/mpgGhp/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZD/uSzAaONPxDVbRPBA+tF+W3u9mSmQQSrJadG12fis=; b=f95egDmilVw3sPQe9oaoTqdjvgW451DfeRCZPxkHXR9GN0HeK5hsgsoigIVDuQvNbDSGfirNqKd/hudJ43niZ/cnE6cnZwsmOgczesgA92ONthHA/vBZGGF5fhpK6JUqdGmdHabjFb9WLxqSezTrY7wGDOp0unalPDXHKu0XLtCv3K7X9Lz8U/DAlO1IrXd5scsDR7+b0bGe1225+fBmc10BjlooOAaUp3sO4FHegBNIPZjKpUxsy1LEHRUr1RytIIWogHFGtV/HmShjY0wZsIVZhEWtwpSjUMEoM7e5JumuBs5Gh5T0G6xTbe8eimE2tEimw4SzXpRi8P1fWACCsQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZD/uSzAaONPxDVbRPBA+tF+W3u9mSmQQSrJadG12fis=; b=HtMRxoekW4cocQXSw0Q2ZTOa/c5NtH/dO3unsrktsrOYKb6D6GQcVvwj8Uccy8BUuNaEyyuNTNrqinGw/kXwm5Ar9nFjbW5NdsTJcz3J5ALcGAbm58NoZymrFw66AsbHjOBci/u3Gw1B4NCaRoM0NKWUw0kLxgyN3O1XHxGQjkNc9wOQAYvdIorcz/WU/D5bf8VVhy1MXqufjD4ezlK4A3pPVrFrD5wMet/Fonn5C0peUWo1az4kd+kwv7X/BvBm2PR4uQz8UBbWjWe7M7lLY0W0HWBl9L9JgZm98Qtp2v7SdlUA1U/Gqifie5FKQcKT4vGDDm1EOlmGqOvgKXLtJA== Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) by PR3P250MB0193.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:178::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.36; Tue, 10 Oct 2023 01:26:14 +0000 Received: from DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::ec5a:5f06:b873:e81b]) by DU0P250MB0747.EURP250.PROD.OUTLOOK.COM ([fe80::ec5a:5f06:b873:e81b%4]) with mapi id 15.20.6863.032; Tue, 10 Oct 2023 01:26:14 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Tue, 10 Oct 2023 03:27:20 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [6sB93/NKnvf0HCLz9b4EpvmBl7d2xLJKiIfvzUuPVuc=] X-ClientProxiedBy: FR2P281CA0144.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:98::18) To DU0P250MB0747.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3cb::16) X-Microsoft-Original-Message-ID: <20231010012720.482970-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0P250MB0747:EE_|PR3P250MB0193:EE_ X-MS-Office365-Filtering-Correlation-Id: f6eb7649-d3ac-4ee9-9fe6-08dbc92fe480 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eau017L9sjNdOmNtDOO741TAFRQWkgbzs7B0xOboKKZQDgNhNB+wuj1t9OE4SHad3ZxSbw2Zvnt3a7JQAl6XSPD+7wKPw7ML4hatfT8D2+YKVI3kVVNFkEqXVGjn/XCgmEX6W5pwdkx5QzJr771W4ylWENvw0DW9yKB14zB9ZT8e+NPZcV5vRy9rMZVhN/L4QXeFtqmtC9R/FsJZYT8a6xpIiXN/KygxxLt18grHzQEUHUTpfjc8GXRUlt/TIvLioVdo8PSvCSHCPsFEwOtGreUCwe/i11zzymMJEBn7hBQ02HKRQ2Tm82zkbCPsCw3/Xj6vj0ezgE1Fdxe032m4eXTXZG9TsS9z6U6KO5o2uo1C/zTQmMFp6EUgU/735xAHl8dac9r4K4d97HGicX06JIy94MI9hRmHK+BZnENs0I+2Aj0K/rttVzxUCYZ8amNlj3ODF2Gq+fYg716ZHisORHo2JX5k7zYTQSxpIqMJ1HHC3bZFKj7H2DOmhqCbkgFrP3fsBd5XkbOo3s5AK7WxmhncEQOBXyVsrlZeuEIPCqZmUMHAO3VyWcdC9CSoSdDmHUAai0N5KVZ5WSMILl+sCFJeHnWL4H1pBCYglWpeNzi/zKS+MaVqEoutmuWacCPz X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3EbOK073cH4CKvVbHoPTbCHJy6ZRR32Jq8u/8QD6TI56nOduI01Hs4+u8jCv2tUDizWodwywTWqE5oeVA9Reb6bfOToWQz3zPg2v/mJByyJ9OCUB+13rsQTDlJgzyc8SzduH4GowqeL6/KOT97IFkYMBEkiLHXpKSg57aujcSP6K7I8VVEet94F8eiSosmxsU3WyMRccQlxqQgD+ecAGauDXI/kCxYm9xKLQ+PWWbycK+I/933tEsv5xW/qUDQaeTfU5piQlUZ6zv4+mnpU95U/XJVHoA/hISblf92GQLEa+hr4W5wWrCGyMr1ao/zXYM/WKOx0CT3cPZKppPpMdPJNtvFwAOyHJfAdiLOzLDebJ9/Otwp+crufxCCJDwCWcySIQvJq6tYdqlpCpyuiYh+a0+sDD98JTRARbjW/MCEk9dbJBxUdjcgxy9VJXkha7WaQpm0JAQRHK1WU+y05/uFgrQ9BA8H8ZyqIPgS7yLIYQBBl5E0EEkM2ycl5Rg06EmhcQfHUZR8/HjsUWtHrVd6Vv8TVfNBVKd9MvDs45ZdgjDLZ6BP4QlrRT7CvR8zhSpRKicIX0m3/gOhVCXIEyHTHgm2L5zy7BqnqDcYzT4ihFTF7AImSdgOUqPd7A2xs6aKezwajD3w4dpQ5sv3/6Yxn+iAsv1okqxNxlcHqF+k7BG956UsOGfJgSUtLXciw9viB94uVNby3Y6HTDxH27zCHAQvRN0UYY6DobpSZdkihyLSNMTy6r4JcV73y0hUVmt7fnYKn9YyaKKY4YpfPgsw/NCP53LYGdcjufCZ6ejhmKtVsLZZFRGw0nysLVFbGa+h2w87xwzIqzBRXJxA4skXTO0+ZS7ywZ2AmXP6Eq3hXVZ1LDsCWLJzC3ANlhuVcIrFrFePQlzrCT42u36YjxykOapqUOadFanu95VD4+QrS//6MHZrIpGLcK0iS0rKM0YSycMKIwbDYDzdfYAt9zxOwov4GwmMZpxGJajivqLBWu+RnUb+U27vM69e3YiZrYS+xw2/A3Zz3dgtPvRigT34mzCJxWWg80+Cx0M2LgcZt5OMFPZeDgkNDi8ucF3V4r8ll9mOnRDKUDOicJe4euOLY+BIuJb2hsd5F5mcGuiZroVNDhErvU/G7OpG9h4tRjohpZNx1e4cVw6dQ5Dp91YPC1sxvK4HZOBqognbmr5Slt2emwTz02WgVU54EWTrIuK7yYfA6gr2j2mAPrNyXe8sL6M8t8Xeo1lk5oK4LWteKSD5y4vghm8FjXA2JX0Rny X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f6eb7649-d3ac-4ee9-9fe6-08dbc92fe480 X-MS-Exchange-CrossTenant-AuthSource: DU0P250MB0747.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2023 01:26:14.7340 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3P250MB0193 Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/h264dec: Constify H.264 decoder X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: cc0jmBViDHWX Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_cavlc.c | 2 +- libavcodec/h264_direct.c | 6 +++--- libavcodec/h264_picture.c | 6 +++--- libavcodec/h264_refs.c | 7 ++++--- libavcodec/h264_slice.c | 23 +++++++++++------------ libavcodec/h264dec.c | 4 ++-- libavcodec/h264dec.h | 6 +++--- 7 files changed, 27 insertions(+), 27 deletions(-) diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c index a06b775422..de223611c6 100644 --- a/libavcodec/h264_cavlc.c +++ b/libavcodec/h264_cavlc.c @@ -282,7 +282,7 @@ static int8_t cavlc_level_tab[7][1<non_zero_count_cache[index8 - 1]; diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index 014491e29b..587274aa6d 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -34,7 +34,7 @@ #include -static int get_scale_factor(H264SliceContext *sl, +static int get_scale_factor(const H264SliceContext *sl, int poc, int poc1, int i) { int poc0 = sl->ref_list[0][i].poc; @@ -83,7 +83,7 @@ static void fill_colmap(const H264Context *h, H264SliceContext *sl, int map[2][16 + 32], int list, int field, int colfield, int mbafi) { - H264Picture *const ref1 = sl->ref_list[1][0].parent; + const H264Picture *const ref1 = sl->ref_list[1][0].parent; int j, old_ref, rfield; int start = mbafi ? 16 : 0; int end = mbafi ? 16 + 2 * sl->ref_count[0] : sl->ref_count[0]; @@ -150,7 +150,7 @@ void ff_h264_direct_ref_list_init(const H264Context *const h, H264SliceContext * if (h->picture_structure == PICT_FRAME) { int cur_poc = h->cur_pic_ptr->poc; - int *col_poc = sl->ref_list[1][0].parent->field_poc; + const int *col_poc = sl->ref_list[1][0].parent->field_poc; if (col_poc[0] == INT_MAX && col_poc[1] == INT_MAX) { av_log(h->avctx, AV_LOG_ERROR, "co located POCs unavailable\n"); sl->col_parity = 1; diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c index 9353e4b445..c3726059f7 100644 --- a/libavcodec/h264_picture.c +++ b/libavcodec/h264_picture.c @@ -94,7 +94,7 @@ static void h264_copy_picture_params(H264Picture *dst, const H264Picture *src) dst->needs_fg = src->needs_fg; } -int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src) +int ff_h264_ref_picture(H264Context *h, H264Picture *dst, const H264Picture *src) { int ret, i; @@ -194,7 +194,7 @@ fail: return ret; } -void ff_h264_set_erpic(ERPicture *dst, H264Picture *src) +void ff_h264_set_erpic(ERPicture *dst, const H264Picture *src) { #if CONFIG_ERROR_RESILIENCE int i; @@ -240,7 +240,7 @@ int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup) av_log(avctx, AV_LOG_ERROR, "hardware accelerator failed to decode picture\n"); } else if (!in_setup && cur->needs_fg && (!FIELD_PICTURE(h) || !h->first_field)) { - AVFrameSideData *sd = av_frame_get_side_data(cur->f, AV_FRAME_DATA_FILM_GRAIN_PARAMS); + const AVFrameSideData *sd = av_frame_get_side_data(cur->f, AV_FRAME_DATA_FILM_GRAIN_PARAMS); err = AVERROR_INVALIDDATA; if (sd) // a decoding error may have happened before the side data could be allocated diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 1b24c493df..55f7255f01 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -48,7 +48,7 @@ static void pic_as_field(H264Ref *pic, const int parity) pic->poc = pic->parent->field_poc[parity == PICT_BOTTOM_FIELD]; } -static void ref_from_h264pic(H264Ref *dst, H264Picture *src) +static void ref_from_h264pic(H264Ref *dst, const H264Picture *src) { memcpy(dst->data, src->f->data, sizeof(dst->data)); memcpy(dst->linesize, src->f->linesize, sizeof(dst->linesize)); @@ -58,7 +58,8 @@ static void ref_from_h264pic(H264Ref *dst, H264Picture *src) dst->parent = src; } -static int split_field_copy(H264Ref *dest, H264Picture *src, int parity, int id_add) +static int split_field_copy(H264Ref *dest, const H264Picture *src, + int parity, int id_add) { int match = !!(src->reference & parity); @@ -275,7 +276,7 @@ static void h264_fill_mbaff_ref_list(H264SliceContext *sl) int list, i, j; for (list = 0; list < sl->list_count; list++) { for (i = 0; i < sl->ref_count[list]; i++) { - H264Ref *frame = &sl->ref_list[list][i]; + const H264Ref *frame = &sl->ref_list[list][i]; H264Ref *field = &sl->ref_list[list][16 + 2 * i]; field[0] = *frame; diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 27428dea33..1311ea0437 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -266,7 +266,7 @@ fail: return (ret < 0) ? ret : AVERROR(ENOMEM); } -static int find_unused_picture(H264Context *h) +static int find_unused_picture(const H264Context *h) { int i; @@ -285,9 +285,8 @@ static int find_unused_picture(H264Context *h) (pic) < (old_ctx)->DPB + H264_MAX_PICTURE_COUNT) ? \ &(new_ctx)->DPB[(pic) - (old_ctx)->DPB] : NULL) -static void copy_picture_range(H264Picture **to, H264Picture **from, int count, - H264Context *new_base, - H264Context *old_base) +static void copy_picture_range(H264Picture **to, H264Picture *const *from, int count, + H264Context *new_base, const H264Context *old_base) { int i; @@ -583,8 +582,8 @@ FF_ENABLE_DEPRECATION_WARNINGS } static av_always_inline void backup_mb_border(const H264Context *h, H264SliceContext *sl, - uint8_t *src_y, - uint8_t *src_cb, uint8_t *src_cr, + const uint8_t *src_y, + const uint8_t *src_cb, const uint8_t *src_cr, int linesize, int uvlinesize, int simple) { @@ -1185,7 +1184,7 @@ static int h264_export_frame_props(H264Context *h) } if (sps->pic_struct_present_flag && h->sei.picture_timing.present) { - H264SEIPictureTiming *pt = &h->sei.picture_timing; + const H264SEIPictureTiming *pt = &h->sei.picture_timing; switch (pt->pic_struct) { case H264_SEI_PIC_STRUCT_FRAME: break; @@ -1983,7 +1982,7 @@ static int h264_slice_init(H264Context *h, H264SliceContext *sl, if (j < sl->list_count && i < sl->ref_count[j] && sl->ref_list[j][i].parent->f->buf[0]) { int k; - AVBuffer *buf = sl->ref_list[j][i].parent->f->buf[0]->buffer; + const AVBuffer *buf = sl->ref_list[j][i].parent->f->buf[0]->buffer; for (k = 0; k < h->short_ref_count; k++) if (h->short_ref[k]->f->buf[0]->buffer == buf) { id_list[i] = k; @@ -2178,9 +2177,9 @@ int ff_h264_get_slice_type(const H264SliceContext *sl) static av_always_inline void fill_filter_caches_inter(const H264Context *h, H264SliceContext *sl, int mb_type, int top_xy, - int left_xy[LEFT_MBS], + const int left_xy[LEFT_MBS], int top_type, - int left_type[LEFT_MBS], + const int left_type[LEFT_MBS], int mb_xy, int list) { int b_stride = h->b_stride; @@ -2237,7 +2236,7 @@ static av_always_inline void fill_filter_caches_inter(const H264Context *h, } { - int8_t *ref = &h->cur_pic.ref_index[list][4 * mb_xy]; + const int8_t *ref = &h->cur_pic.ref_index[list][4 * mb_xy]; const int *ref2frm = &h->ref2frm[sl->slice_num & (MAX_SLICES - 1)][list][(MB_MBAFF(sl) ? 20 : 2)]; uint32_t ref01 = (pack16to32(ref2frm[ref[0]], ref2frm[ref[1]]) & 0x00FF00FF) * 0x0101; uint32_t ref23 = (pack16to32(ref2frm[ref[2]], ref2frm[ref[3]]) & 0x00FF00FF) * 0x0101; @@ -2264,7 +2263,7 @@ static int fill_filter_caches(const H264Context *h, H264SliceContext *sl, int mb const int mb_xy = sl->mb_xy; int top_xy, left_xy[LEFT_MBS]; int top_type, left_type[LEFT_MBS]; - uint8_t *nnz; + const uint8_t *nnz; uint8_t *nnz_cache; top_xy = mb_xy - (h->mb_stride << MB_FIELD(sl)); diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 796f80be8d..105bd9f631 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -66,7 +66,7 @@ static void h264_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type, int (*mv)[2][4][2], int mb_x, int mb_y, int mb_intra, int mb_skipped) { - H264Context *h = opaque; + const H264Context *h = opaque; H264SliceContext *sl = &h->slice_ctx[0]; sl->mb_x = mb_x; @@ -832,7 +832,7 @@ static int get_consumed_bytes(int pos, int buf_size) return pos; } -static int h264_export_enc_params(AVFrame *f, H264Picture *p) +static int h264_export_enc_params(AVFrame *f, const H264Picture *p) { AVVideoEncParams *par; unsigned int nb_mb = p->mb_height * p->mb_width; diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h index 0009b539e7..14e9038275 100644 --- a/libavcodec/h264dec.h +++ b/libavcodec/h264dec.h @@ -165,7 +165,7 @@ typedef struct H264Ref { int poc; int pic_id; - H264Picture *parent; + const H264Picture *parent; } H264Ref; typedef struct H264SliceContext { @@ -653,7 +653,7 @@ static av_always_inline int get_chroma_qp(const PPS *pps, int t, int qscale) int ff_h264_field_end(H264Context *h, H264SliceContext *sl, int in_setup); -int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src); +int ff_h264_ref_picture(H264Context *h, H264Picture *dst, const H264Picture *src); int ff_h264_replace_picture(H264Context *h, H264Picture *dst, const H264Picture *src); void ff_h264_unref_picture(H264Context *h, H264Picture *pic); @@ -678,6 +678,6 @@ void ff_h264_flush_change(H264Context *h); void ff_h264_free_tables(H264Context *h); -void ff_h264_set_erpic(ERPicture *dst, H264Picture *src); +void ff_h264_set_erpic(ERPicture *dst, const H264Picture *src); #endif /* AVCODEC_H264DEC_H */