提交線圖

82 次程式碼提交

作者 SHA1 備註 日期
Ashish Patil
5bbe9a0002 video: driver: remove private controls from interface file
- These private controls are added by driver clients
  in their respective modules

Change-Id: Ie8d3dbee73e481d3651a6d5849ae7859bf5d42b0
2023-05-30 11:07:12 -07:00
Mihir Ganu
ebf3410136 video: driver: Remove the unsupported ARGB32C format.
Remove the unsupported ARGB32C (RGBA8888 UBWC) pixel format.

Change-Id: Ia5ce610c4d3306b5f50f5132c9533bd9e86f0a6f
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-05-04 11:21:48 -07:00
Mihir Ganu
ed0cdf0c3f video: driver: Move private controls from UAPI
- Move vendor private controls from UAPI to internal headers.
- Add guards for AV1 format.

Change-Id: Ida6348aa393be26f0be1b18ed4e08477bdaabac0
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-04-21 15:05:33 -07:00
Akshata Sahukar
c46cdcb67f video: driver: Use HEIC as private codec type
Remove HEIC codec definition from UAPI and use it as private
codec type

Change-Id: I4023b638f56e9db11c74ae8894f8451ada05c6e8
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-04-07 10:50:54 -07:00
Mihir Ganu
b803968cf6 video: driver: Move private color definitions from UAPI
Move private color definitions from UAPI to driver internal header
file to reduce UAPI dependencies.

Change-Id: I667c3efc965fdc7b7dc1ad52e1b0bcf0c964e979
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-04-05 10:51:34 -07:00
Mihir Ganu
54c1508e60 video: driver: Remove metadata definitions from UAPI
Remove metadata definitions from UAPI.

Change-Id: I27c5474c5124a6d69d815f2277fc92b090e4011f
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2023-03-28 15:28:50 -07:00
qctecmdr
1fdfa4758c Merge "video: driver: add driver version" 2023-03-22 14:08:07 -07:00
Darshana Patil
fc6a238b09 video: driver: enable dynamic metadata
- enable Eva stats, hdr10/10+ as dynamic metadata.
- Make eva stats dependent on bitrate mode.
  Also remove preprocess and layer count as
  child of Eva stats.
- Make Hdr10/10+ dependent on profile.
- Adjust transcoding stats metadata based on
  bitrate mode, fps and resolution.

Change-Id: I7b110962e29db50cb321d69a0fb301950436da6f
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-03-21 11:53:10 -07:00
Maheshwar Ajja
ed089ff4e5 video: driver: add driver version
Add driver version for clients to query and manage
accordginly.

Change-Id: I5e8c51a4f18c28c0ed4d5a8bdaf0660d175c420a
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2023-03-20 11:01:58 -07:00
Deepa Guthyappa Madivalara
d2b9c98869 video: driver: replace V4l2 macros with availble upstream macros
- Replace prior macros from downstream driver as these are now
   defined in upstream V4l2 include files

Change-Id: I34dc063df0c2ca2194c115d310d7fe5026cd573e
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-03-17 11:57:07 -07:00
Deepa Guthyappa Madivalara
1cf504b165 video: driver: replace V4l2 macros with availble upstream macros
Replace prior macros from downstream driver as these are now
defined in upstream V4l2 include files

Change-Id: I7d1677cd7ef95c05219e043e0c78d29299036bed
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2023-03-13 16:18:38 -07:00
Darshana Patil
552670ad6b video: driver: encoder delay start: CSC
Introduce a control for client to enable or disable
csc. Disable csc for 10-bit encoding based on color format.

Change-Id: Ia49324332ce9b05b6f1a1283fa758638a8cc3ab8
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-03-07 15:12:53 -08:00
Akshata Sahukar
6a12b60609 video: driver: Add new metadata payload header flags
Add new metadata payload header flags to specify a particular
metadata is bitstream buffer oriented or raw buffer oriented.
This is required specially in decoder fence case where input
metadata done buffer will contain both input(bitstream)
buffer tag as well as output(raw) buffer tag.

