Commit Graph

1911 Commits

Author SHA1 Message Date
Herman Chen
10676cee87 [base]: Remove misc buffer group creation
1. Do NOT create misc group on library loading.
2. Only create misc group on required.
3. Support both ion and drm now.

Change-Id: I7479f06e8ba6b5568bca5e2173efaa06cef70597
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-10-10 14:18:37 +08:00
leo.ding
842b26d850 [mpg4d]: fix hiding bugs when split mode
1. task_length must use total length to charge whether realloc
2. when packet is the eos, the lastest packet finished

Change-Id: I29a8b9f61a57516bd85fd243616036bdcfade856
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-10-10 10:52:33 +08:00
sliver.chen
48f231c8a1 [m2vd]: add m2vd parser mode
add m2vd split mode,so that we can decode mpeg2 stream
widthout pre-split.

Change-Id: If710bbeac2336aeac33148ce17ac399652295944
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2017-10-10 10:51:14 +08:00
timkingh.huang
5e1f5ed4ef [h264e]: Clear OSD data when zero region number
1. OSD data will not auto clear after one frame encoded.
2. Encoder will keep last OSD data config if there is not change.
3. User need to use zero region number control to disable OSD display.

Change-Id: Id69317198cf30d801a390aee5e6d848dd220fcf8
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-10-09 09:53:58 +08:00
timkingh.huang
5f1583697b [h264e]: add command of MPP_ENC_SET_QP_RANGE
Change-Id: I5c8fedc381537117953e858191f4b2ff8a5a2581
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2017-09-21 19:14:10 +08:00
Randy Li
f19e77b842 [mpp]: move header files into header directory
It could make the build rules more clearly.
Also it could prevent the whole directory is added into the
search path of the include directory.

Change-Id: I1734bcb198c909c73e5d529d0bd6658d7148a685
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-09-13 10:05:14 +08:00
Randy Li
f49475dfc3 [osal]: fixup for build in linux
Change-Id: I9535c66997f299c9d37f5b3c12b1b73fff5997d6
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-09-13 10:05:14 +08:00
leo.ding
53879b705f [avsd]: add dpb error marking
Change-Id: I733cebf27a42e9d360ee759a7a949cae6f7091c7
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-09-12 14:14:49 +08:00
leo.ding
0cf71fe8bf [mpp_buf_slot]: fix bug: should return the info_set frame back
Change-Id: Iea42a889fe02e78e884970154f5544221d7c017d
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-09-11 16:02:29 +08:00
leo.ding
a7ea866dfa [avsd]: fix bugs: when video is field
1. when the second field, should re-find start code, and update offset
2. mv size is (hor_mbs * ver_mbs) * 8
3. add extra 32 bytes, and align to 16 for memset input stream

Change-Id: I4493ece0680f93f8ae2533a71318fd76d67cab95
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-09-08 17:08:00 +08:00
sliver.chen
033694705b [test]: modify to avoid encode dead loop
modify ret val of read_yuv_img to avoid test_mpp_run
dead loop in mpi->poll.

Change-Id: If1b907584d0a79f9a5def168eec9358440e38aee
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2017-09-08 16:21:14 +08:00
sliver.chen
e31f34a749 [test]: add README.md for mpi unit test
Change-Id: Ia540cd26cf33f3205cbf3629b3fc2ac3a080cc7d
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2017-09-07 17:43:27 +08:00
Randy Li
01488cf203 [mpp]: wake up the parser thread in the correct place
The src port of the decoder is linked to the hal thread
not the parser thread, I would like only the sink port
of the decoder will driver the parser thread.

Change-Id: I315b41ff1158fa07a9f794c8bb3eefd6ef4fef7c
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-09-06 11:06:50 +08:00
leo.ding
28bdc96b2d [vpu_api_legacy]: disprese MPP_DEC_SET_FRAME_INFO function to
each codec.

Change-Id: I5ac177fbaba6e81db53c7d162a1d81ba3e00c2e4
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-09-06 10:08:31 +08:00
Randy Li
51210e6950 [h264d]: handle svc_extension correctly
Both Scalable video coding (Annex G) and Multiview
(Annex H, I, J) will use subset sequence parameter set, but
the parser will ignore the SVC nal unit.

Change-Id: Ib6c9d842b07d90aedf6a27a760ede1f7232c478c
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-08-29 17:59:16 +08:00
Randy Li
22c4f83b31 [h264d]: move some variables to its scope
We don't need those variables outside the scope.

Change-Id: Ife4f6b6f8b6224be69c32d3a0d98312582a63d29
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-08-29 17:57:28 +08:00
timkingh.huang
6bb925dbd5 [h264e]: fix rate control bug
1.When target bit is too high, RK_S32 is not enough and
will overflow, which should be replaced by RK_S64.
2.The first I and P frame are recoded at the beginning of
encoding, whose qp should not be limited by qp_prev.

