Commit Graph

1911 Commits

Author SHA1 Message Date
Herman Chen
7aacf22419 [rc]: Support fraction frame rate
Change-Id: I0b7d972bbc514d3868221428e6168c62c452cf56
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-13 10:53:41 +08:00
Herman Chen
dcb9642114 [mpp_enc_v2]: Add control process function
Move all control process code to a new function.

Change-Id: I7b536cc52fcc695ecdfbccd925b881db28acb4cf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-12 19:56:08 +08:00
Herman Chen
22aef2ccd3 [mpp_common]: Add container_of macro
Include <stddef.h> and add container_of macro.

Change-Id: Ie439b7683e026be9336e618c605b3b934e4fde38
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-12 15:53:18 +08:00
Herman Chen
512de40ff0 [h264e]: Add scaling list mode configuration
Change-Id: Icb4435060c76bc03472d22d6a13909ad4c60e88b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-11 17:27:46 +08:00
Herman Chen
fd6aef3a02 [mpp_meta]: Clear value on get_env failed
NOTE: s32 and s64 value can not be cleared to zero for it may have
initialized invalid value.

Change-Id: Iea9f36600b051584de34d8ac1782a897c64dcd2f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-11 17:06:49 +08:00
Herman Chen
45e2b89d5d [vepu541]: Add more log for debug
Change-Id: I91c1f9520bf11d9d87d0b09cbc6447ac57f02d47
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-10 14:27:44 +08:00
Herman Chen
6cee8bb11a [h264e]: Add slice split function
Slice split has two modes: split by byte and split by CTU number.

Change-Id: Id5a07f8a8cae612b6b913e9cb747dacec5b8e5a2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-07 15:32:29 +08:00
Herman Chen
73ec7df421 [vepu541]: Add 4K support using RegExtraInfo
Change-Id: I48919fa746e72ef2efbf5d4d30c8d4b589a3ce3a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-06 17:53:27 +08:00
Herman Chen
ce5e257e87 [hal_h264e_vepu541]: Add H.264E ROI and OSD
1. When ROI is enabled the qp_area_en should be always true to avoid
bug.
2. Use meta data to transmit ROI and OSD infomation to HAL.
3. Fix crash when roi is not set.

Change-Id: Ia40c139fcec5b334634c871cf12d7bb250d93b56
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-06 17:36:09 +08:00
Herman Chen
54b047e396 [cmake]: Add history log
1. Remove SVN version record.
2. CMakeLists will record max 10 git version.
3. Use mpp_show_history to control the history display.
4. Use strings libmpp.so | grep author to get history log from binary.

Change-Id: I5231ced4031d868fe1329488c914730dc91a3531
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-04 11:05:50 +08:00
Johnson Ding
14cae9c4ca [mpp_platform]: fix wrong device getting problem
For vepu2 on kernel-4.4, the device name should be "/dev/vepu" not
"/dev/vpu_service". This happens on RK3328.

Ref issue:
1. https://github.com/rockchip-linux/mpp/issues/125
2. https://github.com/HermanChen/mpp/issues/11

Change-Id: I830f6c5d4d45effb6faeeb3bbf4c2b5589b92d46
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-03-02 10:34:43 +08:00
Herman Chen
8b18624b88 [vepu541]: Add osd and osd_plt common config
1. OSD plt config will be sent to device directly.
2. OSD data config will be set by registers.

Change-Id: Ia38bc79ee1fa4d9f6bfafe65d9b2a8c8ff6d6c8c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-27 17:45:24 +08:00
Herman Chen
ce0d686e54 [misc]: Remove some rc log
Change-Id: I6c9f7f987795b5ee8d37df12e64b472b8b5d2596
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-27 17:44:19 +08:00
Herman Chen
52c93a4955 [utils]: Update iniparser
Change-Id: Id29dc65a732aa62f4614f1d602545c04e7de054b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-27 17:25:17 +08:00
sayon.chen
001b637afa [rc_v2]: Reorganize rc calc codec
1. Used mppclip instead of if else case
2. Cbr case increase fluc_l level to get more precise bps
3. Fix error on max_i_bit_prop is not set