Change-Id: I43c201c67639d8ab761971f2bc38fe9ec3e80b5f
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-02 13:45:31 -08:00
Darshana Patil
ed80204a9e video: driver: add support to configure colorinfo via control
- introduce control to set colorspace. client will use this
  to set private color info.

Change-Id: I0099ef1525f4562d3be3a6e518d046fe5b9ef894
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-02-06 13:09:17 -08:00
Darshana Patil
ea34534af0 video: driver: update copyright markings to 2023
update copyright markings to 2023 in all files.

Change-Id: I6842d56c4a8fff6a7a93d0c1d4bc049041297b02
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2023-01-13 14:58:17 -08:00
Govindaraj Rajagopal
e7fa6b0af9 video: driver: add early notify control interface
Added early notify feature related interfaces.

Change-Id: Ic67a769ff44e00aeb81f3771989c282127a3e36c
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-10-20 19:41:29 +05:30
qctecmdr
08b36416ce Merge "video: driver: modify slice delivery control as boolean control" 2022-09-22 17:43:50 -07:00
Akshata Sahukar
85d79a7a23 video: driver: remove input meta via request support
remove input meta via request support

Change-Id: If2a504455e1899c4cefb2a9142f7a92db02a45f2
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-09-20 11:07:39 -07:00
Dikshita Agarwal
9b32ff0498 video: driver: modify slice delivery control as boolean control
Update definition of slice delivery control in v4l2_vidc_extensions.h
to make it a boolean control instead of menu control and use it
accordingly.

Change-Id: I8ad5f5b7088bc01b78560cb40eae7c7d677ce7ce
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-09-12 14:11:16 +05:30
Dikshita Agarwal
90fabfb02b video: driver: remove support for V4L2_EVENT_VIDC_METADATA
remove support for V4L2_EVENT_VIDC_METADATA as it is not
being used.

Change-Id: Ia375d0410d144d2e3b9cd78bc0fde16cfa0d0884
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-08-22 16:50:50 -07:00
Darshana Patil
0b49e4ea40 video: driver: use standard EOS event
use standard EOS event instead of private
last flag event.

Change-Id: Iaeb2c57ceb80769de8cf94a63077eddf3710f871
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-08-16 10:07:52 -07:00
Gaviraju Doddabettahalli Bettegowda
9789b56a49 video: driver: add change to support slice mode decode
Added new capabilty changes to support slice based decoding.

This feature basically enables to decode the given input in terms of
slices and deliver single output to the higher layers when all slices
decoded in a frame.
When HW receives the slices then it will start decoding the slices,
instead of waiting for all the slices belongs to same frame.
So this will help to achieve lower decode latency.

Change-Id: Id107b34baba6d7b4a88238e232e8bf4a0fd6e58e
Signed-off-by: Gaviraju Doddabettahalli Bettegowda <quic_gdoddabe@quicinc.com>
2022-08-01 17:53:54 -07:00
Manikanta Kanamarlapudi
2e52eecb78 video: driver: add vui timing info control
Add vui timing info control with default
value as disabled in driver.

Change-Id: Ibaa45303fe389a0120d487fe3b6ff336e721f359
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
2022-08-01 17:21:57 -07:00
Darshana Patil
10794c2968 video: driver: initial state machine changes
- hierarchical state model which comprises of
  top level states and sub states
- top level states include OPEN, CLOSE, ERROR,
  INPUT_STREAMING, OUTPUT_STREAMING, STREAMING.
- sub states include DRAIN, DRC, DRAIN_LAST_BUFFER,
  DRC_LAST_BUFFER, INPUT_PAUSE, OUTPUT_PAUSE.
- follows deterministic approach for key sequences
  like DRC, DRAIN and last flag handling i.e none
  of these events are ignored or discarded.
- removal of auto start of firmware input port as
  part of ipsc handling.
- introduction of hfi commands for host controlled
  PAUSE and RESUME of firmware ports.
- introduction of information last flag packets
  for DRC and DRAIN when FW has insufficient
  output buffers.

