From patchwork Sat May 11 20:51:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48767 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:1706:b0:1af:cdee:28c5 with SMTP id nv6csp299184pzb; Sat, 11 May 2024 13:57:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV/Bfx5kMzFb9ehNcBzU93dxIXRJDsaSQU2aXJU2/+ss4A7/wHDqRWcPIwg7jl7I0ak8F6ZF/59Y1dwtOXBpUCissrpPie88XoA+w== X-Google-Smtp-Source: AGHT+IH1Ns3prRmgRwz+Zfq07rGCYMH2zm8SCQxGHz4TJSNdoqaaOT2S1SsJ08BaVKBupA4gm8v8 X-Received: by 2002:a50:8d16:0:b0:572:459a:7aed with SMTP id 4fb4d7f45d1cf-5734d6f55f9mr4019360a12.37.1715461067381; Sat, 11 May 2024 13:57:47 -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 4fb4d7f45d1cf-5733beac77fsi3349040a12.55.2024.05.11.13.57.47; Sat, 11 May 2024 13:57:47 -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=CHEbuq3f; 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 353E568D742; Sat, 11 May 2024 23:54:44 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04olkn2038.outbound.protection.outlook.com [40.92.74.38]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9B60168D67A for ; Sat, 11 May 2024 23:54:36 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MaglsSeOdLw9vD0pHalq7uPBzui4ZnplsJsYBkWYdt7Ez81I4lgraZ3QfniDmSw8ik/lBY+KaPxsK1ZTDU8C5HgvIYDLshOkRpp+KPkUaI3lfGALqW+rJPezTKrLkAFVKlplpewexmlkZLIG4PosZuM2A1d/Oky5ebqWHwIf8D16c0PBVqP+ZH49BQiWtJpnhOymSMkrD8BMfNUWtlyUC+z/GZ2gXaj+3el8paewAGUFbn/ctcZw1LFhJZpMLTx8HWfCS5qogRlb9ydas8eohzegkUhwCVhB46CTMNB7TKsR/rLE0DbLbycCEYfRp1mD1WNH5JDwwU+msfJ+IMcdXg== 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=7ZrvhlggSPxpWUd/8cnNNblepNCZfzAK9YjkZ5qM3y4=; b=j2ZX43Ib8n4mBQKfzt7onuUg7wMrHojkhb2juKiH2lAYdJRCav9IvhSP7ztqa1+Y1GH1r/CtS/Spifu/TpsBk4QKBmmMqN1UndQk6ixvwE6XDSwqr4ViOOca/TT1UcWRoNvsat/uhHbI7bqt5vSC1nXtu5+zB1rgkq0VrgqQM46oPPZ0yhbMihK7sWHf5qKWbDmUoICk1X8sY4hJccdV3eQmZwM3VxJWgfY8XOIEuKaFudAAW6HYTeU7K6Wudmv48w2ymZfBGQdEOWCLGefLe1bvSaIdXs77mQujF+w4JFDp9Tl82GTJMTl++5kjJQR2FbNJ8Dj78ChZsJdwJL/kdw== 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=7ZrvhlggSPxpWUd/8cnNNblepNCZfzAK9YjkZ5qM3y4=; b=CHEbuq3f/sSRujptL7JOrPB678o273gMEPyT6va3x1vLUSb0KQtfBNIIPDpuKBBlninrF/3dB88tVSOMvD0rcq+Bkx7fefLqdSnOsatHLYnKpQsDO4oDzBbEluXhh2KU8XpSMRPmZNnUf+RrToFwfM+byrs1FE+eq3GZh7ET4JhDJbmNQSoIDvw2UcqU2O4DxZa1c+AS3bB6kO+asnH7ZW04YHSsyIp/urpkvwj3XamBec/y8sOpNJHQttlez5CDdLSZH6xqeRsJiVI4MVRD4NIcSpRHViIU0aTb3EXD4gZhm4WeRHDCG438OAMI+drd5tjUljgzUYJRRil/SNMpCw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0403.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:327::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.54; Sat, 11 May 2024 20:54:34 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.052; Sat, 11 May 2024 20:54:34 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 11 May 2024 22:51:05 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [bOmRZvRYmBcXpNHYQNL5jE4MxJlR1Y/JZ0Dg1/eTPGY=] X-ClientProxiedBy: ZR0P278CA0172.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:45::6) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240511205135.2411886-40-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0403:EE_ X-MS-Office365-Filtering-Correlation-Id: 449b386d-5c51-48ac-8329-08dc71fc8ffa X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|56899024|1710799017; X-Microsoft-Antispam-Message-Info: Ktdamtz2vNLGSHHDJf4YD0M4yAJoKKG5tUCcseVIRa1F4Dw0l0jlWnvNuBVEry8t+kNtm0AyhL0tRm9BUQ4rKAr4vUQ4XVd7q4r26drYo1rK5u4qUZiJc5JQWgWCkpdJ9gEGKT9IHZPTHX1bRPA84TUQyLZ7bHaXTH3onifcgnuYB4Hp01FhRWNlSphYICfrQir/r4VXYqDZHBt3iSxtprT3Wb9akNyLYdzLQHw7QXrAVJAE505OH60iU4hY0zxaP7jwOweyZ5bcjZzqMwYWidhcnFVTYkpbEbO0dscc+DNGxBs8bOBs11O0TJZqkCjQjRu4ctWDtrb6OV9JDOHyVBkuStH1GuujzIRn8YT3giI+UdFGmkawdi6Dz/DGglbZF+Cg8FWNXvnlRvZ5HSG2cOY0HNNzV/GMdItIQymtmw/TwIlY3nh5fyaicZywnJihM3IJ8vjniRIk1sQUwKE7hReqNdEzj96SyBac5BDH2BVrLOmg9paby+UYtMHYaaZwGsprCd/RFVRG86K6T784eBZGImvre4da17jfR5TKDsiTWWvTQg5G2NMkiMPjOB8AbNmpA/MCV85x/0Sy5irYlnFGer1bF1bsdq7pW7wNQvUbBgMg/ifeZeoAGD55QYGG X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SC8xtfatofdHo4cRJN+aHyBrK67nRHFdNasjm9ssoLLKOoXyUl/YSkaGiK1cFjkf7UixGDSc2rfAPLzL1oFohL9js0GJBv5Z0+v2keH8Wr05y8UHlWA6g4PdR8sHiilRhaeqAR/7W434rt9/5RdCOxsqH80Qp9LoGLUbwzN+vztIeRiIVAV/iNVTsdAmfFhS6w4wr93RXjt9WClDDyxQNsBpzABj2LCKYtu7hHVxm1RYQbT+Q7xNzp2U6P8jSrR5YNZc7A03eOGi79jrFzy+hKtFyhV5tZmo0SEHZgss7qC/P6ZcKQyZzoTfM/cjLNJhKavr+PQnAgBmwy4HXCw1pC9qNvAsNq7A+rdh88MLmWCp5gjBEKJUMnC/h9PCFuEbySJWz7Hb71BU5ToA49jV/dZZH7zJLTFPb94AoB+tL/9EWtvb943aIBA2c+n0XcGSWJzMB1H789x2Dc+IILtWmEl8n5BE1NXX0tSeqQMo54O8bw6CSfsNqEexKuVvd1ja6V3hdFsyeNpbrsg64KYYYLcZKRnEz1/IESi48MrFjUR/Fm2GU1QX2M6z3zpW+7WHnlKLaZi+EzaWphXOCmQjkF1S6gat5FrsAOJzOk42yQdT+dl4W1qQimCuwUO1IUET7guolm1hApVpUs/U0y72ebQD4zFzQtMZoCl03HT7FNPU1u0R2bEbF3mESHkjvrCjHIK58+aEMNyptdRvKqu/qMrPX/5sDaQakxAqVC2nf/h0OAA7q96HCGa8IlSMixcEtdd4Kdz8xE9J9vZPEExGg+h9Fj/rht2dhMNFWO3+95+yily0prrExEjqhdQGFum0FvaIH9ZS3watW6w/oWCI8/xW/Yr64jpW1XiBA4WjWcrgJPKtJJT5Y8JfMbE/BQ2BfhdFAlo93GGFrsooAyDkF0UjEq+ZEhe9E2PIfV3PwajLH9FtdbdJTtHLtR1/+uWDXUghKwAqX7RG+YxZVIzU7/x5lWqbRUTfyxw3SaWBiKd0JpsI0FMMGIngg4MVF5pcGThxmY29A3BUHbbhBoJ0uG3u90CTPONgMs8QEq/2lMd1HFG+qM3cl3AKGuym9269RYPzoxVKU848+uDQ1Cvd5Todule0qwft0JeAv1NnbAw+w6AgQlnoi9752AW04ySrROzlEFf81kBXNI7yKpoLG1FTs4krECVd9fFgFTloper7ILeZZwg/KKZUxJgc+Z5dSqxIajeRB5788lTIbzNOOv7zoAH4ZqNB6vPh2BFIiF5Jbf0jICP5a+MC7u/lEqVBXXSPpAKYNlbuT9YGLEQsjg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 449b386d-5c51-48ac-8329-08dc71fc8ffa X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 May 2024 20:54:34.3874 (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: DB9P250MB0403 Subject: [FFmpeg-devel] [PATCH v2 41/71] 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: W5t4qzmZZiKm 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 c5b5b3ea50..036171fe70 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -652,7 +652,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 840aa23c38..429c110397 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 { \ @@ -143,7 +143,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) { @@ -181,7 +181,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); @@ -203,7 +203,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); @@ -223,7 +223,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; @@ -260,7 +260,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]) @@ -283,7 +283,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 3150f337c0..6d96376a6e 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 393b21823f..251b954210 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 964caa5afb..56d794974b 100644 --- a/libavcodec/mpegvideo_motion.c +++ b/libavcodec/mpegvideo_motion.c @@ -514,7 +514,7 @@ static inline void apply_obmc(MpegEncContext *s, const 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 1c9af6b53c..1429b3a93a 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -929,7 +929,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;