<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/staging/media, branch v5.19</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>media: hantro: Enable HOLD_CAPTURE_BUF for H.264</title>
<updated>2022-05-17T08:11:19+00:00</updated>
<author>
<name>Nicolas Dufresne</name>
<email>nicolas.dufresne@collabora.com</email>
</author>
<published>2022-05-13T20:29:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=340ce50f75a6bdfe6d1850ca49ef37a8e2765dd1'/>
<id>340ce50f75a6bdfe6d1850ca49ef37a8e2765dd1</id>
<content type='text'>
This is needed to optimize field decoding. Each field will be
decoded into the same capture buffer. To be able to queue multiple
buffers, we need to be able to ask the driver to hold the capture
buffer.

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is needed to optimize field decoding. Each field will be
decoded into the same capture buffer. To be able to queue multiple
buffers, we need to be able to ask the driver to hold the capture
buffer.

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: hantro: Add H.264 field decoding support</title>
<updated>2022-05-17T08:10:46+00:00</updated>
<author>
<name>Nicolas Dufresne</name>
<email>nicolas.dufresne@collabora.com</email>
</author>
<published>2022-05-13T20:29:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=11442b7c937544dcb2e3525b17dc8f3425e8d9a2'/>
<id>11442b7c937544dcb2e3525b17dc8f3425e8d9a2</id>
<content type='text'>
This adds the required code to support field decoding. While most of
the code is derived from Rockchip and VSI reference code, the
reduction of the reference list to 16 entries was found by
trial and errors. The list consists of all the references with the
opposite field parity.

The strategy is to deduplicate the reference picture that points
to the same storage (same index). The choice of opposite parity has
been made to keep the other field of the current field pair in the
list. This method may not be robust if a field was lost.

[hverkuil: fix typos in the comment before deduplicate_reflist()]
[hverkuil: document new cur_poc field]

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds the required code to support field decoding. While most of
the code is derived from Rockchip and VSI reference code, the
reduction of the reference list to 16 entries was found by
trial and errors. The list consists of all the references with the
opposite field parity.

The strategy is to deduplicate the reference picture that points
to the same storage (same index). The choice of opposite parity has
been made to keep the other field of the current field pair in the
list. This method may not be robust if a field was lost.

[hverkuil: fix typos in the comment before deduplicate_reflist()]
[hverkuil: document new cur_poc field]

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: hantro: h264: Make dpb entry management more robust</title>
<updated>2022-05-17T08:09:48+00:00</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2022-05-13T20:29:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3630e4933d40af53f698555d88e6143dc2d140b3'/>
<id>3630e4933d40af53f698555d88e6143dc2d140b3</id>
<content type='text'>
The driver maintains stable slot locations for reference pictures. This
change makes the code more robust by using the reference_ts as key and
by marking all entries invalid right from the start.

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The driver maintains stable slot locations for reference pictures. This
change makes the code more robust by using the reference_ts as key and
by marking all entries invalid right from the start.

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: hantro: Stop using H.264 parameter pic_num</title>
<updated>2022-05-17T08:09:10+00:00</updated>
<author>
<name>Nicolas Dufresne</name>
<email>nicolas.dufresne@collabora.com</email>
</author>
<published>2022-05-13T20:29:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=831410700909f4e29d5af1ef26b8c59fc2d1988e'/>
<id>831410700909f4e29d5af1ef26b8c59fc2d1988e</id>
<content type='text'>
The hardware expects FrameNumWrap or long_term_frame_idx. Picture
numbers are per field, and are mostly used during the memory
management process, which is done in userland. This fixes two
ITU conformance tests:

  - MR6_BT_B
  - MR8_BT_B

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The hardware expects FrameNumWrap or long_term_frame_idx. Picture
numbers are per field, and are mostly used during the memory
management process, which is done in userland. This fixes two
ITU conformance tests:

  - MR6_BT_B
  - MR8_BT_B

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: rkvdec: Enable capture buffer holding for H264</title>
<updated>2022-05-17T08:08:52+00:00</updated>
<author>
<name>Nicolas Dufresne</name>
<email>nicolas.dufresne@collabora.com</email>
</author>
<published>2022-05-13T20:29:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ed7bb87d3d035db3ae7ea50a6007a7429ff216b5'/>
<id>ed7bb87d3d035db3ae7ea50a6007a7429ff216b5</id>
<content type='text'>
In order to support interlaced video decoding, the driver must
allow holding the capture buffer so that the second field can
be decoded into it.

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to support interlaced video decoding, the driver must
allow holding the capture buffer so that the second field can
be decoded into it.

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: rkvdec-h264: Add field decoding support</title>
<updated>2022-05-17T08:07:49+00:00</updated>
<author>
<name>Nicolas Dufresne</name>
<email>nicolas.dufresne@collabora.com</email>
</author>
<published>2022-05-13T20:29:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6f32ea37c15e4960252937f1504738ccff56e2ea'/>
<id>6f32ea37c15e4960252937f1504738ccff56e2ea</id>
<content type='text'>
This makes use of the new feature in the reference builder to program
up to 32 references when doing field decoding. It also signals the
parity (top or bottom) of the field to the hardware.

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes use of the new feature in the reference builder to program
up to 32 references when doing field decoding. It also signals the
parity (top or bottom) of the field to the hardware.

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: rkvdec: Ensure decoded resolution fit coded resolution</title>
<updated>2022-05-17T08:07:08+00:00</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2022-05-13T20:29:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5e57a860df6cb5ee2b2502a0d4aceb23c35471c9'/>
<id>5e57a860df6cb5ee2b2502a0d4aceb23c35471c9</id>
<content type='text'>
Ensure decoded CAPTURE buffer resolution is larger or equal to the coded
OUTPUT buffer resolution.

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ensure decoded CAPTURE buffer resolution is larger or equal to the coded
OUTPUT buffer resolution.

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: rkvdec: h264: Fix reference frame_num wrap for second field</title>
<updated>2022-05-17T08:06:49+00:00</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2022-05-13T20:29:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f942d10dab5afba301fc215954f62e1761a7225a'/>
<id>f942d10dab5afba301fc215954f62e1761a7225a</id>
<content type='text'>
When decoding the second field in a complementary field pair the second
field is sharing the same frame_num with the first field.

