Gráfico de commits

981 Commits

Autor SHA1 Mensaje Fecha
Deepa Guthyappa Madivalara
ea5082d827 video: driver: fix for initial input_rate calculation
1. do not update input_rate until 30 inputs are
   received.
2. Fixes unwated downgrade from RT to NRT in UHD cases

Change-Id: I8d38a64829b44a0e335b69329ac5279a7b8a782d
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-06-08 16:05:08 -07:00
qctecmdr
b820a1314e Merge "video: driver: Add missing capabilites" 2022-06-06 12:42:38 -07:00
Vedang Nagar
cbfbff897a video: driver: Add missing capabilites
Add mising capabilites in msm_vidc_waipio.c
for the changes done in msm_vidc_kalama.c

Change-Id: Idc75533162c977333efb4caec992ee13408ce422
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2022-06-06 14:21:27 +05:30
Mihir Ganu
84e39edbcf video: driver: Adjust bandwidth votes for AV1 film grain
For AV1 bitstreams with film grain, split mode is used for
UBWC colorformats as well. Consider split mode to calculate
bandwidth votes.

Change-Id: I98bf07b8be7f0e829af5e55ed6d0c3659ae099f2
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-06-03 14:42:20 -07:00
Mihir Ganu
ec484c856b video: driver: Optimize HEVC Bin buffer allocation
Optimize HEVC Bin buffer allocation by allocating 25% additional
bitstream buffer size for 10 bit HEVC usecase and avoiding the
extra memory allocation for 8 bit usecases.

Change-Id: Iebbedf43e80fad852807349cbe7f70cf7a632a73
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-06-02 10:59:49 -07:00
qctecmdr
12c5ef4768 Merge "video-driver: add to support DolbyVision metadata" 2022-06-01 23:48:24 -07:00
qctecmdr
395e8686ec Merge "video: driver: Use max bitrate depending upon session" 2022-06-01 21:40:44 -07:00
Deepa Guthyappa Madivalara
0160053f46 video: driver: Use max bitrate depending upon session
1. Host will use HQ quality mode for all INTRA encoding case
2. Cap bitarate and bit rate boost to max bitrate of current
   session config

Change-Id: I8e8d19998ebeff992c290fbd18c072b2b93ffef2
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-06-01 11:36:14 -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
9ee0638b20 Merge "video: driver: fix slice mode support" 2022-05-31 19:39:44 -07:00
Akshata Sahukar
5713e9a303 video: driver: fix slice mode support
Allow client to set slice mode control to slice off for
HEIC codec.

Change-Id: Iffc8be23990a5dad451550cccb8236cc32951b2a
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-05-31 14:36:04 -07:00
Darshana Patil
e39962d028 video: driver: introduce lock for set & get volatile controls
Acquire client and inst lock for s_ctrl and g_volatile_ctrl

Change-Id: I97341b69ea5390133c46711c38be51326c80b224
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-05-31 11:20:03 -07:00
Akshata Sahukar
93742170e9 video: driver: fix incorrect crop resolution
Store unaligned resolution in driver inst formats
to avoid crop resolution getting updated to aligned
resolution whenever client did g_fmt and s_fmt again
after setting raw input resolution.

Change-Id: Ic2b6cf6e7d418d2bf0c35270199b914648e933d4
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-05-27 16:44:02 -07:00
qctecmdr
5dc3050cce Merge "video-driver: Add support for subframe_input" 2022-05-27 13:07:50 -07:00
qctecmdr
80ff8d2af2 Merge "video: driver: enable transcode stat for decoder" 2022-05-27 00:44:21 -07:00
qctecmdr
ccb76eb0e9 Merge "video: driver: Use vzalloc instead of kzalloc" 2022-05-26 19:19:15 -07:00
qctecmdr
5689776c4e Merge "video: driver: introduce client lock" 2022-05-26 18:57:44 -07:00
qctecmdr
ae681247a3 Merge "driver: video: Remove calls to power features during priority handling" 2022-05-26 16:19:46 -07:00
qctecmdr
54c511cf4b Merge "video: driver: Optimize encoder bin buffer size" 2022-05-26 16:19:46 -07:00
Deepa Guthyappa Madivalara
13d203ba7f video: driver: Use vzalloc instead of kzalloc
kzalloc might fail to allocate physically contiguous
memory which may not be available always and hence use
vzalloc to allocate virtually contiguous memory

