[PATCH vicodec] media: pvrusb2: replace `printk` with `pr_*`

2018-10-06 Thread Dafna Hirschfeld
Replace calls to `printk` with the appropriate `pr_*` macro. Signed-off-by: Dafna Hirschfeld --- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 8 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 14 ++ drivers/media/usb/pvrusb2/pvrusb2-main.c | 4 ++-- drivers/media

Problem with example program from https://gitlab.collabora.com/koike/v4l2-codec.git

2018-10-07 Thread Dafna Hirschfeld
RGB24 format. Can't proceed." I tried it on both kernel and modules 4.19.0-rc4+ compiled from https://git.linuxtv.org/linux.git and kenel and modules 4.19.0-rc1+ compiled from git://linuxtv.org/media_tree.git Any idea what is the problem or how to investigate ? Thanks, Dafna Hirschfeld

[PATCH vicodec] media: pvrusb2: replace `printk` with `pr_*`

2018-10-08 Thread Dafna Hirschfeld
Replace calls to `printk` with the appropriate `pr_*` macro. Signed-off-by: Dafna Hirschfeld --- drivers/media/usb/pvrusb2/pvrusb2-debug.h| 2 +- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 8 +++--- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 28 +--- drivers/media

[PATCH vicodec] media: davinci_vpfe: Replace function names with __func__

2018-10-11 Thread Dafna Hirschfeld
Replace hardcoded function names with `__func__` in debug prints. Signed-off-by: Dafna Hirschfeld --- .../staging/media/davinci_vpfe/dm365_ipipe.c | 6 +- .../media/davinci_vpfe/dm365_resizer.c| 2 +- .../media/davinci_vpfe/vpfe_mc_capture.c | 8 +-- .../staging/media

[PATCH vicodec v4 0/3] Add support to more pixel formats in vicodec

2018-11-15 Thread Dafna Hirschfeld
decoded - allocate maximal space for the V4L2_PIX_FMT_FWHT format with the test 'flags & FWHT_FL_COMPONENTS_NUM_BIT[01]' Dafna Hirschfeld (3): media: vicodec: prepare support for various number of planes media: vicodec: Add support of greyscale format media: vicodec: Add suppor

[PATCH vicodec v4 2/3] media: vicodec: Add support of greyscale format

2018-11-15 Thread Dafna Hirschfeld
Add support for single plane greyscale format V4L2_PIX_FMT_GREY. Also change the header of the encoded file to include the number of components. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 56 +++ drivers/media/platform/vicodec/codec

[PATCH vicodec v4 1/3] media: vicodec: prepare support for various number of planes

2018-11-15 Thread Dafna Hirschfeld
Add fields to the structs `fwht_raw_frame`, `v4l2_fwht_pixfmts` to support various number of planes - formats with alpha channel that have 4 planes and greyscale formats that have 1 plane. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 2 +- drivers/media

[PATCH vicodec v4 3/3] media: vicodec: Add support for 4 planes formats

2018-11-15 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 15 + drivers/media/platform/vicodec/codec-fwht.h

[PATCH] media: vicodec: Change variable names

2018-12-04 Thread Dafna Hirschfeld
Change variables names in vicodec-core.c to *_src *_dst to improve readability Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 94 ++- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/drivers/media/platform/vicodec/vicodec

[PATCH] media: vicodec: bugfix - replace '=' with '|='

2018-12-15 Thread Dafna Hirschfeld
In the function fwht_encode_frame, 'encoding = encode_plane' should be replaced with 'encoding |= encode_plane' so existing flags won't be overwrriten. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 2 +- 1 file changed, 1 insertio

[PATCH] media: vicodec: add support for CROP selection

2018-12-15 Thread Dafna Hirschfeld
Add support for the selection api for the crop target. The driver rounds up the width and height such that all planes dimesnsions are multiple of 8. The userspace client should also read and write the raw frames according the padding. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform

