Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Scott Theisen <scott.the.elm@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] cbs_mpeg2_split_fragment(): cache the buffer end
Date: Thu, 22 Sep 2022 14:26:23 -0400
Message-ID: <e49bf406-e8a7-5848-0afa-fb842992af19@gmail.com> (raw)
In-Reply-To: <166385879971.26932.11279282226059502031@lain.khirnov.net>

On 9/22/22 10:59, Anton Khirnov wrote:
> Quoting Scott Theisen (2022-09-16 19:41:43)
>> Ping; it still applies cleanly.
> Missing motivation for this change. Is it faster, or why is the new code
> better?
>

To make it easier to read.  `buf_end` is shorter than `frag->data + 
frag->data_size`.  Initialize `start` to `frag->data` so the calls to 
avpriv_find_start_code are the same.

I realize readability is an opinion, but I felt that saving the buffer 
end to a variable and tweaking the comments increased the readability of 
the code.

Regards,

Scott
_______________________________________________
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".

  reply	other threads:[~2022-09-22 18:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08 20:32 Scott Theisen
2022-05-15 18:50 ` Scott Theisen
2022-09-16 17:41   ` Scott Theisen
2022-09-22 14:59     ` Anton Khirnov
2022-09-22 18:26       ` Scott Theisen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-04 15:16 [FFmpeg-devel] [PATCH 7/7] avcodec/cbs_mpeg2: Use smaller scope for variables Andreas Rheinhardt
2022-02-05  6:36 ` [FFmpeg-devel] [PATCH] cbs_mpeg2_split_fragment(): cache the buffer end Scott Theisen

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=e49bf406-e8a7-5848-0afa-fb842992af19@gmail.com \
    --to=scott.the.elm@gmail.com \
    --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