Change-Id: I8ad89ef107da301217f3d1ec307b9b27b4edd2de
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-05-26 15:25:26 -07:00
Darshana Patil
2a687b2750 video: driver: introduce client lock
Acquire client lock for every entry point
in driver. This is needed especially for
streamoff and close calls where inst lock
is released while driver is waiting for
stop_done and close_done responses from fw.
When inst lock is released, client can send
a new ioctl call and driver state machine
can get updated leading to unexpected behaviour.

Change-Id: Ibb62c3431c88e2f1d9088d54fe7c9e53b1c284fd
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-05-26 14:34:36 -07:00
qctecmdr
e95d1dcf89 Merge "video: driver: Create and use single spin lock for dma fence" 2022-05-26 09:47:25 -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
qctecmdr
d62a682a12 Merge "video: driver: Fix realtime load calculation" 2022-05-25 20:43:58 -07:00
Mihir Ganu
444e7763ee video: driver: Optimize encoder bin buffer size
Reduce bin buffer size to detect buffer overflows in first
stage, which allows frame to be re-encoded with a different QP.

Change-Id: Ifaa5f744491ba35ceee164afeae7d9de90f81e18
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-05-25 16:30:18 -07:00
Vikash Garodia
5589b67cb5 driver: video: Remove calls to power features during priority handling
While priority interface is set by V4L2 clients, tuning power features
is not needed. The same is done when stream on is called.

Change-Id: I931bbf72e5234ca552cdef984f05a2942ebc3442
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2022-05-23 09:44:20 -07:00
Deepa Guthyappa Madivalara
e6a87ed4fe video: driver: Fix realtime load calculation
Use instanace instead of inst to resolve the load calculation error

Change-Id: Id346b6222f7c00e741ba8bfecf7100cfb4a90041
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-05-22 12:07:29 -07:00
qctecmdr
6756aa4f73 Merge "video: driver: Add Complexity vs. Operating Rate handling" 2022-05-20 01:51:29 -07:00
Vedang Nagar
dd262f5916 video: driver: Add Complexity vs. Operating Rate handling
For Quality mode decision, Complexity and Operating rate
are handled as below -
[1] If Complexity and operating rate both are set,
    then for NRT, complexity is honored, and operating
    rate can be adjusted. But for RT, Operating Rate is
    honored and complexity can be adjusted.
[2] If only Complexity is set, then complexity is honored.
[3] If only Operating rate set then Operating rate is honored
[4] If None set, then upto encoder to decide

Change-Id: Ib8008551d5ee7a9506f4d1586ed7a3ae967ac54b
Signed-off-by: Vedang Nagar <quic_vnagar@quicinc.com>
2022-05-19 23:02:11 +05:30
Deepa Guthyappa Madivalara
52c0799bf7 video: driver: support upto level 6.2 for AVC and HEVC dec
allow support upto level 6.2 for AVC/HEVC decoder

Change-Id: I5579b5fa7f41fbe98c9e6998d4362542423cbd18
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-05-18 22:10:08 -07: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
Akshata Sahukar
3964fa9159 video: driver: Create and use single spin lock for dma fence
Create and use single spin lock per session (per fence context)
rather than creating spin locks per dma fence to possibly
resolve flickering in video playback.

Change-Id: I01286ae375dfedc0da26a1be4ded1bd1e02767ba
Signed-off-by: Akshata Sahukar <asahukar@quicinc.com>
2022-05-18 14:23:17 -07:00
Mihir Ganu
094b4c057c video: driver: Increase vpp cycles for specific AV1 content
AV1 bitstreams can be encoded with non-recommended tile settings
which reduce pipe efficiency when 128x128 superblocks are used.
Increase vpp cycles when 128x128 superblocks are detected.

