Hi Michael, Le Thu 24 Sep 26, 07:30, Michael Nazzareno Trimarchi a écrit : > I have added your patch to gstreamer > > v4l2codecs: add the stateless H.264 and VP8 encoder elements > > Backport of the encoder work from the branch v4l2codecs/h264enc of > https://github.com/paulkocialkowski/gstreamer (commit f59de5779ef1, based > on release 1.26.0) onto the gstreamer1.0-plugins-bad 1.28.5 this build > uses. Yes this is the right gstreamer branch to use here. > Generate the right element and encode stream: > > gst-launch-1.0 videotestsrc num-buffers=100 ! > video/x-raw,width=720,height=576 ! v4l2slh264enc ! h264parse ! > matroskamux ! filesink location=/tmp/t2.mkv > > And playback over Wayland. > > Solve some problem. I have implemented: > > const struct hantro_variant px30_vpu_variant = { > .enc_offset = 0x0, > .enc_fmts = rockchip_vpu_enc_fmts, > .num_enc_fmts = ARRAY_SIZE(rockchip_vpu_enc_fmts), > .dec_offset = 0x400, > .dec_fmts = rockchip_vdpu2_dec_fmts, > .num_dec_fmts = ARRAY_SIZE(rockchip_vdpu2_dec_fmts), > .codec = HANTRO_JPEG_ENCODER | HANTRO_H264_ENCODER | > HANTRO_MPEG2_DECODER | HANTRO_VP8_DECODER | > HANTRO_H264_DECODER, > .codec_ops = px30_vpu_codec_ops, > .irqs = rockchip_vpu2_irqs, > .num_irqs = ARRAY_SIZE(rockchip_vpu2_irqs), > .init = rk3036_vpu_hw_init, > .clk_names = rockchip_vpu_clk_names, > .num_clocks = ARRAY_SIZE(rockchip_vpu_clk_names) > }; > > I have advertised the: > > { > .fourcc = V4L2_PIX_FMT_H264_SLICE, > .codec_mode = HANTRO_MODE_H264_ENC, > .max_depth = 2, > .header_size = H264_ENC_HEADER_SIZE, > .frmsize = { > .min_width = FMT_MIN_WIDTH, > .max_width = FMT_FHD_WIDTH, > .step_width = MB_DIM, > .min_height = FMT_MIN_HEIGHT, > .max_height = FMT_FHD_HEIGHT, > .step_height = MB_DIM, > }, > }, > > Create the rockchip_vpu_hw_h264_enc.c. I need to test this on rk3399 Then I guess this is using register configuration from the earlier H.264 encoding work that I've done at Bootlin, adapted for the new stateless encode helpers? That part is probably not quite trivial, which is why I was a bit surprised. > I have a small change only in the common part. Hope that it's a bit clear. Yes in comparison to the register configuration code, the platform changes are rather small indeed. All the best, Paul -- Paul Kocialkowski, Independent contractor - sys-base - https://www.sys-base.io/ Free software developer - https://www.paulk.fr/ Expert in multimedia, graphics and embedded hardware support with Linux.