Fwd: [PATCH] media: vicodec: add support for CROP selection

2018-12-17 Thread Dafna Hirschfeld
-- Forwarded message - From: Dafna Hirschfeld Date: Mon, Dec 17, 2018 at 7:23 PM Subject: Re: [PATCH] media: vicodec: add support for CROP selection To: Hans Verkuil Cc: Linux Media Mailing List , On Sun, Dec 16, 2018 at 2:24 PM Hans Verkuil wrote: > > On 12/15/18 12

[PATCH v2] media: vicodec: bugfix - replace '=' with '|='

2018-12-17 Thread Dafna Hirschfeld
In the fwht_encode_frame, 'encoding = encode_plane' should be replaced with 'encoding |= encode_plane' so existing flags won't be overwrriten. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 8 1 file changed, 4 insertions

[PATCH v4l-utils] v4l2-ctl: Add support for CROP selection in m2m streaming

2018-12-18 Thread Dafna Hirschfeld
Add support for crop in the selection api for m2m encoder. This includes reading and writing raw frames with padding. Signed-off-by: Dafna Hirschfeld --- Tested with the jellyfish video, with this script: https://github.com/kamomil/outreachy/blob/master/test-v4l2-utils-with-jelly.sh Tested on

Re: [PATCH v4l-utils] v4l2-ctl: Add support for CROP selection in m2m streaming

2018-12-19 Thread Dafna Hirschfeld
On Tue, Dec 18, 2018 at 2:43 PM Hans Verkuil wrote: > > On 12/18/18 12:11 PM, Dafna Hirschfeld wrote: > > Add support for crop in the selection api for m2m encoder. > > This includes reading and writing raw frames with padding. > > > > Signed-off-by: Dafna Hirschfel

[PATCH v2] media: vicodec: add support for CROP selection in the encoder

2018-12-19 Thread Dafna Hirschfeld
Add support for the selection api for the crop target in the encoder. The driver rounds up the coded width and height such that all planes dimensions are multiple of 8. Signed-off-by: Dafna Hirschfeld --- Changes from v1: Renaming fields to be more descriptive. Setting default values to

Re: [PATCH v4l-utils] v4l2-ctl: Add support for CROP selection in m2m streaming

2018-12-19 Thread Dafna Hirschfeld
On Wed, Dec 19, 2018 at 12:03 PM Hans Verkuil wrote: > > On 12/19/18 9:34 AM, Dafna Hirschfeld wrote: > >>> +bool is_m2m_enc = false; > >> > >> This should be static. > >> > >> I'm assuming that in a future patch we'll get a is_

Re: [PATCH v2] media: vicodec: add support for CROP selection in the encoder

2018-12-20 Thread Dafna Hirschfeld
On Thu, Dec 20, 2018 at 12:20 PM Hans Verkuil wrote: > > On 12/19/18 1:18 PM, Dafna Hirschfeld wrote: > > Add support for the selection api for the crop target in the encoder. > > The driver rounds up the coded width and height such that > > all planes dimensions are multi

Re: [PATCH v4l-utils] v4l2-ctl: Add support for CROP selection in m2m streaming

2018-12-22 Thread Dafna Hirschfeld
On Wed, Dec 19, 2018 at 12:03 PM Hans Verkuil wrote: > > On 12/19/18 9:34 AM, Dafna Hirschfeld wrote: > >>> +bool is_m2m_enc = false; > >> > >> This should be static. > >> > >> I'm assuming that in a future patch we'll get a is_

[PATCH v3] media: vicodec: add support for CROP and COMPOSE selection

2018-12-22 Thread 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: Dafna Hirschfeld --- Main Changes from v2: Add support for compose selection. Rename the width/height fields of

[PATCH v4] media: vicodec: add support for CROP and COMPOSE selection

2018-12-23 Thread 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: Dafna Hirschfeld --- Changes from v3: In v3 mistakenly renamed some stride variables in codec-fwht.c to

