From: Mark Thompson <sw@jkqxz.net>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v3 6/6] lavc/vaapi_encode: Add VAAPI AV1 encoder
Date: Wed, 16 Aug 2023 21:45:58 +0100
Message-ID: <2b67a6ca-2d76-b0dc-0ee5-e5b096745ab1@jkqxz.net> (raw)
In-Reply-To: <eb5ee057aa524af26e6732ba8cea2c8e6b545b3e.camel@intel.com>
On 16/08/2023 08:54, Wang, Fei W wrote:
> On Sun, 2023-08-13 at 22:43 +0100, Mark Thompson wrote:
>> On 10/08/2023 03:54, Wang, Fei W wrote:
>>> On Mon, 2023-08-07 at 22:21 +0100, Mark Thompson wrote:
>>>> On 03/08/2023 07:01, fei.w.wang-at-intel.com@ffmpeg.org wrote:
>>>>> From: Fei Wang <fei.w.wang@intel.com>
>>>>>
>>>>> Signed-off-by: Fei Wang <fei.w.wang@intel.com>
>>>>> ---
>>>>> Changelog | 1 +
>>>>> configure | 3 +
>>>>> doc/encoders.texi | 13 +
>>>>> libavcodec/Makefile | 1 +
>>>>> libavcodec/allcodecs.c | 1 +
>>>>> libavcodec/vaapi_encode.c | 125 +++-
>>>>> libavcodec/vaapi_encode.h | 12 +
>>>>> libavcodec/vaapi_encode_av1.c | 1229
>>>>> +++++++++++++++++++++++++++++++++
>>>>> libavcodec/version.h | 2 +-
>>>>> 9 files changed, 1368 insertions(+), 19 deletions(-)
>>>>> create mode 100644 libavcodec/vaapi_encode_av1.c
>>>>> ...
>>>>> +
>>>>> + /** update obu size in bitstream */
>>>>> + if (fh_obu->header.obu_has_size_field) {
>>>>> + obu_size_len = priv-
>>>>>> attr_ext2.bits.obu_size_bytes_minus1
>>>>> + 1;
>>>>> + for (i = 0; i < obu_size_len; i++) {
>>>>> + byte = obu_size >> (7 * i) & 0x7f;
>>>>> + if (i < obu_size_len - 1)
>>>>> + byte |= 0x80;
>>>>> + put_bits(&pbc_tmp, 8, byte);
>>>>> + }
>>>>> + flush_put_bits(&pbc_tmp);
>>>>> + memmove(pbc_tmp.buf_ptr, pbc_tmp.buf_ptr + (8 -
>>>>> obu_size_len), obu_size);
>>>>> + *data_len -= (8 - obu_size_len) * 8;
>>>>> + }
>>>>
>>>> Why is there an incomplete duplicate of the cbs_av1 header
>>>> writing
>>>> code here?
>>>
>>> To record some position/size in bitstream that needed for VAAPI.
>>> Like
>>> qp_index/loopfilter/cdef offset and cdef parameters size in bit.
>>> It's
>>> not reasonable to add the specific parameters into CBS.
>>
>> How about with <
>> https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2023-August/313228.html>
>> ;?
>
> How to pass position info out of .trace_write_callback? If define own
> write_callback function in vaapi_encode_av1.c, and it can easily get
> the positions of each syntax element, but can't pass them back to VAAPI
> AV1 encoder. A possible way is according
> to CodedBitstreamContext.priv_data, but that will need to add lots of
> xxx_offset into CodedBitstreamAV1Context.
Right, it needs a context pointer in the callback because CBS hasn't previously had that.
See new version.
Thanks,
- Mark
_______________________________________________
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:[~2023-08-16 20:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 6:01 [FFmpeg-devel] [PATCH v3 1/6] avcodec/cbs_av1: Add tx mode enum values fei.w.wang-at-intel.com
2023-08-03 6:01 ` [FFmpeg-devel] [PATCH v3 2/6] lavc/av1: Add common code and unit test for level handling fei.w.wang-at-intel.com
2023-08-07 12:40 ` James Almer
2023-08-07 15:45 ` Andreas Rheinhardt
2023-08-03 6:01 ` [FFmpeg-devel] [PATCH v3 3/6] lavc/vaapi_encode: Init pic at the beginning of API fei.w.wang-at-intel.com
2023-08-03 6:01 ` [FFmpeg-devel] [PATCH v3 4/6] lavc/vaapi_encode: Extract set output pkt timestamp function fei.w.wang-at-intel.com
2023-08-07 20:22 ` Mark Thompson
2023-08-03 6:01 ` [FFmpeg-devel] [PATCH v3 5/6] lavc/vaapi_encode: Separate reference frame into previous/future list fei.w.wang-at-intel.com
2023-08-07 20:28 ` Mark Thompson
2023-08-03 6:01 ` [FFmpeg-devel] [PATCH v3 6/6] lavc/vaapi_encode: Add VAAPI AV1 encoder fei.w.wang-at-intel.com
2023-08-07 21:21 ` Mark Thompson
2023-08-10 2:54 ` Wang, Fei W
2023-08-13 21:43 ` Mark Thompson
2023-08-16 7:54 ` Wang, Fei W
2023-08-16 20:45 ` Mark Thompson [this message]
2023-08-15 13:59 ` Dong, Ruijing
2023-08-15 16:49 ` Neal Gompa
2023-08-07 7:51 ` [FFmpeg-devel] [PATCH v3 1/6] avcodec/cbs_av1: Add tx mode enum values Xiang, Haihao
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=2b67a6ca-2d76-b0dc-0ee5-e5b096745ab1@jkqxz.net \
--to=sw@jkqxz.net \
--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