From: "Xiang, Haihao" <haihao.xiang-at-intel.com@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/2] lavc/vaapi_hevc: Don't require exact profiles
Date: Tue, 30 Apr 2024 06:00:08 +0000
Message-ID: <0f2cf1005dd30b8549d332ea707530a318cc5e96.camel@intel.com> (raw)
In-Reply-To: <831fdccd-7064-4d59-a528-eb1fe7fbe032@jkqxz.net>
On So, 2024-04-28 at 15:14 +0100, Mark Thompson wrote:
> On 24/04/2024 14:45, Xiang, Haihao wrote:
> > On Ma, 2024-04-22 at 22:23 +0100, Mark Thompson wrote:
> > > Rather than turning the constraint flags into a single profile and then
> > > searching for that profile (and failing if it doesn't match any profile
> > > exactly), instead search all supported profiles and use the first one
> > > which supports the given set of constraint flags.
> > > ---
> > > This fixes decode of rext 8-bit 4:2:0; it will correctly pick Main 12 or
> > > Main
> > > 4:2:2 10 or Main 4:4:4 (first one available) to use as the decoding
> > > profile
> > > after this patch.
> >
> > sw decoding and vaapi decoding might have different bits (There is the same
> > issue if applying Fei's patchset).
> >
> > For example:
> > $ ffmpeg -hwaccel vaapi -f lavfi -i testsrc -vf 'format=nv12,hwupload' -c:v
> > hevc_vaapi -profile:v rext -vframes 30 -y out.mp4
> >
> > 8bit ouput if using sw decoding:
> > $ ffmpeg -i out.mp4 -f null -
> > [...]
> > Stream #0:0(und): Video: wrapped_avframe, yuv420p(tv, progressive), 320x240
> > [SAR
> > 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn (default)
> >
> > 12bit output if using vaapi decoding:
> > $ ffmpeg -hwaccel vaapi -i out.mp4 -f null -
> > [...]
> > Stream #0:0(und): Video: wrapped_avframe, p012le(tv, progressive), 320x240
> > [SAR
> > 1:1 DAR 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn (default)
>
> That comes from what the driver reports support for, though?
>
> E.g. with the Intel iHD driver, I have
>
> {
> "profile": 23,
> "name": "HEVCMain12",
> ...
> "surface_formats": [
> {
> "rt_format": "YUV420",
> "max_width": 16384,
> "max_height": 16384,
> "memory_types": [
> "VA",
> "DRM_PRIME_2",
> ],
> "pixel_formats": [
> "P012",
> "P016",
> ],
> },
>
> So to decode a 4:2:0 8-bit input it is asking for a P012 or P016 surface.
>
> If the driver reported that a Main 12 profile 4:2:0 8-bit input could be
> decoded to an NV12 surface then it would be picked by the logic in
> vaapi_decode_find_best_format(), since it would be a better match than the
> higher-depth formats.
You are right, the iHD driver doesn't report the support for HEVCMain12 8bit.
Thanks
Haihao
_______________________________________________
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:[~2024-04-30 6:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 4:21 [FFmpeg-devel] [PATCH v3 1/2] lavc/vaapi_encode_h265: Map HEVC AV REXT profile to VA REXT profile fei.w.wang-at-intel.com
2024-03-18 4:21 ` [FFmpeg-devel] [PATCH v3 2/2] lavc/vaapi_encode_h265: Set general_*_constriaint flags with profile fei.w.wang-at-intel.com
2024-03-18 21:22 ` Mark Thompson
2024-03-20 8:44 ` Wang, Fei W
2024-04-01 6:11 ` Wang, Fei W
2024-04-01 20:02 ` Mark Thompson
2024-04-02 5:18 ` Wang, Fei W
2024-03-18 21:11 ` [FFmpeg-devel] [PATCH v3 1/2] lavc/vaapi_encode_h265: Map HEVC AV REXT profile to VA REXT profile Mark Thompson
2024-03-20 7:39 ` Wang, Fei W
2024-04-15 1:21 ` Xiang, Haihao
2024-04-15 22:07 ` Mark Thompson
2024-04-16 4:57 ` Wang, Fei W
2024-04-18 8:21 ` Wang, Fei W
2024-04-22 21:20 ` Mark Thompson
2024-04-22 21:22 ` [FFmpeg-devel] [PATCH 1/2] lavc/h265_profile_level: Expand profile compatibility checking Mark Thompson
2024-04-22 21:23 ` [FFmpeg-devel] [PATCH 2/2] lavc/vaapi_hevc: Don't require exact profiles Mark Thompson
2024-04-24 13:45 ` Xiang, Haihao
2024-04-28 14:14 ` Mark Thompson
2024-04-30 6:00 ` Xiang, Haihao [this message]
2024-04-23 0:04 ` [FFmpeg-devel] [PATCH 1/2] lavc/h265_profile_level: Expand profile compatibility checking Michael Niedermayer
2024-04-24 13:48 ` 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=0f2cf1005dd30b8549d332ea707530a318cc5e96.camel@intel.com \
--to=haihao.xiang-at-intel.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