[PATCH v5] media: vicodec: add support for CROP and COMPOSE selection

2018-12-29 Thread 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: Dafna Hirschfeld --- Main changes from v4: In s/g_selection, check buffer type according to 'multiplanar'

[PATCH v4l-utils] v4l2-ctl: Move some code from do_handle_cap to a new function

2018-12-29 Thread Dafna Hirschfeld
Move the code that deals with reading from file in 'do_handle_cap' to a new function 'write_buffer_to_file' Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 139 +- 1 file changed, 72 insertions(+), 67 deletions(-) diff --

[PATCH] media: vicodec: Add num_planes field to v4l2_fwht_pixfmt_info

2018-12-29 Thread Dafna Hirschfeld
Add the field 'num_planes' to 'v4l2_fwht_pixfmt_info' struct. Signed-off-by: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 48 +-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platform/vicodec/vicodec-core.c | 2

[v4l-utils PATCH v2] v4l2-ctl: Add support for crop and compose selection in streaming

2019-01-02 Thread Dafna Hirschfeld
Support crop and compose selection. If the driver supports crop/compose then the raw frame is arranged inside a padded buffer. Signed-off-by: Dafna Hirschfeld --- utils/common/codec-fwht.patch | 8 +- utils/common/v4l-stream.c | 14 +-- utils/common/v4l-stream.h

Re: [PATCH v5] media: vicodec: add support for CROP and COMPOSE selection

2019-01-03 Thread Dafna Hirschfeld
On Wed, Jan 2, 2019 at 12:22 PM Hans Verkuil wrote: > > On 12/30/2018 02:48 PM, Dafna Hirschfeld wrote: > > > > > > On Sun, Dec 30, 2018 at 2:22 PM Hans Verkuil > <mailto:hverk...@xs4all.nl>> wrote: > > > > On 12/29/2018 04:20 PM, Dafna

[PATCH v6] media: vicodec: add support for CROP and COMPOSE selection

2019-01-04 Thread 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: Dafna Hirschfeld --- This patch temporarily dysfunction vicoded since it does not allow setting the visible

[v4l-utils PATCH v3] v4l2-ctl: Add support for crop and compose selection in streaming

2019-01-04 Thread Dafna Hirschfeld
Support crop and compose selection. If the driver supports crop/compose then the raw frame is arranged inside a padded buffer. Signed-off-by: Dafna Hirschfeld --- Chnages from v2: 1. cleanups 2. change the code of read_write_padded_frame to use bytesperline as a stride utils/common/codec

[PATCH 1/4] media: vicodec: bugfix - replace '=' with '|='

2019-01-15 Thread Dafna Hirschfeld
In the fwht_encode_frame, 'encoding = encode_plane' should be replaced with 'encoding |= encode_plane' so existing flags won't be overwrriten. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 8 1 file changed, 4 insertions

[PATCH 4/4] media: vicodec: Add support for dynamic resolution change

2019-01-15 Thread Dafna Hirschfeld
The decoder gets the resolution information from the headers of the compressed frames and starts a 'Dynamic Resolution Change' according to the decoder spec Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 5 + .../media/platform/vicodec/codec-v

[PATCH 2/4] media: vicodec: Add num_planes field to v4l2_fwht_pixfmt_info

2019-01-15 Thread Dafna Hirschfeld
Add the field 'num_planes' to 'v4l2_fwht_pixfmt_info' struct. Signed-off-by: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 48 +-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platform/vicodec/vicodec-core.c | 2

[PATCH 3/4] media: vicodec: add support for CROP and COMPOSE selection

2019-01-15 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 80 +++-- drivers/media/platform/vicodec

[PATCH v2 1/6] media: vicodec: bugfix - replace '=' with '|='

2019-01-16 Thread Dafna Hirschfeld
In the fwht_encode_frame, 'encoding = encode_plane' should be replaced with 'encoding |= encode_plane' so existing flags won't be overwrriten. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 8 1 file changed, 4 insertions

