Commit Graph

76 Commits

Author SHA1 Message Date
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
bbe38e38a7 [test]: Add return value for test
Change-Id: I4f64b3ffebda6b966cd898ba317d088be967d5d6
2016-12-01 14:17:30 +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
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
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
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
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
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
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
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