mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
media_module: add vmh264 ip only mode
PD#170460: vmh264: decoder get ip only flag from application and enable ip only fast output in dpb. Change-Id: I15a160c65bd0e23324a356c5f78957884395e8d2 Signed-off-by: Hui Zhang <hui.zhang@amlogic.com>
This commit is contained in:
@@ -3447,7 +3447,8 @@ int store_picture_in_dpb(struct h264_dpb_stru *p_H264_Dpb,
|
||||
while (remove_unused_frame_from_dpb(p_H264_Dpb))
|
||||
;
|
||||
|
||||
while (output_frames(p_H264_Dpb, 0))
|
||||
while (output_frames(p_H264_Dpb,
|
||||
(p_H264_Dpb->fast_output_enable == H264_OUTPUT_MODE_FAST)))
|
||||
;
|
||||
|
||||
/* check for duplicate frame number in short term reference buffer */
|
||||
@@ -3502,6 +3503,11 @@ int store_picture_in_dpb(struct h264_dpb_stru *p_H264_Dpb,
|
||||
|
||||
check_num_ref(p_Dpb);
|
||||
|
||||
if (p_H264_Dpb->fast_output_enable == H264_OUTPUT_MODE_FAST) {
|
||||
while (output_frames(p_H264_Dpb, 1))
|
||||
;
|
||||
}
|
||||
|
||||
dump_dpb(p_Dpb, 0);
|
||||
p_Dpb->first_pic_done = 1; /*by rain*/
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
|
||||
#define MAX_LIST_SIZE 33
|
||||
|
||||
#define H264_OUTPUT_MODE_NORMAL 0x4
|
||||
#define H264_OUTPUT_MODE_FAST 0x8
|
||||
|
||||
#define FALSE 0
|
||||
|
||||
#define H264_SLICE_HEAD_DONE 0x01
|
||||
|
||||
@@ -259,8 +259,9 @@ static unsigned int first_i_policy = (15 << 8) | 2;
|
||||
bit [1], output frame if the current poc is 1 big than the previous poc
|
||||
bit [2], if even poc only, output frame ifthe cuurent poc
|
||||
is 2 big than the previous poc
|
||||
bit [3], ip only
|
||||
*/
|
||||
static unsigned int fast_output_enable = 4;
|
||||
static unsigned int fast_output_enable = H264_OUTPUT_MODE_NORMAL;
|
||||
|
||||
static unsigned int enable_itu_t35 = 1;
|
||||
|
||||
@@ -4231,12 +4232,12 @@ static irqreturn_t vh264_isr_thread_fn(struct vdec_s *vdec, int irq)
|
||||
schedule_work(&hw->user_data_work);
|
||||
}
|
||||
if (slice_header_process_status == 1) {
|
||||
/* for baseline , set fast_output mode */
|
||||
if ((p_H264_Dpb->mSPS.profile_idc == BASELINE)
|
||||
|| ((((unsigned long)
|
||||
hw->vh264_amstream_dec_info.param) & 0x8)
|
||||
&& (!hw->i_only)))
|
||||
p_H264_Dpb->fast_output_enable = 4;
|
||||
if ((p_H264_Dpb->mSPS.profile_idc == BASELINE) ||
|
||||
(((unsigned long)(hw->vh264_amstream_dec_info
|
||||
.param)) & 0x8)) {
|
||||
p_H264_Dpb->fast_output_enable =
|
||||
H264_OUTPUT_MODE_FAST;
|
||||
}
|
||||
else
|
||||
p_H264_Dpb->fast_output_enable
|
||||
= fast_output_enable;
|
||||
|
||||
Reference in New Issue
Block a user