Change-Id: I14b42363fe36116144e2a2a4bbf67cd9cc26632b
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-05-18 10:33:28 -07:00
qctecmdr
5b6a6bc3c8 Merge "video: driver: Subscribe to color info for AV1" 2022-05-17 16:39:56 -07:00
qctecmdr
91781e4fa0 Merge "video: driver: keep default complexity as 50" 2022-05-14 23:23:29 -07:00
Mihir Ganu
888ecb9f1b video: driver: Subscribe to color info for AV1
Subscribe to HFI_PROP_SIGNAL_COLOR_INFO to receive
color info from bitstream AV1 bitstreams.

Change-Id: I3c76bc651160b701078bd73725f7060388ad9125
Signed-off-by: Mihir Ganu <quic_mganu@quicinc.com>
2022-05-13 08:00:01 -07:00
Vikash Garodia
5a7898589e video: driver: keep default complexity as 50
Complexity parameter defines the encoding tools used
during an encode session. Higher the complexity implies
more quality with advance encoding tools used.
Keeping the default value as moderate or acceptable
range.

Change-Id: I3ee66d3a6612d5d60cd63a0698a4248f48ee8e2d
Signed-off-by: Vikash Garodia <quic_vgarodia@quicinc.com>
2022-05-13 09:55:40 +05:30
Akshata Sahukar
96a1693ba4 video: driver: Acquire lock for fence fd creation
Acquire lock for fence fd creation to avoid sync_file_poll
race conditions in fence enabled case.

Change-Id: Icb45550cd6d2018112e99d886aedd98ac3922a2c
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-05-12 15:34:28 -07:00
Darshana Patil
2f361417ab video: driver: input metadata buffer size changes
use default 16kb as input metadata buffer size.
Amend buffer size if ROi metadata is enabled.

Change-Id: I7b07c432dcf27f83096f07be03537f02db9114dd
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
2022-05-11 12:39:22 -07:00
Deepa Guthyappa Madivalara
0b5a5e71fc video: driver: fix uinitalized variables
Intitalize variables to address warnings

Change-Id: Id211e49e5055839b34950f6075e034aa74f4ae0c
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
2022-05-09 14:57:16 -07:00
Govindaraj Rajagopal
701b2a4c58 video: driver: fix fd leak issue
if msm_vidc_memory_map() call fails then, we are not
decrementing dma_buf refcount immediately and entry
still stays in mappings list. So backed fd willnot be
reusable for the entire session and gets cleaned up
only during msm_vidc_close(). This issue mostly occur
for encode session. Added change to cleanup dma_buf
refcount immediately at the time of issue.

Change-Id: I48b4ffaa9d329ef14ef59c5c016a6dd04f705b7a
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
2022-05-04 18:14:40 +05:30
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
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
Akshata Sahukar
91f3bc9ab7 video: driver: fix invalid output buffer tag receipt in fence usecase
When fence is enabled, output buffer tag is sent to fw via
output metadata buffer. Since fw relies on bytesused field of
output metadata buffer to invalidate cache and perform read operation,
output metadata buffer's filled length cannot be zero.
Hence set valid size for bytesused field to fix this issue.

Change-Id: I7bd87ec49508402d2d654095f06e75992771c39d
Signed-off-by: Akshata Sahukar <quic_asahukar@quicinc.com>
2022-04-29 20:00:28 -07:00
qctecmdr
57b55c5c22 Merge "video: driver: Add support for slice encode delivery" 2022-04-29 15:44:27 -07:00
qctecmdr
cf5a48074b Merge "video: driver: introduce metadata size macro" 2022-04-29 13:19:19 -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
a079cc43f3 video: driver: preprocessing pass required additional cycles and bw
Encoder preprocessing feature requires additional cycles
and bw to support this feature if it is enabled.

Change-Id: I46de42dd0cb0d5a7cd9fdf00beeaefd50e40798e
Signed-off-by: Mahesh Kumar Sharma <quic_smahesh@quicinc.com>
2022-04-28 17:02:55 -07:00
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
qctecmdr
c39eec6e2e Merge "video: driver: superframe metabuffer fix" 2022-04-28 10:01:42 -07:00