Commit grafiek

32 Commits

Auteur SHA1 Bericht Datum
Akshata Sahukar
fb2e2c5715 video: driver: Align hfi files to pick ring buffer changes
Align hfi property and memory file to pick interface changes
for encoder ring buffer support

Change-Id: Icde4cdffe5275d416c51c36e562bb832027b0fa1
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-07 17:13:09 -08:00
Akshata Sahukar
2b974f7ad0 video: driver: Align hfi files to pick synx fence changes
Align hfi property and registers file with to pick synx fence
related interface changes

Change-Id: I19e5cce4d67f2f1eeacf917f9e688d2bb20f6585
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2023-03-03 16:59:49 -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
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
Mihir Ganu
1e87ceec2b video: driver: Introduce a property to set COMV bufcount
Certain codecs/use cases require larger COMV buffer sizes to achieve
performance. Introduce a property to set COMV bufcount and calculate
COMV buffer size based on the bufcount.

Change-Id: Ib0ed8afe77708dc453cbcc121bcd8606db637152
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-08-01 17:19:20 -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
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
qctecmdr
5dc3050cce Merge "video-driver: Add support for subframe_input" 2022-05-27 13:07:50 -07:00
Vedang Nagar
078aebf73a video-driver: Add support for subframe_input
Add support for 'HFI_PROP_SUBFRAME_INPUT'.
Payload '1' indicates that input buffer is
processed. However, FW expects more inputs
to construct a full YUV output buffer.
Overloading 'MSM_VIDC_BUF_FLAG_ERROR' code to
ensure HAL work completion

Change-Id: I05b24a50e587dfd96457af508267843ac3840fbf
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2022-05-26 20:36:45 +05:30
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
Mihir Ganu
2de81c4c69 video: driver: Configure UBWC stride/scanlines for AV1D
Set stride/scanline (in bytes) for UBWC color formats.
This is required to keep fixed stride/scanline during
in-sequence frame resolution changes in AV1 bitstreams.
Driver sets this property before resume/start.

Change-Id: I40526793cee36ad110f40e6ce110cda8070864d7
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-05-03 13:48:45 -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
Mahesh Kumar Sharma
508f4a0282 video: driver: inline preprocessing improvement
For VPSS, FW requests more bandwidth from HW.
In order to support inline processing, FW introduced
request preprcess property.

Enble this property only when following conditions are met:
- CAC-BRS is required
- don't have EVA stats.
- Upto 4k@60 fps, max( frame rate, operating rate) <= 60

Change-Id: I3cf83483d9320e5dfe20617b37a54b9d5fbcffd8
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-04-08 18:52:52 -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
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
71f8dcf2f2 video: driver: Align hfi property file with CL: 35116137
Align driver hfi property file with fw file of CL: 35116137

Change-Id: Ic5abbb9212b664b55f16afa4c79e00fb0d76ae89
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-02-10 15:01:22 -08:00
Mihir Ganu
9bacc5d124 video: driver: Add HFI and internal buffer changes for AV1 DRAP
Add changes for AV1 DRAP (Delayed Random Access Point) handling:
1) Add config in kalama database to control DRAP and the HFI property
to set DRAP config.
2) Update buffer calculations:
- When DRAP is disabled, COMV buffer must be allocated
and PERSIST buffer must be allocated with total_ref_count = 0
- When DRAP is enabled, COMV buffer must not be allocated -
it is part of PERSIST buffer. Persist buffer must be allocated with
the max_width, max_height and total_ref_count configured for DRAP.

Change-Id: I2d2e8fd3f63ea8f9fc2845acd0b4e16ba4776a6b
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-02-01 15:32:01 -08:00
Mihir Ganu
1c5f469b71 video: driver: Add HFI changes for AV1 Decoder
Add the required codec properties and HFI definitions to enable AV1D.

Change-Id: Ib098ed17f8b8e1fe9403f966a2dab97a3c9f96de
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2021-12-02 12:44:12 -08:00
Govindaraj Rajagopal
f05007686d video: driver: add support for main10StillPic profile
Added support for V4L2_MPEG_VIDEO_HEVC_PROFILE_MAIN_10_STILL_PICTURE.
It willbe used in 10bit image encoding usecases.

Change-Id: I14877547f1f4792eefb0ea6bcecf2643627c125a
Signed-off-by: Govindaraj Rajagopal <grajagop@codeaurora.org>
2021-05-06 22:09:25 +05:30
Vikash Garodia
0017afac21 video: driver: Add handling for session priority
Following changes are added with this:
1. Handle and adjust session priority.
2. Session addmission based on priority.
3. Power (clock and bus) scaling based on priority.
4. Handle s_parm influence on priority.

