Commit Graph

2062 Commits

Author SHA1 Message Date
Jeffy Chen
017e159b80 debian: Remove static libs
The static libs are not supported anymore.

Change-Id: I0dafae089f0e14d92d6dbe341cbb56d2344bb84b
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2020-07-15 17:01:51 +08:00
Jeffy Chen
80c45ad9c3 debian/rules: Only use dpkg-cross when cross compiling
Change-Id: Iaaae0f3036bda5df68d715b2accb9b548418cb3f
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2020-07-15 17:01:51 +08:00
zyr
b231d085f4 [rga]: fix bug of rga rgb2yuv
Merge from pull request: https://github.com/rockchip-linux/mpp/pull/149

Signed-off-by: zyr <zyr_zyr_@sohu.com>
Change-Id: Ic66554dd9dd80faff77084567efd9f9a9142713f
2020-07-15 14:45:45 +08:00
Herman Chen
2ebcd99d6a [h264e]: Fix slice / dpb operation errors
1. long-term reference flag in IDR frame should be clear at next frame.
   Otherwise multi-slice operation will be error.
2. The max long-term reference index is reset to zero at IDR. So the new
   sequence must redefine its own value again.
3. The end bits of prefix nal should be flushed.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia9ba01719861401c2ca95ded3ccfc537c3b10083
2020-07-15 14:13:50 +08:00
Herman Chen
337e917d5f [h264e_slice]: Fix slice amend and prefix nal
1. Fix loop length error on copy.
2. Change prefix nal format do not write more bit on zero nal_ref_idc.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8aae36926dcd8dc73701c735396ae418db4f032f
2020-07-08 17:58:59 +08:00
Herman Chen
f654f1a0ad [rk_venc_cmd]: Change h264 codec cfg
1. Remove slice mode/arg in H.264 codec cfg.
2. Add max long-term reference number / max temporal layer id / prefix
mode / base layer priority id.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If34166e4658edba65f4c6c095412a6fadd941320
2020-07-08 16:32:33 +08:00
Herman Chen
7f4ebeec8e [meta]: Add more meta key for encoder
1. Add KEY_ENC_MARK_LTR for marking current frame to be long-term
referece frame.
2. Add KEY_ENC_USE_LTR for assigning a long-term reference frame as
current frame's reference frame.
3. Add KEY_ENC_FRAME_QP for assigning a fix QP for current frame.
4. Add KEY_ENC_BASE_LAYER_PID for assining a priority id for base layer
in tsvc mode.

All these four features are defined in MLVEC test.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib041d9c2f203d7e582a3402bd61dd6a9eb18015a
2020-07-08 15:41:23 +08:00
Herman Chen
4397cb30ca [astyle]: Do NOT change drm.h coding style
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic70f3533b6a04d7c5f7e89c385e542f63150db08
2020-07-08 15:41:23 +08:00
Herman Chen
d710e2611b [h264e_slice]: Fix slice update error
1. Fix nal_ref_idc update error for using slice->is_idr.
2. Fix slice write error on poc_type is 2.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib315818c2024fdf028a4863977154e9d7beeb8f5
2020-07-08 14:10:53 +08:00
Herman Chen
66cfc048e4 [mpp_enc_refs]: Save extra st ref frame to cpb
When there is enough reference frame slot in cpb store extra st frame to
cpb to avoid mismatch in dpb check.
This will happen right after IDR. There is extra empty cpb slot for st
frame and no need to remove them by sliding window.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I261f18d70f241e48a18012807f4dece68e73cbdf
2020-07-08 11:21:49 +08:00
Herman Chen
3c8337275e [bitwriter]: Add flush function to write last byte
When these is incomplete bit in last byte the writer needs to flush all
the valid bit to memory.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I07e24d1504d637beadfc7308b867c03fe2c7735e
2020-07-08 11:07:44 +08:00
Herman Chen
e10f95d851 [vepu541]: H.264 encoder optimization
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7cbb7633d9fa57da358f5ef70aa93e965994bb11
2020-07-08 10:50:57 +08:00
Johnson Ding
fd34d8a793 [vp8d]: Fix buffer running out issue
If altref frames is not for display, they will be remaining in buffers.
Eventually, there will be no more unused buffer to be used for output.

Refer to this issue https://redmine.rockchip.com.cn/issues/226256.

