Commit Graph

259 Commits

Author SHA1 Message Date
Lin Kesheng
c1665998c3 [h264e]: transform_8x8_mode is not limitted for smaller resolution
Change-Id: I5ba70b325580c0936d72bc553a95f1c208533271
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-02-28 14:51:33 +08:00
Lin Kesheng
422ecbc204 [mpi]: change rc mode and quality definition
Change-Id: I87008d7294acaa89d9206e5b1cd1ce74c40d4af4
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-02-14 15:50:06 +08:00
Lin Kesheng
3582a78e34 [hal_h264e_rkv]: implement mb rc configuration
1. add H264eRcCtx to control mb rc
2. define H264eRkvMbRcCfg to list cfgs on each level
3. merge from trunk
4. implement checpoint error_bits and delta_qp according the
   relativeness between qp and bits
5. correct qp_adjust
6. merge from trunk
7. correct traget_bit_error
8. VBR: adjust qp_min/qp_max according to quality configuration

Change-Id: I25eefc992c6e68842a675fd04286d0564bd5d2c2
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-02-10 11:03:39 +08:00
Lin Kesheng
73f2ee87a7 [h264e]: add SEI writing
1. write prep/codec/rc cfg to SEI
2. mpi_enc_test add SEI writting test
3. write SEI one sequence once defaultly

Change-Id: I7dd00a20afe101d7ddf17c875f0704d91a8fea2b
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-02-06 14:23:09 +08:00
Jung Zhao
a487b11725 [rc_test]: fix fps float exception
rc_test doesn't provide value to rc_cfg->fps_out_num, so fps is 0
inside mpp.

Change-Id: Ic92e86ecc45814087efb4b796a997ae51cb33799
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-01-20 10:20:10 +08:00
Herman Chen
b1a5c18ef9 [mpi/mpp]: Remove MppEncConfig interface
Change-Id: Ie85b780076b22342bfc1837beef00036f5f40a04
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2017-01-06 18:00:36 +08:00
Lin Kesheng
5fca2c7645 [rc_test]: debug through demo under new framework
set and configure codec_cfg

Change-Id: I40f404c525f588f5555ca8d37ff9509483128d3d
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-01-06 16:45:26 +08:00
Herman Chen
4c1ae218e6 [mpi/mpp/enc]: New encoder framework
1. Interface change:
Separate normal config into three basic config and several runtime config:
Three basic config -
a. rate control config
b. preprocess config
c. video codec protocol config
More flexible rate control interfaces are provided.
More codec configure interfaces are provided.
Change flag with bitmap is provided for further optimization.

2. Remove old codec config from controller and left rate control module only
Encoder controller only handle user rate control requirement and bit allocation.
Hal hardware encoder only handle qp calculation according given target bit.
Remove all old codec code.

3. Move codec process to hal
Different hardware will share same codec process function in common protocol
directory. And different hardware api will register to same api set. Codec
header generation is moved to separate hal directory.

4. Encoder will return length by task
Encoder will NOT get stream information feedback from controller. All
information required by encoder will be all stored in Task.

5. Add mpp_rc for rate control
Move some common rate control utils to mpp_base.

6. Update mpi_enc_test and mpi_rc_test with new interface

Change-Id: Iebb5e276a48f547167e1bed4673f21cc2f0c8ad5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-01-05 10:58:27 +08:00
Herman Chen
d8ed1f4eb1 [mpi]: Add poll interface to mpi
1. Add poll with timeout. Support three mode: block/non-block/timeout.
2. Change control MPP_SET_INPUT_BLOCK and MPP_SET_OUTPUT_BLOCK.
3. Remove msleep in most mpp interface.

Change-Id: I39d9a261b6f1da66c6cb944abd71d1e7f4928d2d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-01-04 15:15:37 +08:00
Herman Chen
12a7c735e5 [test]: Add more comment to mpi_dec_test
1. Use half internal mode for demo
2. Add decoder memory mode description

Change-Id: I5b72063e55c2228050af7bafe743e0b9ad834721
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-12-09 16:46:28 +08:00
Herman Chen
bbe38e38a7 [test]: Add return value for test
Change-Id: I4f64b3ffebda6b966cd898ba317d088be967d5d6
2016-12-01 14:17:30 +08:00
Lin Kesheng
762f5fcedd [mpi_rc_test]: add ratecontrol test demo
1. encode one frame and decode it immediately
2. calculate ratecontrol stats and export
3. support enc_input fmt 420p/420sp