[PATCH v2 0/6] Adding support to resolution change and apdding

2019-01-16 Thread Dafna Hirschfeld
Main changes from v1: split the last patch to 3 patches: 1. add pixel encoding flags 2. read the compressed frame header to a different field than the frame data 3. add support for source change event Dafna Hirschfeld (6): media: vicodec: bugfix - replace '=' with '|='

[PATCH v2 2/6] media: vicodec: Add num_planes field to v4l2_fwht_pixfmt_info

2019-01-16 Thread Dafna Hirschfeld
Add the field 'num_planes' to 'v4l2_fwht_pixfmt_info' struct. Signed-off-by: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 48 +-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platform/vicodec/vicodec-core.c | 2

[PATCH v2 3/6] media: vicodec: add support for CROP and COMPOSE selection

2019-01-16 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 80 +++-- drivers/media/platform/vicodec

[PATCH v2 5/6] media: vicodec: Separate fwht header from the frame data

2019-01-16 Thread 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: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 24 ++-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platfo

[PATCH v2 4/6] media: vicodec: Add pixel encoding flags to fwht header

2019-01-16 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 5 ++ .../media/platform/vicodec/codec-v4l2-fwht.c | 76

[PATCH v2 6/6] media: vicodec: Add support for resolution change event.

2019-01-16 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 381 ++ 1 file changed

[PATCH v3 2/6] media: vicodec: Add num_planes field to v4l2_fwht_pixfmt_info

2019-01-17 Thread Dafna Hirschfeld
Add the field 'num_planes' to 'v4l2_fwht_pixfmt_info' struct. Signed-off-by: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 48 +-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platform/vicodec/vicodec-core.c | 2

[PATCH v3 0/6] add support for resolution change event

2019-01-17 Thread Dafna Hirschfeld
Main changes from v2: 1. bugfix in patch "add support for CROP" (pix instead of pix_mp) in vidioc_try_fmt 2. using bits 18-20 for the pixel encoding so that 0 means previous version 3. some refactoring Dafna Hirschfeld (6): media: vicodec: bugfix - replace '=' with '

[PATCH v3 1/6] media: vicodec: bugfix - replace '=' with '|='

2019-01-17 Thread Dafna Hirschfeld
In the fwht_encode_frame, 'encoding = encode_plane' should be replaced with 'encoding |= encode_plane' so existing flags won't be overwrriten. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 8 1 file changed, 4 insertions

[PATCH v3 3/6] media: vicodec: add support for CROP and COMPOSE selection

2019-01-17 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 80 +++-- drivers/media/platform/vicodec

[PATCH v3 5/6] media: vicodec: Separate fwht header from the frame data

2019-01-17 Thread 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: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 24 ++-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platfo

[PATCH v3 6/6] media: vicodec: Add support for resolution change event.

2019-01-17 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 355 ++ 1 file changed

[PATCH v3 4/6] media: vicodec: Add pixel encoding flags to fwht header

2019-01-17 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 5 ++ .../media/platform/vicodec/codec-v4l2-fwht.c | 76

[PATCH v4 0/6] media: vicodec: resolution change suport

2019-01-19 Thread Dafna Hirschfeld
Changes from v3: 1. bugfix in stop_sreaming callback, ctx->max_comp_size should initialize when the ref_fram is freed. 2. added patch - use 3 bits for the number of components in the fwht header. 3. remove the first patch: "bugfix - replace '=' with '|='" s

[PATCH v4 1/6] media: vicodec: Add num_planes field to v4l2_fwht_pixfmt_info

2019-01-19 Thread Dafna Hirschfeld
Add the field 'num_planes' to 'v4l2_fwht_pixfmt_info' struct. Signed-off-by: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 48 +-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platform/vicodec/vicodec-core.c | 2

[PATCH v4 4/6] media: vicodec: Add pixel encoding flags to fwht header

