Closed Bug 1619258 Opened 4 years ago Closed 4 years ago

[Wayland] Implement vp9 VA-API decode by ffmpeg

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox75 --- wontfix
firefox76 --- fixed

People

(Reporter: stransky, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Implement HW decode of VP9 format by VA-API. Also check if that's faster than SW decode.

Assignee: nobody → stransky
Status: NEW → ASSIGNED

Jean, I'd like to go with this simplified version of vp9 HW support and implement the in-tree ffmpeg enhancement in a different bug.

Pushed by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/25fd7f65b469
[Wayland] Enable VA-API for all formats, r=jya
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Depends on: 1623584

is any chance that this patch squeeze into mozilla75 ?

Since it's disabled by default and h264 only VAAPI can be lightly confusing for these who enable experimental VA-API support (and try youtube without h264ify plugin), backporting this patch could speed-up testing process of this feature.

https://nightly.mozilla.org should be used for VAAPI testing as there are still other VAAPI, WebRender and Wayland bugs.

Thanks, of course! Compiling _beta5 with cherry-picked deferencing fix and VP9 VA-API. I'll report how well it (does/doesn't) work :)

For h264 is it enough, but for VP9 probably some patch must be missing. I'm having these two patches applied:

Bug 1619258 [Wayland] Enable VA-API for all formats, r=jya
Bug 1622729 - Use the appropriate level of indirection when calling av_freep in FFmpegVideoDecoder. r=jya

For vp9 you need to disable media.ffvpx.enabled temporarily (bug 1623584 comment 20). If it does not work with https://nightly.mozilla.org, please see bug 1610199 comment 45.

Comment on attachment 9131132 [details]
Bug 1619258 [Wayland] Enable VA-API for all formats, r?jya

