- 11 6月, 2019 2 次提交
-
-
由 Hans Verkuil 提交于
Rather than returning width/height values of 0, just default to a format. Formats in V4L2 are always supposed to be valid, there is no concept of an invalid format. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Hans Verkuil 提交于
v4l2_ctrl_request_complete can sleep, so can't be called while a spinlock is held. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 05 6月, 2019 2 次提交
-
-
由 Hans Verkuil 提交于
Use the new helper functions for the try_de/decoder_cmd ioctls. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Reviewed-by: NTomasz Figa <tfiga@chromium.org> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Boris Brezillon 提交于
Support for multiplanar and singleplanar formats is mutually exclusive, at least in practice. In our attempt to unify support for support for mplane and !mplane in v4l, let's get rid of the ->vidioc_enum_fmt_{vid,out}_cap_mplane() hooks and call ->vidioc_enum_fmt_{vid,out}_cap() instead. Signed-off-by: NBoris Brezillon <boris.brezillon@collabora.com> Reviewed-by: NSylwester Nawrocki <s.nawrocki@samsung.com> [hverkuil-cisco@xs4all.nl: fix typos: pirv -> priv and prov -> priv] Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 29 5月, 2019 1 次提交
-
-
由 Hans Verkuil 提交于
Unbinding the driver while streaming caused the driver to hang. The cause of this was failing to use the v4l2_device release function and the use of devm_kmalloc for the state structure. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 29 3月, 2019 1 次提交
-
-
由 Mauro Carvalho Chehab 提交于
The strncpy() function is being deprecated upstream. Replace it by the safer strscpy(). While here, replace a few occurences of strlcpy() that were recently added to also use strscpy(). Reviewed-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 26 3月, 2019 15 次提交
-
-
由 Dafna Hirschfeld 提交于
for stateless decoder, set the output pixelformat to V4L2_PIX_FMT_FWHT_STATELESS and the pix info to pixfmt_stateless_fwht Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Implement a stateless decoder for the new node. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: add 'return 0;' before default case in vicodec_try_ctrl()] Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Add stateless decoder instance field to the dev struct and register another node for the statelsess decoder. The stateless API for the node will be implemented in further patches. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: fix typo: videdev-stateless-dec -> stateless-decoder] Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Add structs and definitions needed to implement stateless decoder for fwht and add I/P-frames QP controls to the public api. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Add struct 'vicodec_dev_instance' for the fields in vicodec_dev that have have both decoder and encoder versions. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Rename 'v4l2_fwht_default_fmt' to 'v4l2_fwht_find_nth_fmt' and add a function 'v4l2_fwht_validate_fmt' to check if a format info matches the parameters. This function will also be used to validate the stateless params when adding support for stateless codecs. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Move the code that validates version dependent header values to a separate function 'validate_by_version' Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
In the decoder, save the inner reference frame in the same format as the capture buffer. The decoder writes directly to the capture buffer and then the capture buffer is copied to the reference buffer. This will simplify the stateless decoder. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Add the field 'buf' to fwht_raw_frame to indicate the start of the raw frame buffer. This field will be used to copy the capture buffer to the reference buffer in the next patch. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Free compressed_frame buffer upon device release. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
The function 'v4l2_m2m_buf_copy_metadata' should be called even if decoding/encoding ends with status VB2_BUF_STATE_ERROR, so that the metadata is copied from the source buffer to the dest buffer. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
v4l2_fwht_encode returns either an error code on failure or the size of the compressed frame on success. So change the var assigned to it from 'ret' to 'comp_sz_or_errcode' to clarify that. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
'v4l2_m2m_ctx_release' calls request complete so it should be called before 'v4l2_ctrl_handler_free'. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Hans Verkuil 提交于
The logic of g_selection was wrong: encoders support crop, decoders support compose, but the code allowed both. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
The selection api should check only single buffer types because multiplanar types are converted to single in drivers/media/v4l2-core/v4l2-ioctl.c Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 20 3月, 2019 2 次提交
-
-
由 Hans Verkuil 提交于
When start_streaming was called both last_src_buf and last_dst_buf pointers were set to NULL, but this depends on whether the capture or output queue starts streaming. When decoding with resolution changes in between the capture queue has to restart streaming whenever a resolution change occurs. And that would reset last_src_buf as well, which causes a problem if the decoder was stopped by the application. Since last_src_buf is now NULL, the LAST flag is never set for the last capture buffer. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Hans Verkuil 提交于
Some functions like enum_fmt use the buffer type as was passed from userspace, which might cause the switch to fall into the default case. Just drop the WARN_ON(1) to avoid kernel log pollution. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 19 2月, 2019 1 次提交
-
-
由 Dafna Hirschfeld 提交于
Add a flag 'FWHT_FL_I_FRAME' that indicates that this is an I-frame. This requires incrementing to version 3 This flag is needed for the upcoming stateless FWHT decoder since it has to know if an encoded frame is an I or a P frame. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> [hverkuil-cisco@xs4all.nl: added the last paragraph of the commit msg] Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 08 2月, 2019 4 次提交
-
-
由 Ezequiel Garcia 提交于
The v4l2_m2m_buf_copy_data helper is used to copy the buffer metadata, such as its timestamp and its flags. Therefore, the v4l2_m2m_buf_copy_metadata name is more clear and avoids confusion with a payload data copy. Signed-off-by: NEzequiel Garcia <ezequiel@collabora.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: also fix cedrus_dec.c] Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Hans Verkuil 提交于
The SOURCE_CHANGE event is decoder specific, so don't allow it for encoders. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Hans Verkuil 提交于
It is good practice to fill in bus_info. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Hans Verkuil 提交于
Check that the selection buf_type is valid before calling get_q_data() to avoid hitting the WARN(1) in that function if the buffer type is not valid. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Reported-by: syzbot+44b24cff6bf96006ecfa@syzkaller.appspotmail.com Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 26 1月, 2019 7 次提交
-
-
由 Mauro Carvalho Chehab 提交于
drivers/media/platform/vicodec/vicodec-core.c:drivers/media/platform/vicodec/vicodec-core.c:210:23: warning: symbol 'get_next_header' was not declared. Should it be static? drivers/media/platform/vicodec/vicodec-core.c:210:23: warning: no previous prototype for 'get_next_header' [-Wmissing-prototypes] enum vb2_buffer_state get_next_header(struct vicodec_ctx *ctx, u8 **pp, u32 sz) ^~~~~~~~~~~~~~~ Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Make sure that the pointer to the compressed frame does not get out of the buffer. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
If the the queues are not streaming then the first resolution change is handled in the buf_queue callback. The following resolution change events are handled in job_ready. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: wrap info_from_header prototype] Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Keep the fwht header in separated field from the data. Refactor job_ready to use a new function 'get_next_header' Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Add flags indicating the pixel encoding - yuv/rgb/hsv to fwht header and to the pixel info. Use it to enumerate the supported pixel formats. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Add support for the selection api for the crop and compose targets. The driver rounds up the coded width and height such that all planes dimensions are multiple of 8. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Add the field 'num_planes' to 'v4l2_fwht_pixfmt_info' struct. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 08 1月, 2019 1 次提交
-
-
由 Hans Verkuil 提交于
Use the new v4l2_m2m_buf_copy_data() function in vicodec. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 05 12月, 2018 1 次提交
-
-
由 Dafna Hirschfeld 提交于
Change variables names in vicodec-core.c to *_src *_dst to improve readability Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 04 12月, 2018 1 次提交
-
-
由 Hans Verkuil 提交于
The state structure contains the resolution expected by the decoder and encoder. For an encoder that resolution should be taken from the OUTPUT format, and for a decoder from the CAPTURE format. If the wrong format is picked, a buffer overrun can occur if there is a mismatch between the CAPTURE and OUTPUT formats. The real fix would be to correctly implement the stateful codec specification, but that will take more time. For now just prevent the buffer overrun. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
- 23 11月, 2018 2 次提交
-
-
由 Julia Lawall 提交于
The v4l2_ctrl_ops structure is only stored in the ops field of a v4l2_ctrl_config structure, and this field is const, or passed as the second argument of v4l2_ctrl_new_std, and the corresponding parameter is declared as const. Accordingly, the structure can also be const. Done with the help of Coccinelle. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com> Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-
由 Dafna Hirschfeld 提交于
Add support for formats with 4 planes: V4L2_PIX_FMT_ABGR32, V4L2_PIX_FMT_ARGB32. Also add alpha plane related flags to the header of the encoded file. Signed-off-by: NDafna Hirschfeld <dafna3@gmail.com> Signed-off-by: NHans Verkuil <hverkuil@xs4all.nl> [hans.verkuil@cisco.com: fix line-too-long warnings] Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
-