2019-01-19 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 6 ++ .../media/platform/vicodec/codec-v4l2-fwht.c | 76

[PATCH v4 2/6] media: vicodec: add support for CROP and COMPOSE selection

2019-01-19 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 80 +++-- drivers/media/platform/vicodec

[PATCH v4 5/6] media: vicodec: Separate fwht header from the frame data

2019-01-19 Thread 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: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 24 ++-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platfo

[PATCH v4 3/6] media: vicodec: use 3 bits for the number of components

2019-01-19 Thread Dafna Hirschfeld
Use 3 bits for the number of components mask in the fwht header flags Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/vicodec/codec-fwht.h b/drivers/media/platform/vicodec

[PATCH v4 6/6] media: vicodec: Add support for resolution change event.

2019-01-19 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 355 ++ 1 file changed

[v4l-utils PATCH 1/6] v4l2-ctl: Add support for crop and compose selection in streaming

2019-01-20 Thread Dafna Hirschfeld
Support crop and compose selection. If the driver supports crop/compose then the raw frame is arranged inside a padded buffer. Signed-off-by: Dafna Hirschfeld --- utils/common/codec-fwht.patch | 8 +- utils/common/v4l-stream.c | 14 +-- utils/common/v4l-stream.h

[v4l-utils PATCH 2/6] v4l2-ctl: Add function get_codec_type

2019-01-20 Thread Dafna Hirschfeld
Add function get_codec_type that returns the type of codec NOT_CODEC/ENCODER/DEOCDER. Move the functions get_cap_compose/crop_rect to the start of the file. Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 126 ++ 1 file changed, 88 insertions

[v4l-utils PATCH 0/6] Support for source change in m2m decoder

2019-01-20 Thread Dafna Hirschfeld
1. The first patch "Add support for crop and compose selection in streaming" was already reviewed. 2. The actual support is added in the patch "Add support for source change event for m2m decoder" 3. The last patch is only a suggestion for adding a new option in the command lin

[v4l-utils PATCH 4/6] v4l2-ctl: Introduce capture_setup

2019-01-20 Thread Dafna Hirschfeld
Add function capture_setup that implements the capture setup sequence. Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 58 +++ 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2

[v4l-utils PATCH 6/6] v4l2-ctl: Add --stream-pixformat option

2019-01-20 Thread Dafna Hirschfeld
This option sets the capture pixelformat in the capture setup sequence. If the format is not supported decoding will stop. If the option is not given then the default is to set the first supported format. Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 29

[v4l-utils PATCH 3/6] v4l2-ctl: test the excpetion fds first in streaming_set_m2m

2019-01-20 Thread Dafna Hirschfeld
test the excpetion fds first in the select loop in streaming_set_m2m. This is needed in the next patch in order to dequeue a source change event before its coresponding last buffer. Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 26 +- 1 file

[v4l-utils PATCH 5/6] v4l2-ctl: Add support for source change event for m2m decoder

2019-01-20 Thread Dafna Hirschfeld
Subscribe to source change event. The capture setup sequence is executed only due to a change event. Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 90 ++- 1 file changed, 76 insertions(+), 14 deletions(-) diff --git a/utils/v4l2-ctl/v4l2

[PATCH v5 5/6] media: vicodec: Separate fwht header from the frame data

2019-01-20 Thread 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: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 24 ++-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platfo

[PATCH v5 0/6] media: vicodec: source change support

2019-01-20 Thread Dafna Hirschfeld
comp_frame_size was set only when the full header is dound in job_ready Dafna Hirschfeld (6): media: vicodec: Add num_planes field to v4l2_fwht_pixfmt_info media: vicodec: add support for CROP and COMPOSE selection media: vicodec: use 3 bits for the number of components media: vicodec: Add pixel

[PATCH v5 1/6] media: vicodec: Add num_planes field to v4l2_fwht_pixfmt_info