Beta/Release Uplift Approval Request

  • User impact if declined: va-api will support h264 decoding only.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Linux/Wayland only. Just removes a restriction we had for initial implementation. Functionality was confirmed by users (https://bugzilla.mozilla.org/show_bug.cgi?id=1623584#c21)
  • String changes made/needed: none
Attachment #9131132 - Flags: approval-mozilla-beta?
Depends on: 1623899

Comment on attachment 9131132 [details]
Bug 1619258 [Wayland] Enable VA-API for all formats, r?jya

This looks like something that should ride the trains.

Attachment #9131132 - Flags: approval-mozilla-beta? → approval-mozilla-beta-

I am looking for a way to enable vaapi for vp9 on firefox at plasma wayland, and I found this bug report. Interestingly, but I still cannot get vaapi to work for vp8 and vp9 in plasma wayland, whereas h264 works fine.

I am using firefox 95, have media.ffmpeg.vaapi.enabled on and media.ffvpx.enabled off.

I can play the youtube video using mpv with vaapi enabled.

Here is my output of vainfo

vainfo

libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.13 (libva 2.13.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 21.4.2 ()
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD

Here is the output of firefox with MOZ_LOG="PlatformDecoderModule:5", playing vp9 video

$ MOZ_LOG="PlatformDecoderModule:5" firefox-bin
[Child 264895: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in Content process
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in RDD process
[RDD 265313: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[RDD 265313: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaPDecoder #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[RDD 265313: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaPDecoder #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaPDecoder #3]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaPDecoder #2]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaPDecoder #3]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaPDecoder #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaSupervisor #2]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaSupervisor #2]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[RDD 265313: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type
[Child 264895: MediaPDecoder #3]: D/PlatformDecoderModule AudioTrimmer[7fb97513b9c0] ::PrepareTrimmers: sample[0,21000] no trimming information
[RDD 265313: MediaPDecoder #1]: D/PlatformDecoderModule OpusDataDecoder[7f583cb92940] ::Decode: Opus decoder skipping 312 of 960 frames
[Child 264895: MediaPDecoder #1]: D/PlatformDecoderModule AudioTrimmer[7fb97513b9c0] ::HandleDecodedResult: sample[0,21000] (decoded[0,13500] no trimming needed
[Child 264895: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 264895: MediaSupervisor #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[RDD 265313: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 265313: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder supports requested type
[Child 264895: MediaPDecoder #2]: D/PlatformDecoderModule AudioTrimmer[7fb97466cf20] ::PrepareTrimmers: sample[0,21000] no trimming information
[RDD 265313: MediaPDecoder #2]: D/PlatformDecoderModule OpusDataDecoder[7f583cb93700] ::Decode: Opus decoder skipping 312 of 960 frames
[Child 264895: MediaPDecoder #3]: D/PlatformDecoderModule AudioTrimmer[7fb97466cf20] ::HandleDecodedResult: sample[0,21000] (decoded[0,13500] no trimming needed
[Child 264895: MediaPDecoder #1]: D/PlatformDecoderModule AudioTrimmer[7fb97466cf20] ::PrepareTrimmers: sample[21000,41000] no trimming information

Here is the output of firefox playing h264 video

$ MOZ_LOG="PlatformDecoderModule:5" firefox-bin
[Child 259616: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in Content process
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: MediaPDecoder #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule PDMInitializer, Init PDMs in RDD process
[RDD 260085: Main Thread]: D/PlatformDecoderModule VA-API FFmpeg is disabled by platform
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[RDD 260085: Main Thread]: D/PlatformDecoderModule Agnostic decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 259616: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[RDD 260085: MediaSupervisor #1]: D/PlatformDecoderModule Agnostic decoder rejects requested type
[Child 259616: MediaPDecoder #1]: D/PlatformDecoderModule Initialising VA-API FFmpeg decoder
libva info: VA-API version 1.13.0
libva info: Trying to open /usr/lib64/va/drivers/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_13
libva info: va_openDriver() returns 0
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x41524742 -> bgra.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x42475241 -> argb.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x41424752 -> rgba.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x52474241 -> abgr.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x58524742 -> bgr0.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x42475258 -> 0rgb.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x58424752 -> rgb0.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x52474258 -> 0bgr.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x30335241 -> unknown.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x30334241 -> unknown.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x30335258 -> x2rgb10le.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x30334258 -> unknown.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x36314752 -> unknown.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x50424752 -> unknown.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x50524742 -> unknown.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x56555941 -> unknown.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x30303859 -> gray.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x3231564e -> nv12.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x3132564e -> unknown.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x32595559 -> yuyv422.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x59565955 -> uyvy422.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x32315659 -> yuv420p.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x30323449 -> yuv420p.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x50313134 -> yuv411p.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x48323234 -> yuv422p.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x56323234 -> yuv440p.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x50343434 -> yuv444p.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x33434d49 -> unknown.
[AVHWDeviceContext @ 0x7f9d488c4f80] Format 0x30313050 -> p010le.
[AVHWDeviceContext @ 0x7f9d488c4f80] VAAPI driver: Intel iHD driver for Intel(R) Gen Graphics - 21.4.2 ().
[AVHWDeviceContext @ 0x7f9d488c4f80] Driver not found in known nonstandard list, using standard behaviour.
[h264 @ 0x7f9d48ef6600] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f9d48ef6600] log2_max_frame_num_minus4 out of range (0-12): 32
[h264 @ 0x7f9d48ef6600] SPS decoding failure, trying again with the complete NAL
[h264 @ 0x7f9d48ef6600] log2_max_frame_num_minus4 out of range (0-12): 32
[h264 @ 0x7f9d48ef6600] log2_max_frame_num_minus4 out of range (0-12): 32
[h264 @ 0x7f9d48ef6600] SPS decoding failure, trying again after escaping the NAL
[h264 @ 0x7f9d48ef6600] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f9d48ef6600] log2_max_frame_num_minus4 out of range (0-12): 32
[h264 @ 0x7f9d48ef6600] SPS decoding failure, trying again with the complete NAL
[h264 @ 0x7f9d48ef6600] log2_max_frame_num_minus4 out of range (0-12): 32
[h264 @ 0x7f9d48ef6600] log2_max_frame_num_minus4 out of range (0-12): 32
[h264 @ 0x7f9d48ef6600] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f9d48ef6600] sps_id 0 out of range
[h264 @ 0x7f9d48ef6600] SPS decoding failure, trying again after escaping the NAL
[h264 @ 0x7f9d48ef6600] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f9d48ef6600] sps_id 0 out of range
[Child 259616: MediaPDecoder #1]: D/PlatformDecoderModule VA-API FFmpeg init successful

(In reply to Chang Liu from comment #12)
This feature is still experimental and undergoes changes.
Ideally, please test VAAPI only with https://nightly.mozilla.org - at least until you have Firefox 97.
No hacks are needed anymore as of Firefox 97 (bug 1698778 was fixed in 96, bug 1743926 was fixed in 97), VAAPI is properly sandboxed and you just need to set media.ffmpeg.vaapi.enabled and media.rdd-ffmpeg.enabled to true.
If there is a VAAPI bug in Nightly that is not yet tracked by bug 1610199, please file a new bug: https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=Audio%2FVideo%3A%20Playback

I just checked and confirmed it is working in Firefox 97. Thanks for your reply.

For firefox 95 you need to disable RDD, i.e. set media.rdd-process.enabled to false.

(In reply to Martin Stránský [:stransky] (ni? me) from comment #15)

For firefox 95 you need to disable RDD, i.e. set media.rdd-process.enabled to false.

Yes it works. Thanks.

You need to log in before you can comment on or make changes to this bug.