Change-Id: Ie8c8f44af464d06f5a7bb76822f749c9874f869a
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-06-29 10:47:54 -07:00
Akshata Sahukar
1e7edf5b98 video: driver: buffer tracing changes
1. Introduce new v4l2 control to get HAL session id and
   print the same in driver to have unqiue session id
   between HAL and driver
2. Copy input buffer timestamp into input meta buffer
   to track input meta buffer done at HAL side. Required
   specially for fence use case.

Change-Id: I146b153fa0baea3b684a482de5da19e736df3736
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-06-22 16:41:08 -07:00
Zhongbo Shi
f781c619a9 video-driver: add to support DolbyVision metadata
1. add DolbyVision metadata cap and V4L2 id;
2. Increase decoder persist buffer size;
3. Increase decoder output meta buffer size;
4. Increase encoder input meta buffer size;
5. Parse buffer overflow flag and set buffer flag
   accordingly;

Change-Id: I8fa5e89068dd479033d28f627e585edc3a1c58bb
Signed-off-by: Zhongbo Shi <quic_zhongbos@quicinc.com>
2022-06-01 16:29:30 +08:00
Mahesh Kumar Sharma
8d0a217984 video: driver: enable transcode stat for decoder
Subscribe and enable HFI_PROP_TRANSCODING_STAT_INFO property
in order to enable transcoding stat for decoder.
This stat is used further by encoder to improve encoder quality
decision for transcode case.
Ideally we want to avoid CAC-BRS multiple times for same encoded bitstream.

When user does recording (1st encode), So we have CAC enabled bitstream.
Now, if user wants to send it via some app.
So, it will be decode -> (optional GPU) -> (2nd) encode

For 2nd encode -> we would like to not apply same CAC. It needs either tuning.
But we don't have a way from bitstream to know whether it went via CAC.

This feature enables to use the stat info received from decoder to fine tune encoding.

Change-Id: Iaf640878f5554b16aad3314ba4e26f99638c43af
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-05-18 19:27:42 -07:00
Vikash Garodia
e3da5c43e2 driver: video: Add critical priority and reserve duration
Critical priority - A video session which is prioritized above
all concurrent sessions. Such sessions have low latencies and
at the same time they cannot be rejected due to overload.
Reserve duration - Duration by which a session reserves the
video hardware for processing frames from that session.
Both the above aspects are implemented with these changes.

Change-Id: I58aef5f239e5ee106201d6819d2228784f0f0ad0
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2022-05-02 11:17:18 +05:30
qctecmdr
57b55c5c22 Merge "video: driver: Add support for slice encode delivery" 2022-04-29 15:44:27 -07:00
Chandrakant I Viraktamath
308499361d video: driver: Add support for slice encode delivery
Add support to enable slice encode delivery for
HEVC and AVC codec. Basically in this mode, each
encoded slice is given as a separate FBD to the client.

Change-Id: Ia30fde9abaf2b38fb486113807fbb7f19110225c
Signed-off-by: Chandrakant I Viraktamath <quic_civirakt@quicinc.com>
2022-04-29 22:18:06 +05:30
Darshana Patil
808cebd0b4 video: driver: introduce metadata size macro
introduce encode input and output metadata
size macro in the interface file.

Change-Id: I40776018c5c3278d40a426c2afde4d56e90066e2
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-04-28 14:36:19 -07:00
Akshata Sahukar
047ed11bf7 video: driver: add restrictions for dec fence enablement
- Allow dec sw fence enablement only if decode order is set and
 non interlace type session.
- Enable low latency mode if sw fence is enabled.
- Signal fence if FBD length > 0.

Change-Id: Ib59c2de51f621b796e68fe2aba68d9fca3ff4272
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-04-26 13:28:13 -07:00
Dikshita Agarwal
8f0e12cc93 video: driver: add support for cyclic intra refresh
Currently driver supports only random intra refresh, extend
it to support cyclic intra refresh too.
Cyclic intra refresh is supported dynamically as well.
- If intra refresh type is set and num of LCU’s to be refreshed
  are non-zero before session start, intra refresh will be enabled
  throughout the session.
  Any further dynamic settings in the number of LCU’s including 0
  will be honored accordingly.