Change-Id: Iad751097de0ecea0d7afcef2bc12b9d92c5f9d05
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-30 16:11:56 +08:00
Herman Chen
5e5f667d68 [dec]: fix mpp_packet error usage in test
1. mpp_packet length is the valid data size, fix this in copy_init function
2. in mpp_dec_test setup pos and length only do not touch data and size

Change-Id: Ic1bb15126fa09e7da0869ea79ec85ad2869c3955
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-29 10:10:31 +08:00
Herman Chen
102453612b [test]: Set decode test packet size to 2K
Due to current decoder does not support multi-frame data in one packet we have
to limit packet size to a small size. So that one packet will not contain
multiple frame.
This is a modification for internal auto-test environment.

Change-Id: I3bb14c62874ed693b7b9125f21ca342abe54c732
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-28 15:00:15 +08:00
Lin Kesheng
723ffae18e [mpi_enc_test]: fix mpi_enc_test read src frame bug
1. read src frame with real width and height of picture,
   rather than virtual ones.
2. configure correct hor_stride & ver_stride for hardware
3. support yuv420/420sp for mpi_enc_test demo and video
   app, and is compatible for old interface

Change-Id: I1fc23dc2954577b28e25b80a4dcdd1536d45d622
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-24 17:52:44 +08:00
Lin Kesheng
1a9d6af7b9 [h264e_controller]: add set idr frame interface
Change-Id: I3fdaccd95b6570b2994d7a8ddb1db5d4cc066600
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-15 14:29:00 +08:00
Herman Chen
163ef0ecd9 [test]: add help for max frame number in enc test
1. add help log print for max frame number
2. change flag from -F to -n

Change-Id: Ie45681d2b0a6bdd90733b6a6e1c455325eca89b9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-07 20:25:08 +08:00
Lin Kesheng
4d2fa9ae4c [mpi_enc_test]: add option num_frame
1. add option num_frame
2. reduce osd region size

Change-Id: I560686178c902755b49422b9c7c89889338216bd
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-03 14:15:49 +08:00
Lin Kesheng
fad35922fc [h264e_rkv]: pack cfg into SEI and write to stream
1. add SEI writting interface
2. write extra_info_cfg and rc_cfg to SEI
3. stream_get_pos use s->buf_plus8 rather than s->p_start

Change-Id: I71de4d6f5dc31f21c0a32dc5ded275ced260d861
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-10-25 20:54:06 +08:00
Herman Chen
e9520d5cb0 [mpi_dec_test]: cleanup test case
separate simple and advanced process

Change-Id: Ie278357e69bb0748e9958952e3a7f5560c75d024
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-10 20:08:32 +08:00
Herman Chen
04b6a23ce2 [test]: modify mpi_dec_test for mjpeg decoding
1. clear input packet length when packet is copied
2. modify mjpeg advanced decoding path in mpi_dec_test
3. add numerator and denominator set prop function
4. remove extra log on first info change
5. fix eos process and buffer size check in advanced decoding flow
6. fix jpegd stream length config error

Change-Id: Id6c26ebda090eb4076f27deaad4d61b4221f2653
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-10 11:03:59 +08:00
Lin Kesheng
089660baa8 [hal_h264e_rkv]: support osd configuration
1. add osd control interface
2. remove h264e_hal_rkv_coveragetest_cfg.osd
3. add h264e_hal_test & mpi_enc_test for osd
4. use tool to format code

Change-Id: Iadb3453d8e6976e5f718253f762d144864419e94
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-10-08 11:19:11 +08:00
timkingh.huang
44852d9696 [mpi_dec_test]:add advanced decoding path
(1) when decoding mjpeg, switch to mpi_dec_test_decode_advanced
(2) add advanced decoding interface for mjpeg in vpu_api_legacy.cpp

Change-Id: Ib1848d1686c76826385f76405dda81dd0405cb62
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2016-10-08 08:57:41 +08:00
Herman Chen
c58df3f3f9 [mpp_enc]: Implement new encoder framework
1. Separate encoder configure to four parts
2. Add Preprocess / OSD / Extra configs
3. Implement mv_info interface

Change-Id: I2350a25c9f40b199cee8ef6c75ac6ca099f143c4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-09-27 11:08:08 +08:00
Lin Kesheng
3300d13c3c [HAL_H264E_RKV]: complete buffers allocation
1. add HalEncTask.flags.err to decribe errors
2. support alloc error treatment
3. support frame rate configuration
4. user tool to format file mpi_enc_test.c
5. allocate buffer according to color space