2019-01-20 Thread Dafna Hirschfeld
Add the field 'num_planes' to 'v4l2_fwht_pixfmt_info' struct. Signed-off-by: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 48 +-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platform/vicodec/vicodec-core.c | 2

[PATCH v5 4/6] media: vicodec: Add pixel encoding flags to fwht header

2019-01-20 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 6 ++ .../media/platform/vicodec/codec-v4l2-fwht.c | 76

[PATCH v5 2/6] media: vicodec: add support for CROP and COMPOSE selection

2019-01-20 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 80 +++-- drivers/media/platform/vicodec

[PATCH v5 3/6] media: vicodec: use 3 bits for the number of components

2019-01-20 Thread Dafna Hirschfeld
Use 3 bits for the number of components mask in the fwht header flags Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/vicodec/codec-fwht.h b/drivers/media/platform/vicodec

[PATCH v5 6/6] media: vicodec: Add support for resolution change event.

2019-01-20 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 358 ++ 1 file changed

[PATCH v6 3/5] media: vicodec: Add pixel encoding flags to fwht header

2019-01-21 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 6 ++ .../media/platform/vicodec/codec-v4l2-fwht.c | 77

[PATCH v6 1/5] media: vicodec: add support for CROP and COMPOSE selection

2019-01-21 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 83 +++-- drivers/media/platform/vicodec

[PATCH v6 4/5] media: vicodec: Separate fwht header from the frame data

2019-01-21 Thread 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: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 24 ++-- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platfo

[PATCH v6 2/5] media: vicodec: use 3 bits for the number of components

2019-01-21 Thread Dafna Hirschfeld
Use 3 bits for the number of components mask in the fwht header flags Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/vicodec/codec-fwht.h b/drivers/media/platform/vicodec

[PATCH v6 5/5] media: vicodec: Add support for resolution change event.

2019-01-21 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 361 ++ 1 file changed

[PATCH v6 0/5] media: vicodec: source change support

2019-01-21 Thread Dafna Hirschfeld
Changes from v5 cleanups of 'line too long' warnings' Dafna Hirschfeld (5): media: vicodec: add support for CROP and COMPOSE selection media: vicodec: use 3 bits for the number of components media: vicodec: Add pixel encoding flags to fwht header media: vicodec: Separate f

[v4l-utils PATCH v2 4/5] v4l2-ctl: Add support for source change event for m2m decoder

2019-01-21 Thread Dafna Hirschfeld
Subscribe to source change event. The capture setup sequence is executed only due to a change event. Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 112 +++--- 1 file changed, 85 insertions(+), 27 deletions(-) diff --git a/utils/v4l2-ctl/v4l2

[v4l-utils PATCH v2 5/5] v4l2-ctl: Add --stream-pixformat option

2019-01-21 Thread Dafna Hirschfeld
This option sets the capture pixelformat in the capture setup sequence. If the format is not supported decoding will stop. If the option is not given then the default is to set the first supported format. Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 37

[v4l-utils PATCH v2 3/5] v4l2-ctl: Introduce capture_setup

2019-01-21 Thread Dafna Hirschfeld
Add function capture_setup that implements the capture setup sequence. Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 46 ++- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2

[v4l-utils PATCH v2 1/5] v4l2-ctl: Add support for crop and compose selection in streaming

2019-01-21 Thread Dafna Hirschfeld
Support crop and compose selection. If the driver supports crop/compose then the raw frame is arranged inside a padded buffer. Signed-off-by: Dafna Hirschfeld --- utils/common/codec-fwht.patch | 8 +- utils/common/v4l-stream.c | 14 +-- utils/common/v4l-stream.h

[v4l-utils PATCH v2 0/5] source change support in v4l2-ctl

2019-01-21 Thread Dafna Hirschfeld
t in "Introduce capture_setup" patch Dafna Hirschfeld (5): v4l2-ctl: Add support for crop and compose selection in streaming v4l2-ctl: Add function get_codec_type v4l2-ctl: Introduce capture_setup v4l2-ctl: Add support for source change event for m2m decoder v4l2-ctl: Add --stream

