1. Add color format print for all supported format.
2. Add RGB color fill function.
Change-Id: I79fb3f40402b6fb6e36883c99945e709723aee7d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. add user data struct define
2. meta supprot user data set
Change-Id: I1ac4bf179ce15fce61b3ad326de9fb0f8c821cad
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
In some MP4 video sources, extra data of sps/pps is only
placed at the beginning of the file. If you perform a
flush operation while processing extra data and waiting
for a complete frame, the extra data will be lost.
Signed-off-by: Xingwen Fang <fxw@rock-chips.com>
Change-Id: I2c088914b50a2ef39c2ecc45381a4891c45bec50
MppQueue does not support concurrent access, and there
are defect in the design, which need to be improved in
the future.
Signed-off-by: Xingwen Fang <fxw@rock-chips.com>
Change-Id: I50db4bcf520bbf4115c6f40d7a759652087965ec
Use enc_version to switch to new encoder path.
Use task_count value to separate different encoder api set.
Change-Id: I4e8ff2b0935ec2cb6178ded742f33ab48187c878
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add new h.264 encoder api implement to mpp_enc.
2. Rate control is still empty
Change-Id: If4375cfdc07430e03565050a9a846e55a2ac24a0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Move mpp_rc_api.h to rc_api.h
2. Add rc base module from mpp_rc.
3. Add rc api and empty rc model.
RC module design:
Rate control is a highly user defined module. So we perfer to open the
interface and let users add their frame-level rate control model.
In order to limit the user behavior the API input and output is
restricted. User can use the provide rc base components to define their
own model.
Change-Id: I72c251e7807f675e973bc80ea55683cd57070b00
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add mpp_enc_hal module.
2. Connect hal_h264e_api to mpp_enc_hal for later usage.
Change-Id: Ia5dcb9a38004dd1f87daaa766699abb798297684
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
New hal api will change interface to the following functions:
1. get_task - receive one task from encoder and process hw rate control.
2. gen_regs - generate register set according to different hardware.
3. start - start the hardwara.
4. wait - wait hardware process one task.
5. ret_task - return the processed task back to encoder.
NOTE: change some function to v2 to avoid linker conflict.
NOTE: vepu2_v2 status
1. Add svc and gop ref implement.
2. Without rc config. The QP is fixed.
Change-Id: I5fa890e8e23c0abbc5abb5ce44111c8a10ea1817
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add start function for fps process and dpb backup.
2. Remove update_dpb function for dpb should be processed at one time.
3. Add device id to encoder config for header generation.
4. Add hal_ret syntax to encoder hal task.
Change-Id: I9dbbc831d46b267701901dc6e80db7efaa7a0b14
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Reg of pps_id should be 8-bits long, instead of 5-bits long. This leads
to hard error when pps_id is greater than 31.
Change-Id: I0ecb894a1aa0af4e66bffb97a19c8b4b9ab5a401
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
The principle of rc_data is to maintain rate control related data for
default and user define rate control algorithm.
Mpp internal work flow will automatically maintain these data. Then rate
control algorithm can just use the data by some APIs.
RC data has some status transaction betweeen different flow stage.
Stage 1. RcData is at unused status.
Stage 2. RcData is got by encoder and encoder starts to filling data.
Stage 3. When data filling is finished RcData is marked as done status.
Stage 4. When data receive max life cycle it returns to unused status.
Encoder will fill in the RC related data including:
1. Unique sequence id
2. Frame type / status
3. Stream size
4. Extra info (hardware feedback)
Overall status and stage diagram
oldest latest
+ + +
|last | current | next
+----------------------------------------------------------------->
| done | filling |unused
+head tail+head tail+head
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib71581d0585f60b46de20662ffe1d20989270884
1. Detect NDK path and version
2. Enable cmake multithread compiling if version > 3.12
3. Support specifying args to build script
Change-Id: I2179aeb5460de6b8d39a867ba3a4200c51b61be7
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
1. Fix error on no_output_of_prior_pics and marking syntax.
2. Add max_ref_num_frames and poc type to slice config.
3. Fix mmco count error and reading error.
4. Add more slice syntax log.
5. Add h264e_slice_write_prefix_nal_unit_svc function.
6. Use mpp_writer_align_one and mpp_writer_trailing to write tailing.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia3871b8818c1ba73884ab74b58200ea309e01a50
1. Use mpp define rather than H264E define.
2. Unify debug function to hal_h264e_debug.h.
3. Change h264e_hal macro to hal_h264e.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I924f717bbffbb37230d9eb3300969a4dce807def
The encoder will get parameter directly from MppEncCfgSet. The
mpp_enc_refs is not needed any more.
Change-Id: Id8b466a905ae10335159bba3ce8d1e5185e3c714
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add a new ioctl mode for kernel-4.19 or later.
Tips:
1. There will be only one device /dev/mpp_service in kernel.
User should use client type to distinguish different device.
2. Each codec use the same function as before.
3. Ioctl magic changes from VPU_IOC to MPP_IOC.
4. Update structure for ioctl argument.
Original structure:
data_ptr | size
In this mode has many sortcommings:
a) Need many ioctl cmd for different requirements.
b) Data_ptr not to differ library for 32 or 64 system.
c) Contain only one info ioctl once.
New data structure:
cmd_type | flags | size | offset | data_ptr
a) Cmd_type works like previous ioctl cmd.
b) Flags is extend to mark current data for any purpose.
c) Size is the same as before.
d) Data_ptr use 32 bits build in 32 system while 64 bits in 64 system.
kernel-4.19 related commit:
ib94ac0df876dfcc786b25ed3de6a68d861d2ef1e
cda9d27c62017309519bcbf8fe91057dfdc21076
Change-Id: I13d54a2e4823b7378265f100540916a22f62b9d4
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>