Change-Id: I17a89039504390bf1f2ff664a0aa4075b04d33ee
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-09-20 16:52:20 +08:00
Herman Chen
5f7053520e [test]: fix mpi_enc_test help info
Change-Id: I8eb8b8593e41dab607fe14619504904ba9c01b1b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-09-13 11:00:39 +08:00
herman.chen
a0c0639205 [meta]: modify metadata type and key definition
This is prepare for adding metadata key tree.

Change-Id: Ibd8f4a2c820cdeb5c59ade9a0f80d29e803143da
Signed-off-by: herman.chen <herman.chen@rock-chips.com>
2016-09-08 16:56:45 +08:00
Herman Chen
a0c8a331ad [mpi_enc_test]: add default test without input
Change-Id: Ia8e57e4d9e36b5bedac206bef5ab2abb47ea0b0f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-09-08 16:41:56 +08:00
Lin Kesheng
60373a6973 [all]: format code
use fromdos to change file type, remove ^M in code.

Change-Id: I000202dc51fcff57cc0771455baebea595115b1d
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-09-08 15:21:02 +08:00
Jung Zhao
70e2ebdb2b [drm]: add android drm allocator support
1. enable drm allocator in android
2. modify size calculating when alloc

Todo: wait for new interface of kernel to decide
use whether drm or ion as allocator

Change-Id: Ia6791d91d113b238be77088ae747012fb786d683
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2016-08-29 14:26:49 +08:00
Herman Chen
43bfdc6bdf [format]: format coding style
Change-Id: I3d0e081f6636ca8162df4bda68618ec0ba37e7ae
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-08-23 09:16:22 +08:00
ChenHengming
4f7f69c1ae [mpp]: fix compile error on windows
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1191 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-08-11 10:16:44 +00:00
GaoZhili
a9b047a379 [h264e_control]: fix the rate control bug
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1178 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-08-09 03:01:05 +00:00
ChenHengming
0e9872c5ac [mpi_dec_test]: update decoder test case
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1171 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-08-07 09:39:36 +00:00
ChenHengming
b15604090a [test]: add format option to mpi_enc_test
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1165 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-08-07 02:47:14 +00:00
ChenHengming
472d2b585b [vpu_api]: fix MppFrameFormat translation error in vpuapi layer
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1162 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-08-05 10:10:26 +00:00
ChenHengming
64f28f24b2 [test]: fix error on no input file to open
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1144 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-08-02 12:53:16 +00:00
ChenHengming
41ae5d0e22 [mpp_enc]: fix vpu_api setformat error and add more log to vpu_api path
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1142 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-08-02 02:10:48 +00:00
ChenHengming
05e4178f9d [mpp_enc]: implement more encoder control function
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1119 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-28 06:39:53 +00:00
ChenHengming
abc3e78078 [mpp_enc]: remove mpp_enc_get_extra_data and mpp_enc_get_extra_data_size function and use control to get sps/pps of H.264 encoder
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1104 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-27 06:27:32 +00:00
ChenHengming
16b22667c6 [h264e]: pass mpp_cfg to internal H.264 encoder and fix errors in mpi_enc_test
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1101 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-26 12:29:08 +00:00
ChenHengming
4db17e27c6 [mpi_dec_test]: fix compiling error
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1051 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-20 07:56:39 +00:00
ChenHengming
1a2551ec3e [mpp_enc]: fix crash in vpu_api_legacy.cpp
[mpi]: use new control macro system

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1050 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-20 07:54:31 +00:00
GaoZhili
3fafb0fe4f commit the avc encode code, now avc encode process is ok
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1048 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-20 07:22:25 +00:00
GaoZhili
d8121b013e judge whether the dequeued task is NULL in mpi_enc_test
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1040 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-19 01:40:43 +00:00
ChenHengming
410c4a5471 [mpp_buffer_test]: clear mpp_buffer_debug on mpp_buffer_test exit
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1039 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-19 01:21:43 +00:00
ChenHengming
ac9505c16c [mpp_task]: add advanced task flow to mpp, mpi_enc_test can work without error
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1035 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-16 10:13:35 +00:00
ChenHengming
62e28b89ea [mpp_task]: update task implement and add mpi_enc_test sample code
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1032 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-15 06:33:05 +00:00
ChenHengming
94b4f98b45 [test]: add buffer pointer verification to mpp_buffer_test
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@1018 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-14 09:15:11 +00:00
ChenHengming
ab2fb3de4c [mpp_buffer]:
1. Separate mpp_buffer_import_with_tag into two macro for different usage.
2. Add more comment.
3. Change helper macro and function parameter order for better understanding.

git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@972 6e48237b-75ef-9749-8fc9-41990f28c85a
2016-07-01 06:44:01 +00:00