[v4l-utils PATCH v2 2/5] v4l2-ctl: Add function get_codec_type

2019-01-21 Thread Dafna Hirschfeld
Add function get_codec_type that returns the type of codec NOT_CODEC/ENCODER/DEOCDER. Move the functions get_cap_compose/crop_rect to the start of the file. Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 123 ++ 1 file changed, 85 insertions

[PATCH] media: vicodec: ensure comp frame pointer kept in range

2019-01-22 Thread Dafna Hirschfeld
Make sure that the pointer to the compressed frame does not get out of the buffer. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.c | 73 +-- drivers/media/platform/vicodec/codec-fwht.h | 8 +- .../media/platform/vicodec/codec-v4l2-fwht.c

[PATCH v2] media: vicodec: ensure comp frame pointer kept in range

2019-01-24 Thread Dafna Hirschfeld
Make sure that the pointer to the compressed frame does not get out of the buffer. Signed-off-by: Dafna Hirschfeld --- Changes from v1: set OVERFLOW_BIT in derlc return val to indicate overflow. fix return value type from s16 to u16 drivers/media/platform/vicodec/codec-fwht.c | 71

[PATCH 3/3] media: vicodec: Register another node for stateless decoder

2019-01-26 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 56 +-- 1 file

[PATCH 1/3] media: vicodec: add struct for encoder/decoder instance

2019-01-26 Thread Dafna Hirschfeld
Add struct 'vicodec_dev_instance' for the fields in vicodec_dev that have have both decoder and encoder versions. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 175 +- 1 file changed, 89 insertions(+), 86 deletions(-) diff --git

[PATCH 2/3] media: vicodec: Introducing stateless fwht defs and structs

2019-01-26 Thread Dafna Hirschfeld
Add structs and definitions needed to implement stateless decoder for fwht. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 12 drivers/media/v4l2-core/v4l2-ctrls.c | 6 ++ include/uapi/linux/v4l2-controls.h| 10

[PATCH 0/3] Prepare for statless decoder for fwht

2019-01-26 Thread Dafna Hirschfeld
Patches to prepare for the implementation of the statless decoder api in vicodec Dafna Hirschfeld (3): media: vicodec: add struct for encoder/decoder instance media: vicodec: Introducing stateless fwht defs and structs media: vicodec: Register another node for stateless decoder drivers

Re: [PATCH v2] media: docs-rst: Document m2m stateless video decoder interface

2019-01-28 Thread Dafna Hirschfeld
On Tue, Jan 22, 2019 at 8:27 AM Alexandre Courbot wrote: > > Documents the protocol that user-space should follow when > communicating with stateless video decoders. > > The stateless video decoding API makes use of the new request and tags > APIs. While it has been implemented with the Cedrus dri

[PATCH] v4l2-ctl: add function vidcap_get_and_update_fmt

2019-01-30 Thread Dafna Hirschfeld
add a function vidcap_get_and_update_fmt to set the format from cmd params. Use it in capture_setup. Signed-off-by: Dafna Hirschfeld --- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 13 +++ utils/v4l2-ctl/v4l2-ctl-vidcap.cpp| 140 ++ utils/v4l2-ctl/v4l2-ctl.h

[PATCH v2] v4l2-ctl: add function vidcap_get_and_update_fmt

2019-01-30 Thread Dafna Hirschfeld
add a function vidcap_get_and_update_fmt to set the format from cmd params. Use it in capture_setup. Signed-off-by: Dafna Hirschfeld --- Changes from v1: change the order of vidcap_get_and_update_fmt and vidcap_set utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 13 +++ utils/v4l2-ctl/v4l2-ctl

regarding commit "v4l2-ctl: get fmt after source change" in v4l-utils repository