Change-Id: I12dec5fb03d733f07b0b0a24b4d74d1ccd4bf791
Signed-off-by: Vikash Garodia <vgarodia@codeaurora.org>
2021-03-29 22:47:28 +05:30
Akshata Sahukar
660008370e video: driver: Add NAL length based encoding
Add support to set HFI_PROP_NAL_LENGTH_FIELD property to
video firmware.

Change-Id: I20db36bad394fe0b5163a156199340836af3f740
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-03-03 11:43:00 -08:00
Darshana Patil
481a6117d8 video: driver: update license year
update license year to 2020-2021

Change-Id: I5a67bf49c386e86337bc7449ded08d186fc9a280
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2021-03-01 18:07:35 -08:00
Akshata Sahukar
17addfbc6d video: driver: add support to few properties
Add support to below properties
- HFI_PROP_MULTI_SLICE_BYTES_COUNT
- HFI_PROP_MULTI_SLICE_MB_COUNT
- HFI_PROP_CHROMA_QP_OFFSET
- HFI_PROP_REQUEST_SYNC_FRAME

Change-Id: I4cc62870756d058e7a7b15290f5d6797b3be243c
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-02-24 12:06:26 -08:00
Akshata Sahukar
f5a9db9667 video: driver: Add NV12 related support for enc
Add support to set HFI_PROP_LINEAR_STRIDE_SCANLINE
property to video fw.

Change-Id: I0ce3549a472388a5d2471bf4c8978a5a5f524a34
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2021-02-03 19:07:45 -08:00
Maheshwar Ajja
1a9d8e71ba video: driver: amend internal buffer size calculations
Utilize new HFI header to calculate internal buffer sizes.

Change-Id: I0f9e105da4cd346ed377f24b0823152f88150aa4
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
2020-12-29 14:54:58 -08:00
Akshata Sahukar
c5f9b0d800 video: driver: update hfi driver files based on FW#7 (p4 CL# 27761469)
update hfi_property.h and hfi_command.h files to align
with firmware hfi_lx_prop_v1.0_doc.h and hfi_lx_cmd_v1.0_doc.h
files respectively.

Change-Id: Id1e01fab0d40040075987d5b745a2d9ade4cd3a1
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2020-12-21 11:45:04 -08:00
Akshata Sahukar
38b9dd655f video: driver: enc fix to run sample HEVC NV12C testcase
Allocate ARP buffer in CB4 to avoid HW hang issue.
Add support to set HFI_PROP_RAW_RESOLUTION at enc INPUT port
and did necessary changes to set HFI_PROP_CROP_OFFSETS at
OUTPUT port only for encoder. Also added support to set
missing basic control properties to video firmware.

Change-Id: If5bc2940d37ac20c1889cd4de466be09f1e1f28b
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2020-12-18 19:20:27 -08:00
Akshata Sahukar
bdc2de6c93 video: driver: fixes to get enc start/stop working
below are the fixes added to get enc start/stop working
along with setting default values to firmware for basic
functionality controls.
  - Create and queue COMV and NON COMV internal buffers
  - Use HFI_PAYLOAD_64_PACKED as payload_info type instead
    of HFI_PAYLOAD_32_PACKED HFI_PROP_CROP_OFFSETS
  - Introduce new control port specifier flags in instance
    database to help set correct port to controls while
    packetization
  - Add support to map basic functionality controls
    v4l2 enum values to hfi enum values
  - Enable static adjust and set controls support

Change-Id: Idc0dc3e3d07d8f6349c74136327a45d77ced1035
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2020-12-09 16:21:34 -08:00
Darshana Patil
9b4556df59 driver: video: port settings changes
updated hfi command, property header files.
deleted hfi definition header file.
added new input and output properties for decoder.
added profile, level and tier properties as part of
port settings subscription.

Change-Id: I072d0bb56183950920975950b3873003218d526e
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2020-11-02 14:23:16 -08:00
Akshata Sahukar
10e2017aa8 video: driver: update instance database with controls
Update instance database with v4l2 controls.

Change-Id: I0715edfcbf46a82c8e2f67ec298185e2cf4eb5d0
Signed-off-by: Akshata Sahukar <asahukar@codeaurora.org>
2020-11-02 14:22:45 -08:00
Darshana Patil
4b08bf5e4d msm: vidc: initial hfi packetization changes
Initial HFI packetization changes.

Change-Id: If09b93acf6aef55acc32b03b369989896d59f5e8
Signed-off-by: Darshana Patil <darshana@codeaurora.org>
2020-09-30 14:06:52 -07:00