Change-Id: I81ada0c7f66bac45f1093b3e0d8bec6ebf738231
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-27 16:47:40 +08:00
Herman Chen
3426222b95 [mpp]: Fix warning on buildroot
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I15b6cc0b04ad025d1def8a4836117eb2656a34d7
2020-02-27 15:37:42 +08:00
Herman Chen
95db60b3ad [cmake]: change build script for x86_64
Change-Id: I181d09afdd10eadbf78ba1e016990b606205e6eb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-27 15:37:42 +08:00
Herman Chen
9fd56bdd20 [vpue541]: Enable vepu541 H.264 encoder
Change-Id: Ica01cd69a75112c8a6aba62083d5ed55b9826e4b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-27 15:37:42 +08:00
Herman Chen
53f12e2ac9 [hal_vepu541_h264e]: Add vepu541 H.264 encoder
1. Set input format to non-AFBC mode.
2. Fix QP mode.
3. Add stride setup for YUV420P
4. Change ME setting to match C model.
5. Fix L2 AQ parameter error.
6. Set constraint_set0 to zero.
7. Align recn/refr fbc body to 8K.

Change-Id: If91ca22123420661be0941428b8bf145b7babef8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-27 15:37:42 +08:00
sayon.chen
9353b94f3b [h265e_syntax]: Fix slice tmvp flag no set
Change-Id: Id0402323eec15bbc6b52d220a8f48c232f51879c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-02-27 15:37:42 +08:00
Herman Chen
288bf1e5aa [mpp_dec]: Fix error on last empty eos frame
When last stream packet is send with eos flag but without valid task or
not output is set just output an empty eos frame.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I18a4ea004479820d4dcfe30aa75d935b15a188cf
2020-02-27 15:37:42 +08:00
sayon.chen
88b7bfd913 [hal_h265e]: Fix rkvenc config issue
1. fbc body must 4k align so set header len align 8k
2. fix tmvp me_cnst colmv load & store cfg
3. fix pp reg stride set err && add rgb2yuv param cfg
4. slice split in mbnum must minus 1
5. fix sao flag syntax no set

Change-Id: Ic2f73b5c18c2d41de50984df11334110724ecf5a
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-02-27 15:37:42 +08:00
sayon.chen
caee16c968 [h265e]: Add fixqp flow
Move fixqp mode from VBR+CQP to rc_mode FIXQP.

Change-Id: Ia29471ecd81bb1a4759f6e6f1d7e37515341eb8c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-27 15:37:42 +08:00
sayon.chen
9b1242436c [hal_h265e]: Used vepu541 common interface
Change-Id: I7b1634a253215a5a419c4bdd1131850b5f22c5c2
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-02-25 10:28:54 +08:00
sayon.chen
a813a3ca04 [rkv_h265e]: Move dpb buf alloc to hal
Change-Id: Id467803c5ceb280476b64efe0f18132a87049976
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-02-25 10:20:42 +08:00
sayon.chen
66870125f4 [h265e_ps]: Fix sps set error
pic_with & pic_height no 8 align set error

Change-Id: Ibf041c0a6ed20eea35a379eac8fb0998b7a3670d
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-02-25 10:20:42 +08:00
Ding Wei
d5a653112f [mpp_device]: change mpp_ioctl cmd
merge xx_SET_REG_xx  to XX_SET_REG_WRITE
change MPP_CMD_GET_REG to MPP_CMD_SET_REG_READ

NOTE: extra info is different on new ioctl case.

1. Move all extra info process into mpp_device_patch function.
2. Old ioctl should send regs with max size of vepu and vdpu. But new
ioctl need only the correct size of register file.

Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8164fc8d4c85f493c52cc7cd12d8717ca5d35637
2020-02-25 10:20:33 +08:00
Herman Chen
e04f0e83e7 [mpp_platform]: Improve ioctl version detection
Move kernel ioctl api version detection to library loading stage.

Change-Id: If8ee750e1eaefb99924fd622d03270ef5032d1be
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-25 09:35:00 +08:00
sayon.chen
2c7148f110 [meta]: Add MV_LIST meta for smartp
Change-Id: I7960eadef22220a4a895b88d8b09895f07e4d694
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-02-24 14:17:34 +08:00
sayon.chen
862b0d8936 [rc]: Fixed drop frame issue
first frame must init in_real-out_inter