Currently the frame_num for the first field is wrapped when it matches the
field being decoded, this caused issues decoding the second field in a
complementary field pair.

Fix this by using inclusive comparison: 'less than or equal'.

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Ezequiel Garcia &lt;ezequiel@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When decoding the second field in a complementary field pair the second
field is sharing the same frame_num with the first field.

Currently the frame_num for the first field is wrapped when it matches the
field being decoded, this caused issues decoding the second field in a
complementary field pair.

Fix this by using inclusive comparison: 'less than or equal'.

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Ezequiel Garcia &lt;ezequiel@collabora.com&gt;
Reviewed-by: Sebastian Fricke &lt;sebastian.fricke@collabora.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: rkvdec: h264: Validate and use pic width and height in mbs</title>
<updated>2022-05-17T08:06:31+00:00</updated>
<author>
<name>Jonas Karlman</name>
<email>jonas@kwiboo.se</email>
</author>
<published>2022-05-13T20:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=77e74be83083194f949f4979a35dec9012348d3b'/>
<id>77e74be83083194f949f4979a35dec9012348d3b</id>
<content type='text'>
The width and height in macroblocks is currently configured based on OUTPUT
buffer resolution, this works for frame pictures but can cause issues for
field pictures.

When frame_mbs_only_flag is 0 the height in mbs should be height of
the field instead of height of frame.

Validate pic_width_in_mbs_minus1 and pic_height_in_map_units_minus1
against OUTPUT buffer resolution and use these values to configure HW.
The validation is happening in both try_ctrt() and start() since it is
otherwise possible to trick the driver during initialization by changing
the OUTPUT format after having set a valid control.

[hverkuil: when -&gt; When (first word in a comment block)]

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The width and height in macroblocks is currently configured based on OUTPUT
buffer resolution, this works for frame pictures but can cause issues for
field pictures.

When frame_mbs_only_flag is 0 the height in mbs should be height of
the field instead of height of frame.

Validate pic_width_in_mbs_minus1 and pic_height_in_map_units_minus1
against OUTPUT buffer resolution and use these values to configure HW.
The validation is happening in both try_ctrt() and start() since it is
otherwise possible to trick the driver during initialization by changing
the OUTPUT format after having set a valid control.

[hverkuil: when -&gt; When (first word in a comment block)]

Signed-off-by: Jonas Karlman &lt;jonas@kwiboo.se&gt;
Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>media: rkvdec: Move H264 SPS validation in rkvdec-h264</title>
<updated>2022-05-17T08:06:08+00:00</updated>
<author>
<name>Nicolas Dufresne</name>
<email>nicolas.dufresne@collabora.com</email>
</author>
<published>2022-05-13T20:29:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=cf76bb4d5e74ac4211f1fa47052b30fa7dd6443f'/>
<id>cf76bb4d5e74ac4211f1fa47052b30fa7dd6443f</id>
<content type='text'>
No functional change, this moves H264 specific validation into the H264
specific code. This is in preparation of improving this validation and
reusing it when VIDIOC_STREAMON is called.

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional change, this moves H264 specific validation into the H264
specific code. This is in preparation of improving this validation and
reusing it when VIDIOC_STREAMON is called.

Signed-off-by: Nicolas Dufresne &lt;nicolas.dufresne@collabora.com&gt;
Reviewed-by: Ezequiel Garcia &lt;ezequiel@vanguardiasur.com.ar&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
