Add byte_stride to pixel_stride conversion function.
Both jpeg and H.264 encoder should use this function to get
pixel_stride.
Change-Id: I0c256d75b9b9f2c78da56504bc237220b1615bd8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Change mpp_device into a new layer for kernel drvier.
2. Separate mpp_service driver and vcodec_service driver.
3. Add mpp_service.c for /dev/mpp_service driver support.
4. Add global mpp_service info query interface.
5. Remove unused function in mpp_device.c
Change-Id: I3f53bba3aef525ad3b1f450bb55830d1eeaf29a6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Sometimes,there will occur random values in HalVp8eCtx and Vp8eHwCfg
without initialization,so some fd assigned is invalid.
2. Some variables are incorrectly assigned.
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I41360e15f4e7ea3fc8d1131ec44e0bc1e10a8e80
The MppReqV1.data_ptr and MppDevReqV1.data is fix to 64bit. And the
REQ_DATA_PTR should be used on each value assignment.
Change-Id: I43e91625a0da427b8a3962cfddfcf94330e83312
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. In some case cmd_send is increased but param is not write to memory
then the mpp_enc_proc_cfg function may read zero param.
Add extra sem_t to sync cmd / param value.
2. Move MppEncCfgSet to the bottom of encoder.
3. Add control return value path.
Change-Id: Iddc4e690d8e0e45d2922c6666dc5fd9c4d57fef2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Move vcodec_service and mpp_service kernel ioctl interface definition
into different headers.
Change-Id: I1aa77d1073e7c51b48d18cf8d16fd76644d23d38
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Not do reencode in vp8 enc
2. Add api to control whether need to add ivf header
(default: have ivf header)
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I59a3a7193abead6c73e6e1eed593a115add77888
When C++ global destructor is called MppBufferService and MppMetaService
maybe be called before other destructors which may call mpp_buffer_put
and mpp_meta_put. So we mark finished flag after ~MppBufferService and
~MppMetaService is call and so not free corresponding data again.
This case usually happens when user call exit() directly.
Change-Id: I997c49b095e443b061fca230587b6216f710d31c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When the bitrate overflow the encoder can drop or encode skip frame.
drop_mode:
MPP_ENC_RC_DROP_FRM_DISABLED
- Do not drop frame when bitrate is too large.
MPP_ENC_RC_DROP_FRM_NORMAL
- Drop frame when bitrate is too large.
MPP_ENC_RC_DROP_FRM_PSKIP
- Encode force pskip frame to keep frame rate when bitrate overflow.
drop_thd:
The instantaneous bitrate overflow threshold to trigger drop frame.
drop_gap:
The minimum gap between two continuous drop frames.
0 - enable continnous drop frame.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If17ee5f46ee03ae4ad958c8fad30a4a82f422118
1, Fix error of cime search range configuration;
2, Select best performance between tailing error and noise dancing.
Change-Id: I1e9306abbfe57dc76d0bcb095895ac0ed129d524
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
1. Fix stride error on vepu541.
2. Fix YUV color format definition on vepu541.
Change-Id: I785358166f3fd25808debac40d89e28c867bf119
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
ratio_calc used Register function in mode init according rc_mode
Change-Id: I0317ecc004a2c882e005cf791207c6a5a7e50598
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
1. Move sps / pps / slice / dpb definition to there own header.
2. Prepare to add new h264e syntax struct for hal.
Change-Id: I95e884afcf08fa51bdeb6f1e6571c264d9a609ec
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Fix stride definition to compatible to both pixel stride and byte
stride.
In MPI the stride is defined to byte stride. But vepu requires 8 pixel
aligned pixel stride.
So we add more code to adapt to both case and check 8 pixel alignment.
From opengles definition:
Stride means bytes in a row of pixels including padding. So an image
could be 510 pixels in width and rounded up to 512 pixels. The stride
would be 512 * bit depth of the image's format. You could also have
stride in pixels in which case the stride would be 512 pixels
Pitch is a little more vague, but typically could be interchangeable
with stride. Considering your reference is specifying in bytes, it's
likely safe to assume they're not measuring in pixels. So the reference
likely means the number of bytes in a row + padding, the only
alternative would be number of bytes without padding e.g. image width *
bit depth.
Change-Id: I20acf71e2a6bea2eb08b41fe7df531154ebef897
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When the frame is not encoded do not set ready flag in header status.
Change-Id: I21980d48a5abedc562de9875e24466fea5315121
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>