- If intra refresh type is set and num of LCU’s to be refreshed are zero
  before session start, intra refresh will be disabled.
  When client sets it to non-zero value dynamically, driver will set
  HFI_PROP_REQUEST_SYNC_FRAME with
  HFI_SYNC_FRAME_REQUEST_WITH_PREFIX_SEQ_HDR.
  Driver needs to send HFI_PROP_REQUEST_SYNC_FRAME only at time of
  CIR Enable, no need to send at time of disable/enable again.

Change-Id: I10a2fb22d131353721ee658213ed807ce0794009
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
2022-04-01 11:08:19 +05:30
Akshata Sahukar
0abd877e95 video: driver: fix for fence support
- Add METADATA_PICTURE_TYPE support.
- some fixes for fence support.

Change-Id: Icd2285aa9fef57775122e9d2433f1e5d708ccdd3
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-03-31 16:43:00 -07:00
Dikshita Agarwal
f60ff0d92c video: driver: use custom v4l2 ctrls in place of S/G_PARM on decoder
Introduce new v4l2 controls to set frame rate and operating rate
on decoder as VIDIOC_S/G_PARM is not allowed on decoder.

fix: v4l2-compliance:S/G_PARM

Change-Id: I6c090c0ae541a086c73bb79564dd29ed4aa755b3
Signed-off-by: Dikshita Agarwal <quic_dikshita@quicinc.com>
Signed-off-by: Maheshwar Ajja <quic_majja@quicinc.com>
2022-03-29 11:45:17 -07:00
Manikanta Kanamarlapudi
ab51846ea0 video-driver: Add support for saliency metadata
Add support for saliency metadata control.

Change-Id: I6bfe54f58494a8189484bfbb3c2d989010fe3a2b
Signed-off-by: Manikanta Kanamarlapudi <quic_kmanikan@quicinc.com>
2022-03-24 23:35:33 +05:30
Akshata Sahukar
d85f112d92 video: driver: Enable bitwise operations for metadata controls
Enable bitwise operations for metadata controls with below
mentioned bit definitions:
- ENABLE (BIT 0): Enable metadata.
- TX_INP (BIT 1): Client transfers metadata in input port.
- TX_OUT (BIT 2): Client transfers metadata in output port.
- RX_INP (BIT 3): Client receives metadata in input port.
- RX_OUT (BIT 4): Client receives metadata in output port.

Change-Id: Ie3d720528a383632c7766a5ccb09cead0f6b9428
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-03-18 13:26:00 -07:00
Akshata Sahukar
22cc24de7f video: driver: Enhance fence support
- Introduce V4L2_EVENT_VIDC_METADATA to post fence fd returned in
  ETB metadata done buffer.
- V4L2_CID_MPEG_VIDC_SW_FENCE_FD g_ctrl support for client to get
  fence fd for requested fence id.
- Addition of fence delivery and subscribtion support.
- Fence property packetization to send to firmware via FTB buffer.

Change-Id: Ifb289849e352af2c4729aa95040bd83753979970
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-02-17 13:16:53 -08:00
Akshata Sahukar
0a5549a6a9 video: driver: decouple fence structure from video buffer
Decouple fence structure from video buffer. Also add some
misc fence flow setup support.

Change-Id: Ia4e223a3a288f0dae3238850685f3a73d4b9400a
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-02-14 09:46:11 -08:00
Darshana Patil
9978dc376e video: driver: add support to send input meta buffer via request
Client can enable V4L2_CID_MPEG_VIDC_INPUT_METADATA_VIA_REQUEST_ENABLE
control and send input metadata buffer via request.

Change-Id: Icccdada8253d1d0291c01e2e539968141f7ddd2c
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-02-04 13:47:34 -08:00
Darshana Patil
dce0ce7996 video: driver: add input metadata fd control
Added an extension to allow client to send
input metadata buffer fd via request api.