2019-07-01 Thread Dafna Hirschfeld
commit 84219e2b5d013709ee5259621715966c46eec746 Author: Hans Verkuil Date: Sat Mar 30 14:16:25 2019 +0100 v4l2-ctl: get fmt after source change When a source change event arrives during decoding get the new format at that point instead of after restarting streaming. If there i

kernel Warning when using vivid with contiguous dma

2019-07-22 Thread Dafna Hirschfeld
I loaded the vivid module with contiguous DMA and ran streaming with it with large image dimensions here are the commans: $ uname -a Linux ubuntu 5.2.0-rc5+ #1 SMP Mon Jul 1 10:17:46 PDT 2019 x86_64 x86_64 x86_64 GNU/Linux $ sudo modprobe -v vivid allocators=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1

Re: kernel Warning when using vivid with contiguous dma

2019-07-23 Thread Dafna Hirschfeld
On Mon, 2019-07-22 at 08:38 -0300, Mauro Carvalho Chehab wrote: > Em Mon, 22 Jul 2019 13:21:00 +0200 > Dafna Hirschfeld escreveu: > > > I loaded the vivid module with contiguous DMA and ran streaming > > with > > it with large image dimensions > > [  306.4373

Re: kernel Warning when using vivid with contiguous dma

2019-07-25 Thread Dafna Hirschfeld
On Tue, 2019-07-23 at 14:05 +, Hans Verkuil (hansverk) wrote: > On 7/23/19 3:14 PM, Dafna Hirschfeld wrote: > > On Mon, 2019-07-22 at 08:38 -0300, Mauro Carvalho Chehab wrote: > > > Em Mon, 22 Jul 2019 13:21:00 +0200 > > > Dafna Hirschfeld escreveu: > > >

[PATCH v3] v4l2-ctl: add function vidcap_get_and_update_fmt

2019-01-30 Thread Dafna Hirschfeld
add a function vidcap_get_and_update_fmt to set the format from cmd params. Use it in capture_setup. Signed-off-by: Dafna Hirschfeld --- Changes from v2: move get_cap_compose_rect to after s_fmt in capture_setup utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 15 ++- utils/v4l2-ctl/v4l2-ctl

[PATCH 3/3] media: vicodec: keep the ref frame according to the format in decoder

2019-02-05 Thread 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: Dafna Hirschfeld --- drivers/media

[PATCH 1/3] media: vicodec: Move raw frame preparation code to a function

2019-02-05 Thread Dafna Hirschfeld
Introduce 'prepare_raw_frame' function that fills the values of a raw frame struct according to the format. Signed-off-by: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 140 ++ 1 file changed, 75 insertions(+), 65 deletions(-) diff --git a/dri

[PATCH 2/3] media: vicodec: add field 'buf' to fwht_raw_frame

2019-02-05 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 1 + drivers/medi

[PATCH 0/9] media: vicodec: add support to stateless decoder

2019-02-09 Thread Dafna Hirschfeld
o_ref' Patches 4-6 - fixes according to the code review. Patch 5 (Introducing stateless fwht defs and struct): - add width,height fields to v4l2_ctrl_fwht_params Patches 7-9 are new Dafna Hirschfeld (9): media: vicodec: Move raw frame p

[PATCH 7/9] media: vb2: Add func that return buffer by timestamp

2019-02-09 Thread Dafna Hirschfeld
Add the function 'vb2_find_timestamp_buf' that returns the vb2 buffer that matches the given timestamp Signed-off-by: Dafna Hirschfeld --- drivers/media/common/videobuf2/videobuf2-v4l2.c | 14 ++ include/media/videobuf2-v4l2.h | 3 +++ 2 files c

[PATCH 2/9] media: vicodec: add field 'buf' to fwht_raw_frame

2019-02-09 Thread 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: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 1 + drivers/medi

[PATCH 3/9] media: vicodec: keep the ref frame according to the format in decoder

2019-02-09 Thread 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: Dafna Hirschfeld --- drivers/media

  1   2   3   4   >