Change-Id: I915582da99e71c95745bce15690562d51d640dc5
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-07-03 14:05:08 +08:00
Herman Chen
f1d7f6e717 [vepu_v2]: Use quality min/max to limit qp
Change-Id: I1291c64d52821191cfb84af9a2656097a7d77b0d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-29 17:25:57 +08:00
Herman Chen
f1643a579e [mpp_enc_v2]: Fix function print macro error
Change-Id: Idbd832c2cb57bab845f1f6e44615d2cbbb08384f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-29 11:06:49 +08:00
Herman Chen
11c0b3aaa0 [mpp_enc_refs]: Fix cpb update error
1. When insert long-term reference frame the tid refs should also be
updated.
2. When insert short-term reference frame the queue update direction has
error. It is fixed now.
3. Long-term reference frame delay_cnt update method is fixed.
4. Dump valid flag when dump cpb frame status.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8db6e71ee5366fefdd1d91018c500d3edc05c6aa
2020-06-23 15:22:42 +08:00
Herman Chen
eb34769db7 [cmake]: Add option to control test building
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic6c6988dad82836cfb87113f2293bc9a2b1abd66
2020-06-22 17:44:01 +08:00
Herman Chen
48e07d877f [mpp_enc_ref]: Fix typos
The check on short-term config should use short-term config count rather
than long-term config count.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I0006fe9a30035f636411702290cd9dff4032296d
2020-06-20 09:04:58 +08:00
Herman Chen
fefa75939d [drm]: Update drm header to 4.19
Change-Id: Id8b98e9cacab9a0dbc86f360172f8aab85dbf76d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-18 16:29:39 +08:00
Johnson Ding
7b94cd4050 [h264d]: fix dpb memory leak
When encounting IPIPPPP... stream, the first IP will be kept in dpb
unflushed. This will lead to dpb used size keep growing and memory leak.

Change-Id: I7973c8b18d13a63d10b0d4f034aefb58a3805ab2
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-06-12 11:29:34 +08:00
Herman Chen
0abeafe872 [cmake]: Add option for Address Sanitizer check
Change-Id: I91cf9111000d2e077dafd9871b965e864863e0bf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-11 17:29:51 +08:00
Herman Chen
c56c01494d [h264d]: Fix heap-use-after-free issue in h264d
Change-Id: I88dced3dbd0a3e6e4f34fee86d7f019bfc130d14
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-11 16:36:19 +08:00
Herman Chen
81d4248166 [mpi_enc_test]: Fix memory leak of test args
Change-Id: Ica87ba3f77eb12e0b36b2ea0d607b4defbea9abb
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-11 16:25:58 +08:00
Herman Chen
0efed5ddf1 [mpp_trie]: Fix memory leak of node and info
Change-Id: Ide75f6401c0dceb4fca315fa8a5f84812c6a8eb4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-11 16:16:03 +08:00
Herman Chen
46bfafa614 [mpp_enc_v2]: Fix memory leak of header buffer
Change-Id: If4ef68a09b8e14b127105e41b7e4d17b3e58a5ac
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-11 16:15:36 +08:00
Herman Chen
c7274a6192 [mpp_enc_v2]: Fix memory leak of rc_ctx
Change-Id: Ifbce970cf10797edc04afa0910d422bc5b1d216d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-11 15:55:04 +08:00
Herman Chen
33e7e4c52a [mpi]: Remove unused H.264 mpi cfg structure
Remove sei / ref cfg in MppEncH264Cfg.

Change-Id: Iaef6a8a845b691dc21d0a6a6eca62e27bc5cf5a4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-10 17:37:49 +08:00
Herman Chen
7ff73d991e [hal_h265e_vepu541]: Update l2 quant bias to 256
Change-Id: I6776972297fbda2749195f8b3922b51a39ccffb5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-10 14:25:49 +08:00
Herman Chen
550e2ee6b3 [mpi]: Remove unused encoder cfg cmd defines
Change-Id: I183fa54d9f074ab94f3bb71bb525ff88372a7724
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-10 11:47:16 +08:00
Herman Chen
bb32442d5e [mpp_enc_v2]: Fix missing rc update on qp changed
When qp limit in codec_cfg is changed the rc_cfg should be also updated.

Change-Id: Ia5da305c015e6bc11836b6c358ddee6be51e819a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-08 15:14:31 +08:00
sayon.chen
15e569a552 [mpp_enc_v2]: Fix missing resend_hdr on codec changed
Change-Id: I5ea13f3e5a285a02903c4b65b2854169c0b3753c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-06-08 15:13:49 +08:00
sayon.chen
27977e2a34 [vepu_541]: Fix rotation issue
1. Add hevc swap w&h when rotation is 90 or 270
2. Fix h264 roation check w&h issue
3. Fix h264 downscale buff issue