Change-Id: I606b74f4887a0ab52e8ed99b1c1a3510df357890
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-02-21 11:22:48 +08:00
sayon.chen
a79d086084 [vepu541_common]: Fix rgb888 color swap issue
Change-Id: I6c6b32f59810913337de53a578cb72532aebe53c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-02-21 11:21:57 +08:00
Herman Chen
39a50a9423 [syntax]: Add OSD_PLT syntax
Change-Id: I2c9ba6774f4d652e355274d6f5348ce4cd042c1b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-20 11:33:25 +08:00
Ding Wei
c5a9228e4b [mpp_platform]: Add RV1109 and RV1126 detection
Change-Id: I7281f4284891cf3ba9ebf24a2ff025827d4a0a2b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-02-20 11:33:25 +08:00
Ding Wei
f7ddf931c2 [utils]: Add more format support
Change-Id: I93f380f157806b8885559834b94b348bba87ff12
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-02-20 11:33:25 +08:00
Herman Chen
0b39c32d7c [hal_vepu541]: Add vepu541 H.264 encoder L2 regs
L2 register can only be accessed by L2CFG_ADDR in L1 register set.

Change-Id: Ib1cab1bdf9443ee79a920d27700f88bb01d0a5b4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-20 11:33:25 +08:00
Herman Chen
98ecb5c547 [hal_vepu541]: Add vepu541 H.264 encoder registers
Change-Id: If1948c8515870c08a83cab2a72b478e7384d3549
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-20 11:33:25 +08:00
Herman Chen
e458da9e94 [hal_vepu541_common]: Add vepu541 common function
1. Add hardware pixel format support function.
2. Add roi region config function.

Change-Id: I011c0c820d6705cf923cccf75aa1f84ee74e2f4b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-14 16:19:16 +08:00
Herman Chen
16e7f330f2 [dec_vproc]: Fix vproc stuck issue on reset
Use semaphore to sync the reset operation.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7440530a779a7fd5c394e93b30f9addbaf4044d0
2020-01-19 18:02:52 +08:00
Herman Chen
9f3ac0e7dd [mpp_frame]: Add more color format
Change-Id: Ibf66d81887addec859fb986382c8f1ae1a1dafe8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-01-19 18:02:52 +08:00
Herman Chen
9ce259355a [mpp_frame]: Add format check macro
Change-Id: I0b84cd55951dd5c085b1dd8b9926c4308ac24371
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-01-19 18:02:52 +08:00
sayon.chen
9835a6d37e [h265e_api]: Clear change flag after proc & support tsvc
Change-Id: I1c9860588b6aa7f043f19f00c9ee212820d6f77a
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-01-19 18:02:52 +08:00
Herman Chen
41f4e303fb [hal_task]: Fix typo
Change-Id: I7e2138fdc8f9e1dcb4d90060fce0a8cf22aece84
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-01-19 18:02:52 +08:00
Herman Chen
8a47dc9742 [hal_common]: Enable hal common module
Change-Id: I2110295a7a3c947e987706bda1402b695924a96a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-01-19 18:02:52 +08:00
Herman Chen
a1c2350f30 [hal_common]: Add hal common module
1. Add hal buffer set allocator for different hardware recon frame.

Change-Id: Ife976f2edf9a5bf1735790a4929f75d488a1f4ee
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-01-19 18:02:52 +08:00
sayon.chen
313156e18b [h265e]: Fix compile warn & fixqp case not do rc flow path
Change-Id: If79c21a716f4f36b83a10de97b4b3bb00e6585f2
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-01-08 15:19:08 +08:00
Zhou Jing
34f7e67400 [legacy]: Fix put_frame stuck issue
The put_frame thread will be hold on when get_stream thread
doesn't work anymore. Setting timeout in order to ensure that
it doesn't get stuck.

Change-Id: I907f2f5ea0e627d2d0d72ffd7d274ffacf82deba
Signed-off-by: Zhou Jing <tracy.zhou@rock-chips.com>
2020-01-08 11:22:07 +08:00
sayon.chen
5380307bcc [rkv_h265e]: Move rc qp calc from api to hal
Change-Id: I8d64c97d3be4828feabb10fbe9077ac9a125b229
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-01-07 09:56:16 +08:00
sayon.chen
d39238c871 [h265e]: Add row_dealt_qp set for rkvenc mbrc
Change-Id: Ib0cd342f7b2c2060871d5f540f08b37574c89e31
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-01-07 09:55:20 +08:00
Johnson Ding
636f64e73a [mpp_device]: Fix log print typo
This will leads to hal init failed in kernel 4.19

Change-Id: I8f5ff682a9681a5cd767bb8b140c4f46e0416ff2
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-01-03 16:10:05 +08:00
sayon.chen
6630d7f221 [h265e_rkv_hal]: According to rxbb rename regs
Change-Id: I0ad9ba60a49989e204a0f4f4b68e0c19f6e892d2
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-01-03 15:50:43 +08:00