From: Zhao Zhili <quinkblack-at-foxmail.com@ffmpeg.org> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH] avutil/detection_bbox: Cleanup: Remove unneeded bbox_size struct member Date: Fri, 14 Feb 2025 17:56:55 +0800 Message-ID: <tencent_34ACCE3B21C119B5106852028D680E7EA60A@qq.com> (raw) In-Reply-To: <95067355-1e79-4d4e-96e4-57257d04552d@gmail.com> > On Feb 14, 2025, at 16:47, Leandro Santiago <leandrosansilva@gmail.com> wrote: > > There is no need to store this field in the struct, > as it can be computed as sizeof(AVDetectionBBox). > > Signed-off-by: Leandro Santiago <leandrosansilva@gmail.com> > --- > libavutil/detection_bbox.c | 1 - > libavutil/detection_bbox.h | 7 +------ > 2 files changed, 1 insertion(+), 7 deletions(-) > > diff --git a/libavutil/detection_bbox.c b/libavutil/detection_bbox.c > index cb157b355b..456c35f87a 100644 > --- a/libavutil/detection_bbox.c > +++ b/libavutil/detection_bbox.c > @@ -40,7 +40,6 @@ AVDetectionBBoxHeader *av_detection_bbox_alloc(uint32_t nb_bboxes, size_t *out_s > return NULL; > > header->nb_bboxes = nb_bboxes; > - header->bbox_size = bbox_size; > header->bboxes_offset = bboxes_offset; > > if (out_size) > diff --git a/libavutil/detection_bbox.h b/libavutil/detection_bbox.h > index 011988052c..7844fb05da 100644 > --- a/libavutil/detection_bbox.h > +++ b/libavutil/detection_bbox.h > @@ -70,11 +70,6 @@ typedef struct AVDetectionBBoxHeader { > * the array of bounding boxes starts. > */ > size_t bboxes_offset; > - > - /** > - * Size of each bounding box in bytes. > - */ > - size_t bbox_size; > } AVDetectionBBoxHeader; > > /* > @@ -85,7 +80,7 @@ av_get_detection_bbox(const AVDetectionBBoxHeader *header, unsigned int idx) > { > av_assert0(idx < header->nb_bboxes); > return (AVDetectionBBox *)((uint8_t *)header + header->bboxes_offset + > - idx * header->bbox_size); > + idx * sizeof(AVDetectionBBox)); > } No, this field is for ABI compatibility. New fields can be added at the end of AVDetectionBBox, sizeof(AVDetectionBBox) can be different between API user of libavutil and libavutil internal. > > /** > -- > 2.48.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2025-02-14 9:57 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-02-14 8:47 Leandro Santiago 2025-02-14 9:56 ` Zhao Zhili [this message] 2025-02-14 12:29 ` Leandro Santiago
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=tencent_34ACCE3B21C119B5106852028D680E7EA60A@qq.com \ --to=quinkblack-at-foxmail.com@ffmpeg.org \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git