From patchwork Mon Apr 29 21:14:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48388 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1509:b0:1a9:af23:56c1 with SMTP id nq9csp2271506pzb; Mon, 29 Apr 2024 14:17:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVqgxlt3ygrWOFR/3pxpnVPa1y7aeB1/QQud6EM69Dkjm0f2upWgATpkGRrxCAC54zGCd1G4cUR9cztFq/QsVr9/phSDph7w/kPyg== X-Google-Smtp-Source: AGHT+IHKrDRqWtDONqx3D5FJ0Sco59Fdog4CayVRnzWVMaXI6hH4wPZv8H+RnlJCT3auqtq1h6l3 X-Received: by 2002:a05:6512:54e:b0:516:c241:a912 with SMTP id h14-20020a056512054e00b00516c241a912mr6685297lfl.1.1714425450031; Mon, 29 Apr 2024 14:17:30 -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 qf4-20020a1709077f0400b00a55a9bd5268si11809064ejc.538.2024.04.29.14.17.29; Mon, 29 Apr 2024 14:17:29 -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=WkNGqhVH; 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 A47DD68D584; Tue, 30 Apr 2024 00:16:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02olkn2025.outbound.protection.outlook.com [40.92.50.25]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EF27368D575 for ; Tue, 30 Apr 2024 00:15:59 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nRUiNGYPh1NO0HPN4Mxu2gH6Dsm7pF6WgCmmxAxza5BnOWQl4BC35ojhPHPDs46hRgvU8hvVvNWs49iEnqGxlVxDzNL/RQm6XsKqhC0o6K2KLno7pzxzGaFl7yZJWwSELb/FPJ9UqGWxKMxrVCgMvFYKpFPlDeSKPAdDyaGVtZDcFSpm8xYu3fymxTxIU1e01vmIpnKhFiIgC/4w1Aunp335pVzCFAI9s9JuRdUfxpaDk999bDMd6Aaegp/Me7Y/dI6qRwWo0TjiB19pL4v07e5VwE2Oo5H0RrLnQU2IkfVL6tVfKH7BovbrGdOXkpyNdl9WHuhJjo1PvQDeuWNb6w== 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=Dlzs/2ngO+A4/W4mN8gGojM9rToeZt1bMzsbdTcUHZk=; b=M07N5CZGrnT44zRyQRCtn/kXtm8sOO1dztLNEZ2h7X6zoHsfg/8Tgx0VEe5K3L939UTOkyQ1TQkG4rz+KRJxzFzbWmvPth2XRbbb5SNZz1pNNMdx9harqAhzQsjeOhYCAu9sTTYwaMBMiUzNoO0VXzGUTbF3TC/4FcIFF3Yq8jDcdH8Q5ufL1IGTCmMao1gZrSr1fImxXoUlrC4pBnQwDJ/eyIvfsToOh3/eNwhEIRtnEz2zFzgbewIvhljeEIIHgRMkkgZrdDk6/IMlfF/wE/DEBi4JPB41hOK+k7pptuR8fU1rmIbI5HTr1lz7VIeP8hfunIgXJ0cWVqmNyIUj6w== 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=Dlzs/2ngO+A4/W4mN8gGojM9rToeZt1bMzsbdTcUHZk=; b=WkNGqhVHt4fLaXnvPOO4mTiTPPU9XSBdSTxfi6jCXVkX3eYtBgraKr68SXdiewONzulhE1GfWfHy76+dXJgkNQprtv+oMUA8hTW8nmHHX9giUyU+m/txpot0evxN36X1WkZU96j5YXCXhTnFo16d/owxQOxpkUTeZ1fIH0g+dJ3sIGRvUHjRMuaTa9gPGqYlQZgj9LvPEJdwO018vSZJ7Y5MA7uUnM8hX7Z8QnFLnvhgbzFyyTNOudyxMqEE9eEm9nUlkNqJ2UpFS8YKCg22zT+ZAXU2+KwNbtspkQmwTyXMoJY9MSDd6w++0YIUHnhimYXSGwi0dN8xP9mZ0BaQtA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0372.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 29 Apr 2024 21:15:58 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::1f29:8206:b8c3:45bb%3]) with mapi id 15.20.7519.031; Mon, 29 Apr 2024 21:15:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 29 Apr 2024 23:14:11 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [0AbyC7MaA5uyOj+6cwE2Lmw1FGY2tWpOHt5b6iOeYmM=] X-ClientProxiedBy: ZR0P278CA0199.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:6a::21) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240429211438.3274834-16-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0372:EE_ X-MS-Office365-Filtering-Correlation-Id: 605837da-072d-4953-667d-08dc6891906b X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|56899024|3412199016|440099019|1710799017; X-Microsoft-Antispam-Message-Info: Fi1SBGiurEqftgFvpvD0eBmHZkH6QSzpq+1xNhb+BZgGk/19eM2x8K3uKhy5PwaTn+oX19DXIpX78IYLSAiuXEepBQAdFg0tipM/JnBFhtgKQxOAxExEwpjrzXyshlb+02cIGY55nJp681fJA7SNcKwxZGneViuTt8BGdQuc6eEL4dNWymAaKakmXUXWU8gTu8QHniN10h8knC8c3V4/mBbPoZjCvqHh4j/2kg4m6bN+psLaz8lMhu85Bu5cIgkufUZ033CXSiIkT5k4CGQdUjFjmvHSCQFBeV2U+/QPIDEm3Lz1eQgAoXNVnr8RvtGtd732Rw/Ammm5qQzlUmxpBbtcmn/ldYsQt6+VJ/Al9CSROWTgyFjfL+C7GeDtdv17749fYrTK3wwzg7EM7tArJYVB3mj+saMEgGfsj0bjobYfOVU+vCT3r5Jsi40ayl7BcCeA6hW9Vw+3J3drrha4mkQuLDSA4X70QSHAmsQc65dtgQcW41nBWWGvzRkm12k4V0MDV8VpI7WLpS7xML27FUp/y+enCeN7E71ouJi4300rEHMryF3IEDOZ6S44LP72MljMpSwrPTmhRfzuSoJLhvVN0tD0fksniopI1L3uOoIAvqcQu3szUuuN9E4q78XV X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: WL0FI+ME3ma/6+ejcfnreTr8Hx4Mh3UEPIsc6JrOc4QE6Oo02gNuRQnFDH8dym0VJSsDug53qHMRC2aDLHGS6QCxIqUDe3sJBH9TYd58aL5BxfH+c9SVQlqqf4FYnt7No4DgxwPWPbaye2wDOIPKyJ2EnclVXQIxHN3Y3I8R70il3bxCXApC5SKnn45EvkoeC2WhakfbRzogy85nZTb+UhtATPrLQ/ztaOb5NyPGFENnsRinQEqEhsW/7/TiCEvJXe49X7bl33Ynjx4jECjykK4cScdHkDUQx3iZdqq7ZgDr3zCTanA0lYhy1fJj0qqukUVZQJHBJ0jsWy8HBQ9AjQjX4G5GvklZXJj5fRbahLNgR5KVMyIC1edFYPX8/WhuOZniQXHbgW3OTfw4dJxyn+gKze495Pq9DiGcImAFZCzI6iQbHpL7aGqj+Qx8Fz41vIFaZt20bsA05wxIuViqnV3TmZ+/eTHF1Sbis6hDkrKhgMs39zfdjfBzCw3DInpsmQgOxLlH4yafbAJK2AUGNglv6IVkFc6qNUQVlBmnDVKKCmal0W2Gkn8M/EW6zdI7BinjtB28uEVOqeRPgnhim3UwPYkjG6N7o9iD2XLlNuztnSDPlVSqMzoi+Gn53KELeFAmoWyTqNOjU1fnF6hwaB8pzPMX3xSmTubmMYYcnmyb0N9W55ETU14ZfHfzcS8wRuBnnVcMgrRH7u97N4Fou2Fkpw09BGThLc1Zh4hNY3beG1tDLvSMaimdUu4mClGpDMHxPNX8KU9GIPFhykjOrYXZhGuWn04rPhqqs+Oj4wNNmXQyjGQlPXym1985ocAKxoMwoB8W5sMCUAad/JTS/hpJZVcaOmjfs2xeSDyZRwdpp64kK5mLw+eeBfzme/ApBcxUTZcLTb5AkS4ynP2CnJxVj+xvSRlsOmOMwj1EF2Rj8JFb8ZhGM+KDL9Hfqb4d/P06dKbynvGfJrx2JRbQZHtXfZyDsR111+fi849jKx5OTV+FQjH3zNGhlElWZOSyVpSZAManIyj9JkacSTiuLLEuX7ipLq2NAxgC+DPLo0r6Lc0PxkNCSF7nj1D8mLxWS/ol4mcZ1ASauS6M5mpzN4Iryna72dkjAVKUpl5ceVJ41nxHOOU2tBXRuNgDSAE1E7sEKlsyG4a/KpWqaSPaO6z3CGqNXTgMgk5UV3AqKdPrTXH2Cl2SB0iHh3bVxaBv1jiMTmkAlb+Rpfp8Z3qy+g1eqa3MNnHMQuhlG0KTf/uwUByPgZJ/UxRkQWt5ZUJ6ZqqtjRqMwpqXGM+ipq9Xqg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 605837da-072d-4953-667d-08dc6891906b X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 21:15:58.4276 (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: PR3P250MB0372 Subject: [FFmpeg-devel] [PATCH 30/57] avcodec/mpegpicture: Rename Picture->MPVPicture 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: uEzLGPSnf59r Picture is just too generic. Signed-off-by: Andreas Rheinhardt --- libavcodec/dxva2_mpeg2.c | 2 +- libavcodec/dxva2_vc1.c | 4 ++-- libavcodec/intrax8.c | 2 +- libavcodec/intrax8.h | 2 +- libavcodec/ituh263dec.c | 4 ++-- libavcodec/mpeg4videoenc.c | 2 +- libavcodec/mpeg_er.c | 2 +- libavcodec/mpegpicture.c | 16 ++++++++-------- libavcodec/mpegpicture.h | 18 +++++++++--------- libavcodec/mpegvideo.h | 18 +++++++++--------- libavcodec/mpegvideo_dec.c | 13 +++++++------ libavcodec/mpegvideo_enc.c | 6 +++--- libavcodec/mpegvideo_motion.c | 2 +- libavcodec/mpegvideodec.h | 5 +++-- libavcodec/mss2.c | 2 +- libavcodec/ratecontrol.c | 2 +- libavcodec/rv34.c | 2 +- libavcodec/vc1dec.c | 2 +- libavcodec/vdpau.c | 2 +- libavcodec/vdpau_mpeg12.c | 4 ++-- libavcodec/vdpau_mpeg4.c | 2 +- libavcodec/vdpau_vc1.c | 4 ++-- 22 files changed, 59 insertions(+), 57 deletions(-) diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c index fde615f530..d29a5bb538 100644 --- a/libavcodec/dxva2_mpeg2.c +++ b/libavcodec/dxva2_mpeg2.c @@ -45,7 +45,7 @@ void ff_dxva2_mpeg2_fill_picture_parameters(AVCodecContext *avctx, DXVA_PictureParameters *pp) { const struct MpegEncContext *s = avctx->priv_data; - const Picture *current_picture = s->cur_pic_ptr; + const MPVPicture *current_picture = s->cur_pic_ptr; int is_field = s->picture_structure != PICT_FRAME; memset(pp, 0, sizeof(*pp)); diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c index 7122f1cfea..f536da1008 100644 --- a/libavcodec/dxva2_vc1.c +++ b/libavcodec/dxva2_vc1.c @@ -46,7 +46,7 @@ void ff_dxva2_vc1_fill_picture_parameters(AVCodecContext *avctx, { const VC1Context *v = avctx->priv_data; const MpegEncContext *s = &v->s; - const Picture *current_picture = s->cur_pic_ptr; + const MPVPicture *current_picture = s->cur_pic_ptr; int intcomp = 0; // determine if intensity compensation is needed @@ -336,7 +336,7 @@ static int dxva2_vc1_decode_slice(AVCodecContext *avctx, uint32_t size) { const VC1Context *v = avctx->priv_data; - const Picture *current_picture = v->s.cur_pic_ptr; + const MPVPicture *current_picture = v->s.cur_pic_ptr; struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private; unsigned position; diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c index 40085c69ce..f1dce86a50 100644 --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@ -730,7 +730,7 @@ av_cold void ff_intrax8_common_end(IntraX8Context *w) av_freep(&w->prediction_table); } -int ff_intrax8_decode_picture(IntraX8Context *w, Picture *pict, +int ff_intrax8_decode_picture(IntraX8Context *w, MPVPicture *pict, GetBitContext *gb, int *mb_x, int *mb_y, int dquant, int quant_offset, int loopfilter, int lowdelay) diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h index 8e22361f1f..b9f8c4250b 100644 --- a/libavcodec/intrax8.h +++ b/libavcodec/intrax8.h @@ -106,7 +106,7 @@ void ff_intrax8_common_end(IntraX8Context *w); * @param quant_offset offset away from zero * @param loopfilter enable filter after decoding a block */ -int ff_intrax8_decode_picture(IntraX8Context *w, Picture *pict, +int ff_intrax8_decode_picture(IntraX8Context *w, MPVPicture *pict, GetBitContext *gb, int *mb_x, int *mb_y, int quant, int halfpq, int loopfilter, int lowdelay); diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 492cb5e0d4..2e4d74adc8 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -719,7 +719,7 @@ static int h263_get_modb(GetBitContext *gb, int pb_frame, int *cbpb) #define tab_size ((signed)FF_ARRAY_ELEMS(s->direct_scale_mv[0])) #define tab_bias (tab_size / 2) -static inline void set_one_direct_mv(MpegEncContext *s, const Picture *p, int i) +static inline void set_one_direct_mv(MpegEncContext *s, const MPVPicture *p, int i) { int xy = s->block_index[i]; uint16_t time_pp = s->pp_time; @@ -750,7 +750,7 @@ static inline void set_one_direct_mv(MpegEncContext *s, const Picture *p, int i) static int set_direct_mv(MpegEncContext *s) { const int mb_index = s->mb_x + s->mb_y * s->mb_stride; - const Picture *p = &s->next_pic; + const MPVPicture *p = &s->next_pic; int colocated_mb_type = p->mb_type[mb_index]; int i; diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 596155c8a1..6c743b8641 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -654,7 +654,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64], for (i = 0; i < s->max_b_frames; i++) { const uint8_t *b_pic; int diff; - Picture *pic = s->reordered_input_picture[i + 1]; + const MPVPicture *pic = s->reordered_input_picture[i + 1]; if (!pic || pic->f->pict_type != AV_PICTURE_TYPE_B) break; diff --git a/libavcodec/mpeg_er.c b/libavcodec/mpeg_er.c index 360f3ce3e0..21fe7d6f71 100644 --- a/libavcodec/mpeg_er.c +++ b/libavcodec/mpeg_er.c @@ -22,7 +22,7 @@ #include "mpegvideodec.h" #include "mpeg_er.h" -static void set_erpic(ERPicture *dst, const Picture *src) +static void set_erpic(ERPicture *dst, const MPVPicture *src) { int i; diff --git a/libavcodec/mpegpicture.c b/libavcodec/mpegpicture.c index 8a058c4a77..644097f2cb 100644 --- a/libavcodec/mpegpicture.c +++ b/libavcodec/mpegpicture.c @@ -30,7 +30,7 @@ #include "refstruct.h" #include "threadframe.h" -static void av_noinline free_picture_tables(Picture *pic) +static void av_noinline free_picture_tables(MPVPicture *pic) { ff_refstruct_unref(&pic->mbskip_table); ff_refstruct_unref(&pic->qscale_table_base); @@ -116,7 +116,7 @@ int ff_mpv_pic_check_linesize(void *logctx, const AVFrame *f, return 0; } -static int alloc_picture_tables(BufferPoolContext *pools, Picture *pic, +static int alloc_picture_tables(BufferPoolContext *pools, MPVPicture *pic, int mb_height) { #define GET_BUFFER(name, buf_suffix, idx_suffix) do { \ @@ -142,7 +142,7 @@ static int alloc_picture_tables(BufferPoolContext *pools, Picture *pic, return 0; } -int ff_mpv_alloc_pic_accessories(AVCodecContext *avctx, Picture *pic, +int ff_mpv_alloc_pic_accessories(AVCodecContext *avctx, MPVPicture *pic, MotionEstContext *me, ScratchpadContext *sc, BufferPoolContext *pools, int mb_height) { @@ -180,7 +180,7 @@ fail: * Deallocate a picture; frees the picture tables in case they * need to be reallocated anyway. */ -void ff_mpeg_unref_picture(Picture *pic) +void ff_mpeg_unref_picture(MPVPicture *pic) { pic->tf.f = pic->f; ff_thread_release_ext_buffer(&pic->tf); @@ -202,7 +202,7 @@ void ff_mpeg_unref_picture(Picture *pic) pic->coded_picture_number = 0; } -static void update_picture_tables(Picture *dst, const Picture *src) +static void update_picture_tables(MPVPicture *dst, const MPVPicture *src) { ff_refstruct_replace(&dst->mbskip_table, src->mbskip_table); ff_refstruct_replace(&dst->qscale_table_base, src->qscale_table_base); @@ -222,7 +222,7 @@ static void update_picture_tables(Picture *dst, const Picture *src) dst->mb_stride = src->mb_stride; } -int ff_mpeg_ref_picture(Picture *dst, Picture *src) +int ff_mpeg_ref_picture(MPVPicture *dst, MPVPicture *src) { int ret; @@ -259,7 +259,7 @@ fail: return ret; } -int ff_find_unused_picture(AVCodecContext *avctx, Picture *picture, int shared) +int ff_find_unused_picture(AVCodecContext *avctx, MPVPicture *picture, int shared) { for (int i = 0; i < MAX_PICTURE_COUNT; i++) if (!picture[i].f->buf[0]) @@ -282,7 +282,7 @@ int ff_find_unused_picture(AVCodecContext *avctx, Picture *picture, int shared) return -1; } -void av_cold ff_mpv_picture_free(Picture *pic) +void av_cold ff_mpv_picture_free(MPVPicture *pic) { ff_mpeg_unref_picture(pic); av_frame_free(&pic->f); diff --git a/libavcodec/mpegpicture.h b/libavcodec/mpegpicture.h index 6589b38262..f0837b158a 100644 --- a/libavcodec/mpegpicture.h +++ b/libavcodec/mpegpicture.h @@ -52,9 +52,9 @@ typedef struct BufferPoolContext { } BufferPoolContext; /** - * Picture. + * MPVPicture. */ -typedef struct Picture { +typedef struct MPVPicture { struct AVFrame *f; ThreadFrame tf; @@ -91,12 +91,12 @@ typedef struct Picture { int display_picture_number; int coded_picture_number; -} Picture; +} MPVPicture; /** - * Allocate a Picture's accessories, but not the AVFrame's buffer itself. + * Allocate an MPVPicture's accessories, but not the AVFrame's buffer itself. */ -int ff_mpv_alloc_pic_accessories(AVCodecContext *avctx, Picture *pic, +int ff_mpv_alloc_pic_accessories(AVCodecContext *avctx, MPVPicture *pic, MotionEstContext *me, ScratchpadContext *sc, BufferPoolContext *pools, int mb_height); @@ -112,11 +112,11 @@ int ff_mpv_pic_check_linesize(void *logctx, const struct AVFrame *f, int ff_mpeg_framesize_alloc(AVCodecContext *avctx, MotionEstContext *me, ScratchpadContext *sc, int linesize); -int ff_mpeg_ref_picture(Picture *dst, Picture *src); -void ff_mpeg_unref_picture(Picture *picture); +int ff_mpeg_ref_picture(MPVPicture *dst, MPVPicture *src); +void ff_mpeg_unref_picture(MPVPicture *picture); -void ff_mpv_picture_free(Picture *pic); +void ff_mpv_picture_free(MPVPicture *pic); -int ff_find_unused_picture(AVCodecContext *avctx, Picture *picture, int shared); +int ff_find_unused_picture(AVCodecContext *avctx, MPVPicture *picture, int shared); #endif /* AVCODEC_MPEGPICTURE_H */ diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index bef7c399c2..b476b54295 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -128,9 +128,9 @@ typedef struct MpegEncContext { int mb_num; ///< number of MBs of a picture ptrdiff_t linesize; ///< line size, in bytes, may be different from width ptrdiff_t uvlinesize; ///< line size, for chroma in bytes, may be different from width - Picture *picture; ///< main picture buffer - Picture **input_picture; ///< next pictures on display order for encoding - Picture **reordered_input_picture; ///< pointer to the next pictures in coded order for encoding + MPVPicture *picture; ///< main picture buffer + MPVPicture **input_picture;///< next pictures on display order for encoding + MPVPicture **reordered_input_picture; ///< pointer to the next pictures in coded order for encoding BufferPoolContext buffer_pools; @@ -156,13 +156,13 @@ typedef struct MpegEncContext { * copy of the previous picture structure. * note, linesize & data, might not match the previous picture (for field pictures) */ - Picture last_pic; + MPVPicture last_pic; /** * copy of the next picture structure. * note, linesize & data, might not match the next picture (for field pictures) */ - Picture next_pic; + MPVPicture next_pic; /** * Reference to the source picture for encoding. @@ -174,11 +174,11 @@ typedef struct MpegEncContext { * copy of the current picture structure. * note, linesize & data, might not match the current picture (for field pictures) */ - Picture cur_pic; ///< buffer to store the decompressed current picture + MPVPicture cur_pic; - Picture *last_pic_ptr; ///< pointer to the previous picture. - Picture *next_pic_ptr; ///< pointer to the next picture (for bidir pred) - Picture *cur_pic_ptr; ///< pointer to the current picture + MPVPicture *last_pic_ptr; ///< pointer to the previous picture. + MPVPicture *next_pic_ptr; ///< pointer to the next picture (for bidir pred) + MPVPicture *cur_pic_ptr; ///< pointer to the current picture int skipped_last_frame; int last_dc[3]; ///< last DC values for MPEG-1 int16_t *dc_val_base; diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c index 663d97e60f..97efd4fe81 100644 --- a/libavcodec/mpegvideo_dec.c +++ b/libavcodec/mpegvideo_dec.c @@ -228,11 +228,11 @@ int ff_mpv_common_frame_size_change(MpegEncContext *s) return err; } -static int alloc_picture(MpegEncContext *s, Picture **picp, int reference) +static int alloc_picture(MpegEncContext *s, MPVPicture **picp, int reference) { AVCodecContext *avctx = s->avctx; int idx = ff_find_unused_picture(s->avctx, s->picture, 0); - Picture *pic; + MPVPicture *pic; int ret; if (idx < 0) @@ -283,9 +283,9 @@ fail: return ret; } -static int av_cold alloc_dummy_frame(MpegEncContext *s, Picture **picp, Picture *wpic) +static int av_cold alloc_dummy_frame(MpegEncContext *s, MPVPicture **picp, MPVPicture *wpic) { - Picture *pic; + MPVPicture *pic; int ret = alloc_picture(s, &pic, 1); if (ret < 0) return ret; @@ -475,14 +475,15 @@ void ff_mpv_frame_end(MpegEncContext *s) ff_thread_report_progress(&s->cur_pic_ptr->tf, INT_MAX, 0); } -void ff_print_debug_info(const MpegEncContext *s, const Picture *p, AVFrame *pict) +void ff_print_debug_info(const MpegEncContext *s, const MPVPicture *p, AVFrame *pict) { ff_print_debug_info2(s->avctx, pict, s->mbskip_table, p->mb_type, p->qscale_table, p->motion_val, s->mb_width, s->mb_height, s->mb_stride, s->quarter_sample); } -int ff_mpv_export_qp_table(const MpegEncContext *s, AVFrame *f, const Picture *p, int qp_type) +int ff_mpv_export_qp_table(const MpegEncContext *s, AVFrame *f, + const MPVPicture *p, int qp_type) { AVVideoEncParams *par; int mult = (qp_type == FF_MPV_QSCALE_TYPE_MPEG1) ? 2 : 1; diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index b310baf3ed..ad4502f3db 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -1129,7 +1129,7 @@ static int prepare_picture(MpegEncContext *s, AVFrame *f, const AVFrame *props_f static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg) { - Picture *pic = NULL; + MPVPicture *pic = NULL; int64_t pts; int i, display_picture_number = 0, ret; int encoding_delay = s->max_b_frames ? s->max_b_frames @@ -1266,7 +1266,7 @@ fail: return ret; } -static int skip_check(MpegEncContext *s, const Picture *p, const Picture *ref) +static int skip_check(MpegEncContext *s, const MPVPicture *p, const MPVPicture *ref) { int x, y, plane; int score = 0; @@ -1355,7 +1355,7 @@ static int estimate_best_b_count(MpegEncContext *s) FF_LAMBDA_SHIFT; for (i = 0; i < s->max_b_frames + 2; i++) { - const Picture *pre_input_ptr = i ? s->input_picture[i - 1] : + const MPVPicture *pre_input_ptr = i ? s->input_picture[i - 1] : s->next_pic_ptr; if (pre_input_ptr) { diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c index 9c1872aa1b..a757357316 100644 --- a/libavcodec/mpegvideo_motion.c +++ b/libavcodec/mpegvideo_motion.c @@ -514,7 +514,7 @@ static inline void apply_obmc(MpegEncContext *s, op_pixels_func (*pix_op)[4]) { LOCAL_ALIGNED_8(int16_t, mv_cache, [4], [4][2]); - const Picture *cur_frame = &s->cur_pic; + const MPVPicture *cur_frame = &s->cur_pic; int mb_x = s->mb_x; int mb_y = s->mb_y; const int xy = mb_x + mb_y * s->mb_stride; diff --git a/libavcodec/mpegvideodec.h b/libavcodec/mpegvideodec.h index 42c2697749..4259d5a02d 100644 --- a/libavcodec/mpegvideodec.h +++ b/libavcodec/mpegvideodec.h @@ -58,12 +58,13 @@ void ff_mpv_reconstruct_mb(MpegEncContext *s, int16_t block[12][64]); void ff_mpv_report_decode_progress(MpegEncContext *s); void ff_mpv_frame_end(MpegEncContext *s); -int ff_mpv_export_qp_table(const MpegEncContext *s, AVFrame *f, const Picture *p, int qp_type); +int ff_mpv_export_qp_table(const MpegEncContext *s, AVFrame *f, + const MPVPicture *p, int qp_type); int ff_mpeg_update_thread_context(AVCodecContext *dst, const AVCodecContext *src); void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h); void ff_mpeg_flush(AVCodecContext *avctx); -void ff_print_debug_info(const MpegEncContext *s, const Picture *p, AVFrame *pict); +void ff_print_debug_info(const MpegEncContext *s, const MPVPicture *p, AVFrame *pict); static inline int mpeg_get_qscale(MpegEncContext *s) { diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c index 5d52744529..05319436b6 100644 --- a/libavcodec/mss2.c +++ b/libavcodec/mss2.c @@ -382,7 +382,7 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size, MSS12Context *c = &ctx->c; VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; - Picture *f; + MPVPicture *f; int ret; ff_mpeg_flush(avctx); diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index 0a17811ce9..3397fffcab 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -926,7 +926,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) rce = &rcc->entry[picture_number]; wanted_bits = rce->expected_bits; } else { - const Picture *dts_pic; + const MPVPicture *dts_pic; rce = &local_rce; /* FIXME add a dts field to AVFrame and ensure it is set and use it diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index df1d570e73..284de14e8c 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -565,7 +565,7 @@ static void rv34_pred_mv_b(RV34DecContext *r, int block_type, int dir) int has_A = 0, has_B = 0, has_C = 0; int mx, my; int i, j; - Picture *cur_pic = &s->cur_pic; + MPVPicture *cur_pic = &s->cur_pic; const int mask = dir ? MB_TYPE_L1 : MB_TYPE_L0; int type = cur_pic->mb_type[mb_pos]; diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index b89f695b56..71fda305da 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -340,7 +340,7 @@ static void vc1_sprite_flush(AVCodecContext *avctx) { VC1Context *v = avctx->priv_data; MpegEncContext *s = &v->s; - Picture *f = &s->cur_pic; + MPVPicture *f = &s->cur_pic; int plane, i; /* Windows Media Image codecs have a convergence interval of two keyframes. diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index cd7194138d..f46bfa2bdf 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -370,7 +370,7 @@ int ff_vdpau_common_end_frame(AVCodecContext *avctx, AVFrame *frame, int ff_vdpau_mpeg_end_frame(AVCodecContext *avctx) { MpegEncContext *s = avctx->priv_data; - Picture *pic = s->cur_pic_ptr; + MPVPicture *pic = s->cur_pic_ptr; struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; int val; diff --git a/libavcodec/vdpau_mpeg12.c b/libavcodec/vdpau_mpeg12.c index 1f0ea7e803..abd8cb19af 100644 --- a/libavcodec/vdpau_mpeg12.c +++ b/libavcodec/vdpau_mpeg12.c @@ -35,7 +35,7 @@ static int vdpau_mpeg_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) { MpegEncContext * const s = avctx->priv_data; - Picture *pic = s->cur_pic_ptr; + MPVPicture *pic = s->cur_pic_ptr; struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; VdpPictureInfoMPEG1Or2 *info = &pic_ctx->info.mpeg; VdpVideoSurface ref; @@ -87,7 +87,7 @@ static int vdpau_mpeg_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size) { MpegEncContext * const s = avctx->priv_data; - Picture *pic = s->cur_pic_ptr; + MPVPicture *pic = s->cur_pic_ptr; struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; int val; diff --git a/libavcodec/vdpau_mpeg4.c b/libavcodec/vdpau_mpeg4.c index ecbc80b86d..e2766835f6 100644 --- a/libavcodec/vdpau_mpeg4.c +++ b/libavcodec/vdpau_mpeg4.c @@ -34,7 +34,7 @@ static int vdpau_mpeg4_start_frame(AVCodecContext *avctx, { Mpeg4DecContext *ctx = avctx->priv_data; MpegEncContext * const s = &ctx->m; - Picture *pic = s->cur_pic_ptr; + MPVPicture *pic = s->cur_pic_ptr; struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; VdpPictureInfoMPEG4Part2 *info = &pic_ctx->info.mpeg4; VdpVideoSurface ref; diff --git a/libavcodec/vdpau_vc1.c b/libavcodec/vdpau_vc1.c index 119e514c0e..9ed1665cad 100644 --- a/libavcodec/vdpau_vc1.c +++ b/libavcodec/vdpau_vc1.c @@ -36,7 +36,7 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx, { VC1Context * const v = avctx->priv_data; MpegEncContext * const s = &v->s; - Picture *pic = s->cur_pic_ptr; + MPVPicture *pic = s->cur_pic_ptr; struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; VdpPictureInfoVC1 *info = &pic_ctx->info.vc1; VdpVideoSurface ref; @@ -104,7 +104,7 @@ static int vdpau_vc1_decode_slice(AVCodecContext *avctx, { VC1Context * const v = avctx->priv_data; MpegEncContext * const s = &v->s; - Picture *pic = s->cur_pic_ptr; + MPVPicture *pic = s->cur_pic_ptr; struct vdpau_picture_context *pic_ctx = pic->hwaccel_picture_private; int val;