Example #1
0
static void vdin_vf_put(vframe_t *vf,void* op_arg)
{
    if(init_flag == 0)
        return;
    //spin_lock(&vdin_fifo_lock);
#if (defined CONFIG_TVIN_IT660X)||(defined CONFIG_TVIN_VIUIN)
	vfq_push(&newframe_q, vf);
#else
	vfq_push(&recycle_q, vf);
#endif	
    //spin_unlock(&vdin_fifo_lock);
}
Example #2
0
inline void vfq_push_display(vframe_t *vf)
{
    if(vf == NULL)
        return;
    spin_lock(&vdin_fifo_lock);
    vfq_push(&display_q, vf);
    spin_unlock(&vdin_fifo_lock);
}
Example #3
0
inline void vfq_push_newframe(vframe_t *vf)
{
    if(vf == NULL)
        return;
    spin_lock(&vdin_fifo_lock);
    vfq_push(&newframe_q, vf);
    spin_unlock(&vdin_fifo_lock);
}
Example #4
0
static void ppmgr_vf_put(vframe_t *vf, void *op_arg)
{
    ppframe_t *pp_vf = to_ppframe(vf);

    /* the frame is in bypass mode, put the decoder frame */
    if (pp_vf->dec_frame)
        ppmgr_vf_put_dec(pp_vf->dec_frame);
    vfq_push(&q_free, vf);
}
void vdin_vf_init(void)
{
    int i;

	vfq_init(&display_q);
	vfq_init(&recycle_q);
	vfq_init(&newframe_q);

	for (i = 0; i < (BT656IN_VF_POOL_SIZE - 1); ++i)
	{
		vfq_push(&newframe_q, &vfpool[i]);
	}
}
Example #6
0
void vdin_vf_init(void)
{
    int i;

	vfq_init(&display_q);
	vfq_init(&recycle_q);
	vfq_init(&newframe_q);
	vf_provider_init(&vdin_vf_prov, PROVIDER_NAME ,&vdin_vf_provider, NULL);
	for (i = 0; i < (BT656IN_VF_POOL_SIZE ); ++i)
	{
		vfq_push(&newframe_q, &vfpool[i]);
	}
    newframe_q.wr_index = BT656IN_VF_POOL_SIZE -1;

    init_flag = 1;
}
Example #7
0
void vf_local_init(void) 
{
    int i;

    set_property_change(0); 
    still_picture_notify=0;
#ifdef CONFIG_POST_PROCESS_MANAGER_PPSCALER
    scaler_pos_changed = 0;
    scaler_x = scaler_y = scaler_w = scaler_h = 0;
    backup_content_w = backup_content_h = 0;
#endif
    vfq_init(&q_free, VF_POOL_SIZE+1, &vfp_pool_free[0]);
    vfq_init(&q_ready, VF_POOL_SIZE+1, &vfp_pool_ready[0]);

    for (i=0; i < VF_POOL_SIZE; i++) {
        vfp_pool[i].index = i;
        vfq_push(&q_free, &vfp_pool[i].frame);
    }
    
    init_MUTEX(&thread_sem);
}
Example #8
0
static irqreturn_t vmpeg12_isr(int irq, void *dev_id)
{
    u32 reg, info, seqinfo, offset, pts, pts_valid = 0;
    vframe_t *vf;
    ulong flags;

    WRITE_MPEG_REG(ASSIST_MBOX1_CLR_REG, 1);

    reg = READ_MPEG_REG(MREG_BUFFEROUT);

    if (reg) {
        info = READ_MPEG_REG(MREG_PIC_INFO);
        offset = READ_MPEG_REG(MREG_FRAME_OFFSET);
				info = info | PICINFO_TOP_FIRST;
        if (((info & PICINFO_TYPE_MASK) == PICINFO_TYPE_I) &&
            (pts_lookup_offset(PTS_TYPE_VIDEO, offset, &pts, 0) == 0)) {
            pts_valid = 1;
        }

        /*if (frame_prog == 0)*/ {
            frame_prog = info & PICINFO_PROG;
        }

        if ((dec_control & DEC_CONTROL_FLAG_FORCE_2500_720_576_INTERLACE) &&
            (frame_width == 720) &&
            (frame_height == 576) &&
            (frame_dur == 3840)) {
            frame_prog = 0;
        }
        else if ((dec_control & DEC_CONTROL_FLAG_FORCE_3000_704_480_INTERLACE) &&
            (frame_width == 704) &&
            (frame_height == 480) &&
            (frame_dur == 3200)) {
            frame_prog = 0;
        }
        else if ((dec_control & DEC_CONTROL_FLAG_FORCE_2500_704_576_INTERLACE) &&
            (frame_width == 704) &&
            (frame_height == 576) &&
            (frame_dur == 3840)) {
            frame_prog = 0;
        }
        else if ((dec_control & DEC_CONTROL_FLAG_FORCE_2500_544_576_INTERLACE) &&
            (frame_width == 544) &&
            (frame_height == 576) &&
            (frame_dur == 3840)) {
            frame_prog = 0;
        }
	else if ((dec_control & DEC_CONTROL_FLAG_FORCE_2500_480_576_INTERLACE) &&
            (frame_width == 480) &&
            (frame_height == 576) &&
            (frame_dur == 3840)) {
            frame_prog = 0;
        }


        if (frame_prog & PICINFO_PROG) {
            u32 index = ((reg & 7) - 1) & 3;

            seqinfo = READ_MPEG_REG(MREG_SEQ_INFO);

            vf = vfq_pop(&newframe_q);

            set_frame_info(vf);

            vf->index = index;
            vf->type = VIDTYPE_PROGRESSIVE | VIDTYPE_VIU_FIELD;

            if ((seqinfo & SEQINFO_EXT_AVAILABLE) && (seqinfo & SEQINFO_PROG)) {
                if (info & PICINFO_RPT_FIRST) {
                    if (info & PICINFO_TOP_FIRST) {
                        vf->duration = vf->duration * 3;    // repeat three times
                    } else {
                        vf->duration = vf->duration * 2;    // repeat two times
                    }
                }
                vf->duration_pulldown = 0; // no pull down

            } else {
                vf->duration_pulldown = (info & PICINFO_RPT_FIRST) ?
                                        vf->duration >> 1 : 0;
            }

            vf->duration += vf->duration_pulldown;
            vf->canvas0Addr = vf->canvas1Addr = index2canvas(index);
            vf->pts = (pts_valid) ? pts : 0;

            vfbuf_use[index]++;

            if (error_skip(info, vf)) {
                spin_lock_irqsave(&lock, flags);
                vfq_push(&recycle_q, vf);
                spin_unlock_irqrestore(&lock, flags);
            } else {
                vfq_push(&display_q, vf);
            }
            vf_notify_receiver(PROVIDER_NAME,VFRAME_EVENT_PROVIDER_VFRAME_READY,NULL);

        } else {
inline void vfq_push_recycle(vframe_t *vf)
{
    vfq_push(&recycle_q, vf);
}
inline void vfq_push_display(vframe_t *vf)
{
    vfq_push(&display_q, vf);
}
inline void vfq_push_newframe(vframe_t *vf)
{
    vfq_push(&newframe_q, vf);
}
static void vdin_vf_put(vframe_t *vf)
{
	vfq_push(&recycle_q, vf);
}