Change-Id: I88796ba2d3a6cb38be87bae28f957b9faa5ba681
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2017-08-24 10:59:56 +08:00
Randy Li
1f9ea05036 .gitignore: ignore those debian generated files
Those files are generated in Debian package building
system.

Change-Id: I4be4e583a36c43687b1b40af944722c3f3415ba5
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-08-19 14:37:42 +08:00
Randy Li
28027cdaa4 [mpg4d]: fixup the compiler warnings
Change-Id: I70b6731258aaf34ef6f5e605ae8332218dab710b
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-08-17 17:01:53 +08:00
ZhouJing
7790a03213 [m4vd]: add m4v decoder support for vdpu1
Change-Id: Ia48c40ebb6bae14a0797624dd455b60aa748b760
Signed-off-by: ZhouJing <tracy.zhou@rock-chips.com>
2017-08-17 16:18:28 +08:00
leo.ding
1397e8ca0e [mpg4d]: update spit mode in prepare
1. re-write split mode code.
2. combine realloc buffer code about copy and split mode.
3. add extra 64 bytes in buffer tail, and memset to 0 algin 64.

Change-Id: I88807c2aeb0d1b36a8a81d09c95c66c0babed078
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-08-16 14:40:52 +08:00
Randy Li
29efa84812 [h264d]: add supporting for the interlace mode
The interlace video is seldom used at AVC codec, so this
feature is skipped before.

A few compiler warnings is fixed this time.

Change-Id: I2e1c419ffa487fc345a91afec38e7601ea6cd841
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-08-11 14:19:57 +08:00
sayon.chen
13678cdc6c [h265d]: hiding the vps_id information
It is anxious.

Change-Id: I094762fc3fa779cadbce4bfdde424090ecfe0acf
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2017-08-10 15:40:44 +08:00
sliver.chen
98d105c3e6 [h264]: fix xrgb encode bug
add r g b mask and swap flag setting when input fmt is ARGB8888

Change-Id: I93fc1841b19a62e27b5d1404068bc747eee3a67a
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2017-08-07 16:45:48 +08:00
timkingh.huang
137618c298 [h264e]: allocate buffers before encoding
Allocate buffers before encoding so that we can save
some time when encoding first frame.

Change-Id: I02d67347313e2050896b545b861bc5fa0bba495d
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2017-08-07 14:54:05 +08:00
timkingh.huang
12fc3ba927 [h264e]: fix rate-control bug
When rate control parameter is changed, qp_prev is set
to qp_init, which makes bps change slowly. Fix it.

Change-Id: I81741b27c602ece466fcbd09aad0c44a06988155
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2017-08-04 14:03:02 +08:00
leo.ding
154dd70600 [h265d]: fix bug: malloc buffer matching
Tips:
malloc buffer length in prepare step must match memset in hal_h265d_reg.

Change-Id: I47771cb46021951ee0c6332fdf3cc3943bf47238
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-08-03 18:18:57 +08:00
ayaka
e710c126ad [test]: add timeout poll type sample code
You could enable the output timeout with a new opinion
"-x" the unit is the millisecond.

Change-Id: Ibfc85729d867a08d1984c8e7b2d63b197159a42b
Signed-off-by: ayaka <ayaka@soulik.info>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-08-03 17:43:43 +08:00
Randy Li
c8394f0203 [mpp]: fixup for the deadlock in decoding
When the input stream is full, it may happen:
1. Both mTheadHal(hal) and mThreadCodec(parser) is waiting
 a signal;
2. The previous task is not ready in parser;
3. A task is in idle and the other is done is the tasks group.

If the parser has finished the checking on the task is done but
has not enter into wait condition state yet, then the hal thread
can't wake the parser later.

Change-Id: I3b30e40bc1de7c5ca6d401084929cfd57ca00546
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-08-03 16:21:34 +08:00
Randy Li
e6ade9b712 [mpp_dec]: remove obsoleted code and format comments
It would be more easy to look into those code next time.

The functions in mpp_time.c have removed the internal debug
flag checking.

Change-Id: I6392190896f74e86a8407f06fa3621dd92371e56
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-08-03 16:21:13 +08:00
leo.ding
bf4a04b514 [h265d]: fix bug: when has no short_rps, it should be has no rps
Tips:
1.when has no short_rps, it means that current decode picture
 has no reference,that no short-term refer, even no long-term refer.
2.the lateset ffmpeg has updated here already like thus.

Change-Id: Id0129d04a39882ebfed753b9562a7fb7392a4cf5
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-07-28 17:46:10 +08:00
Randy Li
5504570c3d Revert "[osal]: linux: add -ldl -lct to link relative library"
This reverts commit 8d42511773.

It will cause a problem in the platform skipping those library.
since those libraries are not necessary for any platform,
I think don't link with them would be better.

Change-Id: I33f48750f70838e393c02eb55971d5ebe0d3df31
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-07-25 17:13:32 +08:00
Randy Li
2dfa2bb76d [jpege]: fixup mpp device
The mpp encoder driver won't check the input format, you
have to put all the other registers into zero or it will be
regarded as an DMA buffer.

