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>
Acquire client and inst lock for s_ctrl and g_volatile_ctrl
Change-Id: I97341b69ea5390133c46711c38be51326c80b224
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>
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>
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>
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>
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>
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>
Use instanace instead of inst to resolve the load calculation error
Change-Id: Id346b6222f7c00e741ba8bfecf7100cfb4a90041
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
In __interface_queues_init() api somtimes map() call is failing.
Map failure scenario we were not freeing allocated memory. So
added change to cleanup allocated memory incase of map failure
scenario.
Change-Id: I04b196e55a5f080a4ec973aa166f7e1b6525a58c
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
- 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>
crop width and height should be calculated using
left and top as references.
Change-Id: I463cdc9557dab3ae7200cb6aaf60fce399571d30
Signed-off-by: Darshana Patil <darshana@quicinc.com>
- Enable ROI for VBR, CBR_CFR, CBR_CFR bitrate modes.
- Disable ROI feature, when rotation, downscaling/scaling
enable,
- Disable adaptive blur, when ROI feature is enable.
Change-Id: If645a255bca93b90fe5cee5a735d7ffcd2a6bc5c
Signed-off-by: Roopangkumar Patel <quic_rooppate@quicinc.com>
1. adjust client set non-realtime priroty with NRT_PRIORITY_OFFSET (2)
2. if total mbps is more than max_mbps
a. allow encode session by reducing decoder sessions priority by 1
b. allow decode session by moving it to non-realtime session
in order to not disturb the ongoing sessions
Change-Id: I96fd2ac75c123d681982fb9a2c06ac51d15bd59a
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
adding comments to avoid changes in kernel space
logs that are used by post processing scripts
Change-Id: I66ee9743866d12c740c3791b92534eaf7601436d
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
adding kernel space logs used by post processing
scripts as macros to avoid changes in them.
Change-Id: Iea0fb0514c134767f063902ff98fd756898ef7c4
Signed-off-by: Deepa Guthyappa Madivalara <quic_dmadival@quicinc.com>
Divided database entries into 2 parts
[1] struct msm_platform_inst_capability -> it tracks cap_id,
domain, codec, min, max, step, default, v4l2_id, hfi_id, flags.
[2] struct msm_platform_inst_cap_dependency -> this will track
cap_id, domain, codec, parents, childrens, adjust and set
callbacks.
It will help to reduce number of database entries.
Change-Id: I692968b0f6804b45371e8cf4af6407e57df54bb9
Signed-off-by: Govindaraj Rajagopal <quic_grajagop@quicinc.com>
when create_bufs ioctl is called for meta port, v4l2
framework calls queue_setup with num_planes as 1.
fixed the num_planes condition by updating it for only
input and output ports.
removed a condition to check if client has set unsupported
bits for metadata controls.
Change-Id: I0faf2cfc2827af7d3992bda63a04d4203f13c9e1
Signed-off-by: Darshana Patil <quic_darshana@quicinc.com>