Change-Id: I8e05e53512b3f5dd31fa16ea64ee5d97ef2de7b4
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-01-28 13:14:31 -08:00
Mihir Ganu
85730716a8 video: driver: Add support for AV1 film grain
Add support to handle AV1 bitstreams with flim grain
for both UBWC and linear colorformats.

Change-Id: Ica07853d992c566c3471dc007ad8c22aba796dd4
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-01-18 12:43:59 -08:00
Govindaraj Rajagopal
1e55de3d4a video: driver: add support for timestamp reorder
Added support for timestamp reorder. It is default
disabled.

Change-Id: I51a6fc785860081b651fc67f443132cb2675b9fd
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-01-13 17:29:22 +05:30
Mihir Ganu
1b5a6b1d6f video: driver: Add support for AV1 dynamic frame resolution change
AV1 bitstream frames can have different resolutions than
sequence resolutions. Subscribe to BITSTREAM_RESOLUTION and
CROP_OFFSETS metadatas and exopose them to clients so that
clients can receive per-frame resolution and crop.

Change-Id: I7c0503f25ddde201979d13ff18028681f685d649
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2021-12-17 10:58:35 -08:00
Mahesh Kumar Sharma
2a7cf79509 video: driver: Add AV1 codec, profile and level in UAPI
Add AV1 codec, profile and level defintions and controls in UAPI.
Add these controls as private controls in video driver.

Change-Id: I58edec2d7fabceaa405708c99a75997c9f454022
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2021-11-30 15:01:05 -08:00
Mahesh Kumar Sharma
767c8ad13d video: driver: Fix dlkm compilation
1.) New dma_buf_vmap() returns SUCCESS or FAIL unlike legacy dma_buf_vmap()
    which return type is vmap address. dma_buf_vmap() takes two arguments now.
    Now it returns vmap address in pointer passed as second argument.
2.) If defined, use V4L2_CTRL_CLASS_CODEC else use V4L2_CTRL_CLASS_MPEG.
3.) iommu_dma_enable_best_fit_algo is commented temporary.
4.) remove subsystem_resart.h

Change-Id: I73c6a840fa6028f021debff33b88178ac74dcef9
Signed-off-by: Mahesh Kumar Sharma <smahesh@codeaurora.org>
2021-11-03 16:32:50 -07:00
Akshata Sahukar
4a0e4b65c2 video: driver: fix CTS V2 media DecoderColorAspectsTest color mismatch issue
Since ycbcr_enc is u8 member varible, 302 value exceeds its memory range
resulting in storage of incorrect matrix coefficents, and passing the same
to HAL. As a result, incorrect color space info is propagated to client
resulting into color mismatch issue and failing the CTS testcase.
Fixed this.

Change-Id: I66424c033bb4c4ad7d7528974a45a6a4b2740327
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-08-27 10:20:17 -07:00
Darshana Patil
05270719fb video: driver: add max num reorder frames support
add support for HFI_PROP_MAX_NUM_REORDER_FRAMES.
add ctrl for this metadata for avc and hevc.

Change-Id: I9a7b95f130e58f810255aff23e9b605304841072
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-08-09 11:39:57 -07:00
Akshata Sahukar
36a4971392 video: driver: Add enc vbr min quality restrictions
Do not support vbr min quality with below configs:
- HEVC 10bit
- Bitstream fps > 60
- ROI enabled/support
- HP encoding
- External Blur
- Resolution beyond 1080P.

Change-Id: I5e4a420abdd0c6fee4342c3c097684ef69bb0597
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-06-15 18:23:36 -07:00
Vikash Garodia
72699f7278 video: driver: Add encoder complexity to decide power mode
Client can choose to run an encode session to acheive maximum
performance rather than maximum quality.
Add the handling to configure video core accordingly for the
configured video session.
Such configuration is only applicable for non-realtime session.

Change-Id: Ife290b377c844e5b1d3be93b2509c787f8e05c59
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-06-10 05:43:00 -07:00