Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] avcodec/mpegvideo_enc: remove direct=1 support
Date: Thu, 3 Mar 2022 02:34:42 +0100
Message-ID: <PR3PR03MB6665EEA59B8BCAB81E7F3D438F049@PR3PR03MB6665.eurprd03.prod.outlook.com> (raw)
In-Reply-To: <20220302214727.GB2829255@pb2>

Michael Niedermayer:
> On Wed, Mar 02, 2022 at 08:11:18PM +0100, Paul B Mahol wrote:
>> On 3/2/22, Michael Niedermayer <michael@niedermayer.cc> wrote:
>>> On Wed, Mar 02, 2022 at 12:38:05PM +0100, Paul B Mahol wrote:
>>>> It seems it does not work properly.
>>>>
>>>> Signed-off-by: Paul B Mahol <onemda@gmail.com>
>>>> ---
>>>>  libavcodec/mpegvideo_enc.c | 23 +++--------------------
>>>>  1 file changed, 3 insertions(+), 20 deletions(-)
>>>
>>> if iam not mistaken, that requires the whole image to  be copied
>>> one extra time
>>> i think before doing that it should be understood
>>> where the problem is
>>> and why that is the better solution to fixing it and not doing
>>> that extra copy
>>>
>>> of course i may be missing something
>>>
>>
>> Yea, If you manage to trigger that path, I'm all ears.
> 
> thats a fair request
> 
> i tried
> --- a/libavcodec/mpegvideo_enc.c
> +++ b/libavcodec/mpegvideo_enc.c
> @@ -1065,6 +1065,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
>          pic->reference = 3;
>  
>          if (direct) {
> +            av_log(0,0, "direct mode\n");
>              if ((ret = av_frame_ref(pic->f, pic_arg)) < 0)
>                  return ret;
>          }
> 
> with
> ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -t 1 test.avi
> 
> and that gives me:
> direct mode
>     Last message repeated 23 times
> 
> so it seems the code is used
>     
> [...]
> 

Furthermore,
http://coverage.ffmpeg.org/index.mpegvideo_enc.c.68609919c7303277fae79be622d1b44d.html
shows that the direct branch is taken 649 times (out of 8563 instances).

- Andreas
_______________________________________________
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-03-03  1:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02 11:38 Paul B Mahol
2022-03-02 13:00 ` Michael Niedermayer
2022-03-02 19:11   ` Paul B Mahol
2022-03-02 21:47     ` Michael Niedermayer
2022-03-03  1:34       ` Andreas Rheinhardt [this message]
2022-03-03  8:24       ` Paul B Mahol

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=PR3PR03MB6665EEA59B8BCAB81E7F3D438F049@PR3PR03MB6665.eurprd03.prod.outlook.com \
    --to=andreas.rheinhardt@outlook.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