Change-Id: Idb23de21d01944d72238c041e74ff53842c28e7d
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-07-25 15:07:03 +08:00
leo.ding
b7bb1de233 [h264e]: fix bps check failed when mpi setup to fix_qp mode
mpp codec will check bps, but bps will be set to -1 when choose fix qp mode.

Change-Id: I570769b09d2f432cf5a11337dddc923027a7afc2
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-07-21 15:08:57 +08:00
timkingh.huang
62beb899cf [h264e]: tidy code
add comments for registers and remove unused code.

Change-Id: I8553967d70ad5ca3b2ac9c8b8a2e774919410bf1
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2017-07-20 20:18:43 +08:00
timkingh.huang
1da9775f0f [h264e]: record rate control parameter
1.Add detailed parameter info to SEI so that we can debug
easily based on MP4 video file.
2.If real bps is much larger than target bps, print all
recorded parameter info of rate control.

Change-Id: Ia04d29e6281760e0ad8e8e38f5e8c04a4c02d981
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2017-07-20 19:46:32 +08:00
Herman Chen
1fec374bdc [h264e]: Fix QP stuck error
When qp_min == qp == qp_max the qp range will be stuck to qp. This will cause
rate control failure.

Change-Id: Ib45d0e376aa9e78b2ec4ca711fef1dc9ebb8f27e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-07-20 11:18:18 +08:00
Randy Li
4bd545925c [m2vd]: a various of fixup
1. Fixup for the compiler warnings in multiple places
2. Fixup for the wrong length of the fill part of register
table.

Change-Id: Iab6644ddd93081508b8dfca02ec130963d467eca
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-07-14 14:25:20 +08:00
leo.ding
a77d0e0612 [hal_vp9d]: change stride align to 256 odds
when resolution is 4096x2176, the cache miss rate is too low, use
256 odds can improve it.

Change-Id: Ie58a6be874355d027a1488d19ac37ae38fcedf89
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-07-12 19:04:11 +08:00
Randy Li
e086bc6546 [vp8d]: fix the vdpu2 decoding error
The type long has a different length in the different
platforms.

Change-Id: I136967588134ff846aee7eaeaea372f6aa8edcef
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-07-11 16:28:00 +08:00
Randy Li
d07db8ff88 [vpu]: use the platform function to open device node
Although it looks a little duplicate with the device type
detect in the HAL layer.

Change-Id: Iaa377e2b603be1fcf4e58a74409f521c714855ef
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-07-11 11:55:06 +08:00
Randy Li
0aa2191f26 [allocator]: force using drm allocator in Linux platform
The buffer management system still have a problem with different
memory type, I have to fake the drm buffer as the ion buffer this
time.

Change-Id: I57d972d45419caeaf0f086372d1ecd0c8dd9b9f5
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-07-11 11:49:28 +08:00
Randy Li
3caf8d8738 [osal]: fixup for a compiler warning
Change-Id: Idd1225c5cb98e5039bf0659e1d2ecdc5c04dbd02
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-07-07 15:05:38 +08:00
Randy Li
c8cf942c2b [jpegd]: fix the compiler warnings and hide some symbols
The internal of the parser had better not be exported.

Change-Id: I4c3d786ebc0424e90d135a43aaa027daac390291
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-07-07 15:05:38 +08:00
Randy Li
b79cfe525f [jpege]: fix some compiler warnings
Although it is just a stub parser.

Change-Id: I56723e3288b6cba36156d9683229edcf574bd064
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-07-07 15:05:38 +08:00
Herman Chen
137dc9d5fb [base]: Add mpp/base/test for task en/dequeue demo
Add task enqueue and dequeue test for demo and performance evaluation.

Change-Id: Ib1c60f85f9776cde7e30ee62a3941921331a434f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-07-05 11:35:40 +08:00
Herman Chen
75660ca37b [oasl]: Add lock timing test
Add pthread lock / unlock and condition wait / signal performance test

Change-Id: Ia0b9ae968d3bbe0b8f802b36afb93c6b564d91dc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-07-05 11:27:22 +08:00
leo.ding
8d42511773 [osal]: linux: add -ldl -lct to link relative library
Change-Id: I4058c948a93f6e615843bcafd31bbf8568305b0c
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
2017-07-04 19:27:26 +08:00
leo.ding
35b1078942 [jpege]: add vepu1 jpeg encode support
Change-Id: I46e87e539200548040f4553bdf556fe8ea9da437
Signed-off-by: leo.ding <leo.ding@rock-chips.com>
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2017-07-04 17:34:55 +08:00
Herman Chen
6263e31bca [h264e_rkv]: Fix error qp prev update
NOTE: Only update previous qp on real frame is encoded.

Change-Id: I8459f66ec55bb0e91155e30c06b1bb31019a20d1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-07-03 15:35:10 +08:00