Change-Id: Id0e94c3005d00d9d8a54e6c8b710a3ea9f905f5e
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-06-08 08:59:44 +08:00
sayon.chen
c468393e8e [mpp_enc_v2]: Check resend_hdr must request IDR
Change-Id: Ibaaa408eae165ba99c0a4b61a1f207e393c7f645
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-06-08 08:57:57 +08:00
Johnson Ding
48761dbe91 [m2vd]: fix incorrect packet split problem
Searching for star code prefix should not exceed buffer length.
Otherwise 00 outside source buffer will be take as picture start code
when there is 00 00 01 at the end of source buffer.

Change-Id: I04f62e2f638bd721815004b86cf3d75d256d03de
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2020-06-05 16:32:46 +08:00
sayon.chen
fb6cdcb9c0 [vepu]: Add slice split support for vepu1/2
Change-Id: If9f26b1090e4fda50068b325ed15404bd514d1d7
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-06-02 20:06:13 +08:00
Herman Chen
23d3e82c0c [hal_h264e_vepu1/2]: Add stream amend to hal flow
Change-Id: Ic92959a922983e2e251b03dbc58bf91ab67f9050
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-06-02 20:06:13 +08:00
Herman Chen
197bda000f [hal_h264e_vepu]: Add tsvc support on vepu1/2
Change-Id: Iba98bf8cceb4b9aa3c24dd779cc3b002336f8c88
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-06-02 20:06:13 +08:00
sayon.chen
43061a9eac [rc_v2]: Fix divide 0 when gop is infinite
1. Fix bit calc when gop set 0 or 1
2. When gop set 0, will set 300 for bit calc

Change-Id: I8c6f8dfd634a5c5cee760de6226f156e897d91b0
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-06-02 20:06:13 +08:00
Herman Chen
9f6dcfccc4 [mpp_enc_v2]: Unify sei writing process
Change interface of adding stream prefix which is adding sei packet in
H.264/H.265.

The sei will be added with certain type:
1. version info
2. rate control info (rc api name + rc cfg)
3. user data

Change-Id: Ic17efb6b9f75db774b7ad7e7cc78818170260def
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-02 20:06:13 +08:00
Herman Chen
b8caab0fe0 [mpp_enc]: Fix error when update bps only
When only bps is updated the whole rc_usr_cfg should be updated.

Change-Id: I02ed8fa247b3b56ac286254c55251b594ff2fab2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-01 14:15:07 +08:00
sayon.chen
cc3966a6d8 [h265e_541]: Update l2 bias set
Change-Id: I45654b35092ab659bed10604d96c19f50c3591f7
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-06-01 11:30:24 +08:00
Herman Chen
85046f5648 [mpp_enc_v2]: Add add_prefix function
This function is for debugging usage.
Encoder will write mpp version info before each IDR frame.

Change-Id: I03e2f2a7d751e9ecc3122314c2b3de8aa31b910d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-01 10:24:14 +08:00
Herman Chen
439fce52b0 [test]: Add infinite loop mode for mpi_enc_test
Change-Id: Ibf459034f89682ec2accf5c79cf437bc34804808
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-05-29 17:19:22 +08:00
Ding Wei
a26d0fadd7 [h265d]: fix issue for pps header
slice_header_extension_present_flag has missing in parse.

Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: I479b7f0b67eb998c2a33791828488b37384d446a
2020-05-29 10:46:00 +08:00
sayon.chen
24d215ecfc [h265e_api_v2]: Fix request IDR cause tsvc issue
1.remove unused code
2.fix request IDR cause tsvc can't find ref

Change-Id: I67997dd6b56055038c6a1d4e82dace59b84b7944
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-05-28 16:40:18 +08:00
sayon.chen
dc4dc1d7bf [rc_v2]: First intra qp init no depend seq_idx
Change-Id: Ib47003a09794fe51517a56b8c86af8d21152e317
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-05-28 15:12:27 +08:00
Herman Chen
6041943238 [h264e_debug]: Add h264e control debug flag
Change-Id: I70cce37b21c4db155f6bbe42842e6d952afb4bc1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-05-28 11:34:35 +08:00
toby.zhang
681557ee5b [smartp]: modify smt algorithm for 1109/1126
Change-Id: I8017bbd94093ac3f37516e1451709d8f5db38589
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
2020-05-28 10:59:18 +08:00
Herman Chen
db836b2001 [h264e]: Fix discontinuity frame_num issue
Change-Id: Ie00c0f278ef619a17390fc088691ee4e27a937ca
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-05-28 10:28:49 +08:00
Herman Chen
cac03245ba [mpp_enc]: Fix error on request IDR frame
The codec will not handle IDR request directly. The force idr / force
LTR will be config to codec by cpb info.

Change-Id: I9aba12ea3080256451115b9fd77433b67e318cf3
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-05-28 09:30:54 +08:00