08:03 __ad: what is outp ov nv_encoder ?
08:23 __ad: i am trying to properly fix non working backlight on a recent lenovo laptop, ada lovelace
08:24 __ad: i sent a patch that works but not properly done : https://lore.kernel.org/dri-devel/20240412194901.1596-1-angelo@kernel-space.org/
08:25 __ad: so now i have some time to go deeper on this. A strange thing is that, at backlight_init,m "outp" is 0. Trying to understand why.
14:30 dwlsalmeida[d]: airlied[d]: did you have to do the probability updates on your own for AV1 on radv?
14:32 dwlsalmeida[d]: apparently, the nvidia decoder returns the symbol counts and you have to do it in software to provide the updated probability table for the next frame, like most of the v4l2 stuff too
14:33 dwlsalmeida[d]: (I think all vendors are basically using the IP that google gave away for free)
16:16 gfxstrand[d]: Does that mean we're going to have to do something with MME or a shader for that? That would be annoying.
17:35 dwlsalmeida[d]: well, if that's indeed what's happening, then we have to implement a bunch of algorithms from the spec, sadly
17:35 dwlsalmeida[d]: something like https://elixir.bootlin.com/linux/v6.12.6/source/drivers/media/v4l2-core/v4l2-vp9.c#L1415 (this one is for VP9, which is the precursor for AV1)
17:36 dwlsalmeida[d]: NVIDIA of course didn't release any information on the layout of the probability tables for AV1
18:52 airlied[d]: Don't think so for AMD at least, doesn't ring any bells that I had to do anything manually
20:30 dwlsalmeida[d]: a bit puzzling that jellyfish, big buck bunny, all work
20:58 avhe[d]: dwlsalmeida[d]: after building everything i just repro'd this on my rtx3050
20:58 avhe[d]: AMP_A_Samsung_7 is corrupted, AMP_B_Samsung_7 decodes fine
20:58 avhe[d]: will try to figure it tomorrow
20:58 dwlsalmeida[d]: ty!
20:59 avhe[d]: quick question, would you know the most convenient way to file the first frame to a file using gstreamer?
20:59 avhe[d]: i'm launching with this atm ```LD_LIBRARY_PATH=~/Documents/mesa/install/lib VK_ICD_FILENAMES=~/Documents/mesa/install/share/vulkan/icd.d/nouveau_icd.x86_64.json gst-launch-1.0 filesrc location= ~/Documents/fluster/resources/JCT-VC-HEVC_V1/AMP_A_Samsung_7/AMP_A_Samsung_7.bin ! parsebin ! vulkanh265dec ! vulkandownload ! identity eos-after=1 ! video/x-raw ! jpegenc ! filesink location=test.jpg```
21:00 avhe[d]: i was hoping `identity eos-after=1` would do the job but the pipeline doesn't seem to stop after writing
21:02 dwlsalmeida[d]: place the identity before vulkanh265dec
21:02 dwlsalmeida[d]: also change to `eos-after =2`
21:04 dwlsalmeida[d]: btw you can push the raw yuv to `filesink` directly if you want, instead of reencoding into jpeg
21:04 avhe[d]: dwlsalmeida[d]: works, thanks
21:04 avhe[d]: dwlsalmeida[d]: that might be useful considering how slow the encode is
21:06 dwlsalmeida[d]: You're probably going to want these fixes btw:
21:06 dwlsalmeida[d]: nvh265.set_separate_colour_plane_flag(
21:06 dwlsalmeida[d]: sps.flags.separate_colour_plane_flag(),
21:06 dwlsalmeida[d]: );
21:06 dwlsalmeida[d]: nvh265.set_num_short_term_ref_pic_sets(
21:06 dwlsalmeida[d]: sps.num_short_term_ref_pic_sets.try_into().unwrap(),
21:06 dwlsalmeida[d]: );
21:06 dwlsalmeida[d]: nvh265.set_num_long_term_ref_pics_sps(
21:06 dwlsalmeida[d]: sps.num_long_term_ref_pics_sps.try_into().unwrap(),
21:06 dwlsalmeida[d]: );
21:06 dwlsalmeida[d]: nvh265.set_long_term_ref_pics_present_flag(
21:06 dwlsalmeida[d]: sps.flags.long_term_ref_pics_present_flag(),
21:06 dwlsalmeida[d]: );
21:06 dwlsalmeida[d]: nvh265.set_num_delta_pocs_of_rps_idx(
21:06 dwlsalmeida[d]: std_pic_info.NumDeltaPocsOfRefRpsIdx.try_into().unwrap(),
21:06 dwlsalmeida[d]: );
21:06 dwlsalmeida[d]: if std_pic_info.flags.short_term_ref_pic_set_sps_flag() == 0 {
21:06 dwlsalmeida[d]: nvh265.num_bits_short_term_ref_pics_in_slice = std_pic_info
21:06 dwlsalmeida[d]: .NumBitsForSTRefPicSetInSlice
21:06 dwlsalmeida[d]: .try_into()
21:06 dwlsalmeida[d]: .unwrap();
21:06 dwlsalmeida[d]: } else if sps.num_short_term_ref_pic_sets > 1 {
21:06 dwlsalmeida[d]: nvh265.num_bits_short_term_ref_pics_in_slice +=
21:06 dwlsalmeida[d]: sps.num_short_term_ref_pic_sets.ilog2();
21:06 dwlsalmeida[d]: if !sps.num_short_term_ref_pic_sets.is_power_of_two() {
21:06 dwlsalmeida[d]: nvh265.num_bits_short_term_ref_pics_in_slice += 1; // ceil
21:06 dwlsalmeida[d]: }
21:06 dwlsalmeida[d]: }
21:07 dwlsalmeida[d]: also
21:07 dwlsalmeida[d]: const FILTER_SIZE: u32 = 608;
21:07 dwlsalmeida[d]: const SAO_SIZE: u32 = 4864;
21:07 dwlsalmeida[d]: this seems to align with the blob instead of the values you used for tegra
21:07 avhe[d]: noted, thanks