[00:13] *** djrscally has quit IRC (Ping timeout: 480 seconds)
[00:16] *** camus1 has joined #linux-media
[00:19] *** camus has quit IRC (Ping timeout: 480 seconds)
[01:20] *** camus has joined #linux-media
[01:22] *** camus1 has quit IRC (Read error: Connection reset by peer)
[01:33] *** camus has quit IRC (Remote host closed the connection)
[01:33] *** camus has joined #linux-media
[01:49] *** camus1 has joined #linux-media
[01:53] *** camus has quit IRC (Ping timeout: 480 seconds)
[02:01] *** jernej has quit IRC (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
[02:47] *** darkapex1 has joined #linux-media
[02:52] *** darkapex has quit IRC (Ping timeout: 480 seconds)
[03:01] *** jernej has joined #linux-media
[03:13] *** BrianG61UK has quit IRC (Quit: Leaving)
[03:13] *** BrianG61UK_ has quit IRC (Quit: Leaving)
[03:39] *** BrianG61UK has joined #linux-media
[03:39] *** BrianG61UK_ has joined #linux-media
[03:40] *** eelstrebor has joined #linux-media
[03:42] *** eelstrebor has quit IRC ()
[04:31] *** darkapex2 has joined #linux-media
[04:37] *** darkapex1 has quit IRC (Ping timeout: 480 seconds)
[06:23] *** sailorek1234 has joined #linux-media
[06:36] <wens> ndufresne: AFAICT the Gstreamer v4l2* plugins set extra-controls before setting the output/capture formats. For Hantro's JPEG encoder this seems to make the driver "forget" the set JPEG quality. I assume that should be considered a bug?
[06:38] *** camus has joined #linux-media
[06:42] *** camus1 has quit IRC (Ping timeout: 480 seconds)
[06:43] <pinchartl> wens: I'm sure that someone will complain that the JPEG quality uses a random value if we fix that :-)
[06:50] *** jm_h has joined #linux-media
[06:58] <wens> I assume the setting should be limited to the opened instance, but persist while the device is still opened?
[07:05] *** camus1 has joined #linux-media
[07:06] <pinchartl> in V4L2 settings persist when a device is closed, although I think it's different when using the M2M API
[07:07] <pinchartl> it's both useful and damaging, as it enables collaborative use cases with multiple applications involved, but can also result in destructive collaboration :-)
[07:09] <wens> the hantro jpeg encoder is probably too forgetful to be useful though :p
[07:09] <wens> I'll see if I can't rework the logic
[07:10] *** camus has quit IRC (Ping timeout: 480 seconds)
[07:21] *** camus has joined #linux-media
[07:26] *** camus1 has quit IRC (Ping timeout: 480 seconds)
[07:31] <wens> ah, nevermind, it does work. It's just that the quality isn't so great to begin with :/
[07:59] *** djrscally has joined #linux-media
[08:11] *** camus has quit IRC (Remote host closed the connection)
[08:13] *** camus has joined #linux-media
[08:25] *** GBenji has joined #linux-media
[08:35] *** camus1 has joined #linux-media
[08:36] *** camus has quit IRC (Ping timeout: 480 seconds)
[08:46] *** ao2 has joined #linux-media
[08:48] *** gouchi has joined #linux-media
[08:48] *** Bugies has joined #linux-media
[09:00] *** gouchi has quit IRC (Remote host closed the connection)
[10:27] <wens> ndufresne: AFAICT Gstreamer v4l2jpegenc doesn't call the SELECTION/CROP APIs to handle non-macroblock-sized image dimensions?
[10:30] <wens> I implemented the selection API for the Hantro driver and I need something to test mainline with
[10:32] <wens> Also, I'm not sure if I'm supposed to update the dimensions on the capture side to the cropped size
[10:32] <wens> (I assume the answer is yes)
[10:34] *** gouchi has joined #linux-media
[10:34] *** camus1 has quit IRC (Remote host closed the connection)
[10:34] *** Bugies has quit IRC (Ping timeout: 480 seconds)
[10:35] *** camus has joined #linux-media
[11:23] <ndufresne> wens: it should call g_selection yes
[11:25] <ndufresne> Sorry, s_selection, but not systematically, most encoders only allow non multiple width/height in their enumeration
[11:27] <ndufresne> It's possible enum_framesize was meant to be padded size, but userspace like GST have used it as display size for 15years, I don't feel comfortable into changing that
[11:29] <ndufresne> wens: about the size on the capture, it's a bit undefined for fomats that encode that information, but settings it to the display size make sense, otherwise you need g_selection, more work, not really needed
[12:46] *** camus has quit IRC (Remote host closed the connection)
[12:46] *** camus has joined #linux-media
[12:54] *** camus1 has joined #linux-media
[12:55] *** camus has quit IRC (Read error: Connection reset by peer)
[13:01] <ndufresne> wens: p.s. could also be a bug :-)
[13:29] *** djrscally has quit IRC (Quit: Konversation terminated!)
[13:36] *** camus1 has quit IRC (Remote host closed the connection)
[13:36] *** camus has joined #linux-media
[14:04] *** camus1 has joined #linux-media
[14:08] *** camus has quit IRC (Ping timeout: 480 seconds)
[14:39] *** camus has joined #linux-media
[14:44] *** camus1 has quit IRC (Ping timeout: 480 seconds)
[14:50] *** BrianG61UK has quit IRC (Read error: Connection reset by peer)
[15:14] *** sailorek1234 has quit IRC (Quit: sailorek1234)
[15:26] *** darkapex3 has joined #linux-media
[15:31] *** darkapex2 has quit IRC (Ping timeout: 480 seconds)
[15:33] <wens> for s_fmt 640x360 on the output side, hantro gives back 640x368
[15:39] *** gouchi has quit IRC (Remote host closed the connection)
[16:11] <wens> and currently that causes gstreamer to output a 640x368 jpeg file
[16:12] *** Bugies has joined #linux-media
[16:30] *** BrianG61UK has joined #linux-media
[16:56] *** zlywilk_ has joined #linux-media
[16:56] <zlywilk_> hi
[16:59] *** zlywilk_ has quit IRC ()
[17:00] <ndufresne> wens: hmm, this is not ideal,even if this is HW, this should work with 1 pixel steps really
[17:00] <ndufresne> this is rk3399 ?
[17:03] *** zlywilk_ has joined #linux-media
[17:04] *** eelstrebor has joined #linux-media
[17:06] *** zlywilk_ has left 
[17:06] <wens> yup
[17:08] <wens> I know internally it should be 640x368, but I'm not sure what the output and capture formats should look like, or the crop/selection bits
[17:09] *** zlywilk has joined #linux-media
[17:14] <zlywilk> hi
[17:16] *** GBenji has left 
[18:33] *** camus1 has joined #linux-media
[18:34] *** camus has quit IRC (Ping timeout: 480 seconds)
[18:41] *** Bugies has quit IRC (Remote host closed the connection)
[19:40] *** camus has joined #linux-media
[19:43] *** zlywilk has quit IRC (Remote host closed the connection)
[19:43] *** camus1 has quit IRC (Read error: Connection reset by peer)
[20:33] *** ao2 has quit IRC (Quit: Leaving)
[20:58] *** jernej has quit IRC (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
[20:58] *** jernej has joined #linux-media
[21:17] *** jarthur has joined #linux-media
[21:23] <ndufresne> wens: gst specific, caps should reflect the display size, S_FMT in v4l2 the padded size, ENUM fmt is in display size iirc, something in these line
[21:30] <ndufresne> wens: raw caps (display size) are sent to the encoder (but constrained by enum_fmt if implemented), then pass here: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-good/sys/v4l2/gstv4l2videoenc.c#L305
[21:32] <ndufresne> As a first step, it will negotiate the bitstream caps, basically check with downstream element which profile/level to use (not applicable to jpeg), and set that into the output state, the input state is passed, since the original display size will be copied into the bitstream caps, this is mostly for convenience, the size is optional as its
[21:32] <ndufresne> available inside the bitstream for jpeg
[21:33] <ndufresne> and then it calls gst_v4l2_object_set_format() for the OUTPUT queue (input), that will do S_FMT after translating all the parameters
[21:36] <ndufresne> wens: so what I think you need, is add a call to gst_v4l2_object_set_crop() after gst_v4l2_object_set_format()
[21:36] <ndufresne> that will set the selection according to the padding, which got saved from the different between input of S_FMT and the return value (from driver)
[21:38] <ndufresne> hverkuil: somewhere next year, we should try and brainstorm on a flow to recover if we have a held capture buffer, but the expected next slice or field is missing
[21:38] <ndufresne> basically undo the hold
[21:39] <ndufresne> There also seem to be bugs, that if the decode for the hold fails, the next request apparently never get signal
[21:46] *** jm_h has quit IRC (Remote host closed the connection)
[22:16] *** b-rad has quit IRC (Ping timeout: 480 seconds)
[22:59] *** camus1 has joined #linux-media
[23:00] *** camus has quit IRC (Read error: Connection reset by peer)
[23:17] *** b-rad has joined #linux-media