Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Wu Jianhua <toqsxw@outlook.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec: add D3D12VA hardware accelerated H264, HEVC, VP9, and AV1 decoding
Date: Tue, 11 Apr 2023 17:03:32 +0000
Message-ID: <OSZP286MB21737AB1E7B84C894AF42CEECA9A9@OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <167768592917.10789.405819018051248134@lain.khirnov.net>

From: Anton Khirnov<mailto:anton@khirnov.net>
Sent: 2023年3月1日 23:52
To: FFmpeg development discussions and patches<mailto:ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec: add D3D12VA hardware accelerated H264, HEVC, VP9, and AV1 decoding

Hi Anton,

>> +#ifndef AVUTIL_HWCONTEXT_D3D12VA_H
>> +#define AVUTIL_HWCONTEXT_D3D12VA_H
>> +
>> +/**
>> + * @def COBJMACROS
>> + *
>> + * @brief Enable C style interface for D3D12
>> + */
>> +#ifndef COBJMACROS
>> +#define COBJMACROS
>> +#endif
>
>Does this need to be in the public header?
>
>> +
>> +/**
>>+ * @file
>> + * An API-specific header for AV_HWDEVICE_TYPE_D3D12VA.
>> + *
>> + */
>> +#include <stdint.h>
>> +#include <initguid.h>
>> +#include <d3d12.h>
>> +#include <d3d12video.h>
>> +
>> +/**
>> + * @def DX_CHECK
>> + *
>> + * @brief A check macro used by D3D12 functions highly frequently
>> + */
>
> All identifiers declared in public headers should be AV-prefixed. Also,
> these seem like they should be in a private header instead (i.e. one
> which is not installed and not usable by our API callers).
>

Can I put COBJMACROS, and the DX_CHECK without AV-prefixed in hwcontext_d3d12va_internal.h
and used them in d3d12dec_h264/HEVC/VP9/AV1.cpp and hwcontext_d3d12va.cpp?

>> +
>> +/**
>> + * @brief Wait for a specified fence value
>> + *
>> + * The execution fence values timeline may be like:
>> + * #0 -> #1 -> #2 -> #3 ----------------> #n
>> + *             ^
>> + *             |
>> + * Call av_d3d12va_wait_for_fence_value(2) will wait #2 execution to be completed.
>> + *
>> + * @param sync_ctx
>> + * @param fence_value
>> + * @return Error code (ret < 0 if failed)
>> + */
>> +int av_d3d12va_wait_for_fence_value(AVD3D12VASyncContext *sync_ctx, uint64_t fence_value);
>
> Does this need to be public? I don't see it being used in any other
> patches. Then fence_value could also be made private.

It’s provided to the users so they can control the synchronization by themselves.
Both keeping or deleting it is fine because the user can write the codes to do the
same thing. I use it frequently when rendering video frames with D3D12 so I think
it's helpful to make it a public API. What do you think?

All the other comments are very helpful and I will try to fix them in the next patch.
Thanks for your detailed review.

Thanks,
Jianhua



_______________________________________________
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:[~2023-04-11 17:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 15:52 Anton Khirnov
2023-04-11 17:03 ` Wu Jianhua [this message]
     [not found] <OSZP286MB217380EBFB2351E3B8B54E25CAE99@OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM>
2022-12-23 18:01 ` Wu Jianhua
2023-02-28 14:50   ` Wu, Tong1
2023-04-11 15:36     ` Wu Jianhua
2023-03-01 15:55   ` Hendrik Leppkes
2023-04-11 16:41     ` Wu Jianhua
2023-04-11 17:28       ` Hendrik Leppkes
2023-04-11 19:03         ` Wu Jianhua

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=OSZP286MB21737AB1E7B84C894AF42CEECA9A9@OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM \
    --to=toqsxw@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