delete the dummy workload related code in mix parser for all the codec.

BZ: 131068

Change-Id: I4fb72f352e163426700ba14d1fa72eb85b19c7fe
Signed-off-by: ywan171 <yi.a.wang@intel.com>
Reviewed-on: http://android.intel.com:8080/133559
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
diff --git a/mixvbp/include/viddec_debug.h b/mixvbp/include/viddec_debug.h
deleted file mode 100755
index fcae102..0000000
--- a/mixvbp/include/viddec_debug.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef VIDDEC_DEBUG_H
-#define VIDDEC_DEBUG_H
-
-#ifndef VBP
-
-#ifdef HOST_ONLY
-#include <stdio.h>
-#include <osal.h>
-#define DEB                        OS_PRINT
-#define FWTRACE                    OS_PRINT("trace:%s %d\n", __FUNCTION__, __LINE__ );
-//  #define DEB(format, args...)
-//  #define FWTRACE
-#define DEB_FNAME(format, args...) OS_PRINT("%s:  %s[%d]:: " format, __FILE__, __FUNCTION__ , __LINE__ ,  ## args )
-#define CDEB(a, format, args...)   if(a != 0) {DEB(format, ##args);}
-#else
-#define DEB(format, args...)
-#define FWTRACE
-#define CDEB(a, format, args...)
-#define DEB_FNAME(format, args...)
-#endif
-
-#else  // VBP is defined
-
-#define DEB(format, args...)
-#define FWTRACE
-#define CDEB(a, format, args...)
-#define DEB_FNAME(format, args...)
-
-#endif // end of VBP
-
-#endif
diff --git a/mixvbp/include/viddec_fw_decoder_host.h b/mixvbp/include/viddec_fw_decoder_host.h
deleted file mode 100644
index d902520..0000000
--- a/mixvbp/include/viddec_fw_decoder_host.h
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
-    This file is provided under a dual BSD/GPLv2 license.  When using or
-    redistributing this file, you may do so under either license.
-
-    GPL LICENSE SUMMARY
-
-    Copyright(c) 2007-2009 Intel Corporation. All rights reserved.
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of version 2 of the GNU General Public License as
-    published by the Free Software Foundation.
-
-    This program is distributed in the hope that it will be useful, but
-    WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
-    The full GNU General Public License is included in this distribution
-    in the file called LICENSE.GPL.
-
-    Contact Information:
-
-    BSD LICENSE
-
-    Copyright(c) 2007-2009 Intel Corporation. All rights reserved.
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in
-    the documentation and/or other materials provided with the
-    distribution.
-    * Neither the name of Intel Corporation nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*/
-
-#ifndef VIDDEC_FW_DECODER_HOST_H
-#define VIDDEC_FW_DECODER_HOST_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "viddec_fw_common_defs.h"
-
-    /** @weakgroup viddec Fw Decoder interface Functions */
-    /** @ingroup viddec_fw_decoder */
-    /*@{*/
-
-    /**
-       This function returns the size required for loading fw.
-       @retval  size : Required size.
-    */
-    uint32_t viddec_fw_decoder_query_fwsize(void);
-
-    /**
-       This function loads Decoder Firmware and initialises necessary state information.
-       @param[in] phys                : Physical address on where firmware should be loaded.
-       @param[in] len                 : Length of data allocated at phys.
-       @retval VIDDEC_FW_SUCCESS      : Successfully loaded firmware.
-       @retval VIDDEC_FW_FAILURE      : Failed to communicate with firmware.
-       @retval VIDDEC_FW_NORESOURCES  : Failed to allocate resources for Loading firmware.
-       @retval VIDDEC_FW_INVALID_PARAM: The input parameters are not valid.
-    */
-    uint32_t viddec_fw_decoder_loadfw(uint32_t phys, uint32_t len);
-
-    /**
-       This function returns required size for global memory for all supported decoders. This is a synchronous message to FW.
-       @param[out] size               : returns the size required.
-       @retval VIDDEC_FW_SUCCESS      : Successfuly got required information from FW.
-       @retval VIDDEC_FW_FAILURE      : Failed to communicate with firmware.
-    */
-    uint32_t viddec_fw_decoder_query_fwsize_scratchmem(uint32_t *size);
-
-    /**
-       This function sets global memory for the firmware to use.This is a synchronous message to FW.
-       @param[in] phys                : Physical address on where global memory starts.
-       @param[in] len                 : Length of data allocated at phys.
-       @retval VIDDEC_FW_SUCCESS      : Successfully setup global memory.
-       @retval VIDDEC_FW_FAILURE      : Failed to communicate with firmware.
-    */
-    uint32_t viddec_fw_decoder_set_fw_scratchmem(uint32_t phys, uint32_t len);
-
-    /**
-       This function returns the size required opening a stream. This a synchronous message to FW.
-       @param[in] codec_type          : Type of codec that we want information about.
-       @param[out] size               : Size of memory required for opening a stream.
-       @retval VIDDEC_FW_SUCCESS      : Successfuly talked to FW and got required size.
-       @retval VIDDEC_FW_FAILURE      : Failed to communicate with firmware.
-    */
-    uint32_t viddec_fw_decoder_query_streamsize(uint32_t codec_type, uint32_t *size);
-
-    /**
-       This function opens requested codec.This a synchronous message to FW.
-       @param[in] codec_type          : Type of codec that we want to open.
-       @param[in] phys                : Physical address of allocated memory for this codec.
-       @param[in] prority             : Priority of stream. 1 for realtime and 0 for background.
-       @param[out] strm_handle        : Handle of the opened stream.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Opened the stream.
-       @retval VIDDEC_FW_FAILURE      : Failed to Open a stream.
-    */
-    uint32_t viddec_fw_decoder_openstream(uint32_t codec_type, uint32_t *strm_handle, uint32_t phys, uint32_t priority);
-
-
-    /**
-       This function closes stream.This a synchronous message to FW.
-       @param[in] strm_handle        : Handle of the stream to close.
-    */
-    void viddec_fw_decoder_closestream(uint32_t strm_handle);
-
-    /**
-       This function allows to get current status of the decoder workload queues. If the current stream is active we return
-       number of input messages that can be written to input queue and the number of messages in output queue of the stream.
-
-       Normally this is called when Host receives an interrupt from decoder, In which case before releasing the INT
-       Host will try its best to keep the FW busy. Normally when a interrupt is received it means at least one workload is
-       written into output queue of a stream.
-       @param[in] strm_handle         : The handle of stream that we want to get status of queues.
-       @param[out] status             : The status of each queue gets updated in here.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Got the status information.
-       @retval VIDDEC_FW_INVALID_PARAM: Invalid parameter in this case an inactive stream.
-    */
-    uint32_t viddec_fw_decoder_get_queue_status(uint32_t strm_handle, viddec_fw_decoder_q_status_t *status);
-
-    /**
-       This function flushes the current stream. This is a synchronous message to FW.
-       Before calling this function the host has to make sure the output queue of the firmware
-       is empty. After this function is executed the FW will read all entries in input
-       wkld buffer queue into output queue. After this operation the host has to read all entries
-       in output queue again to finish the flush operation.
-       @param[in] flush_type          : Type of flush we want to perform.ex:flush and discard.
-       @param[in]  strm_handle        : Handle of the stream we want to flush.
-       @retval VIDDEC_FW_SUCCESS      : Successfully flushed the stream.
-       @retval VIDDEC_FW_FAILURE      : Failed to flush a stream.
-    */
-    uint32_t viddec_fw_decoder_flushstream(uint32_t strm_handle, uint32_t flush_type);
-
-    /**
-       This function sends an input workload buffer. The host should provide required frame buffers in this workload before
-       sending it to fw.
-       @param[in] strm_handle         : The handle of stream that we want to send workload buffer to.
-       @param[in] cur_wkld            : The workload buffer we want to send.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Sent the message.
-       @retval VIDDEC_FW_PORT_FULL    : Port to fw full unsuccesful in sending message.
-    */
-    uint32_t viddec_fw_decoder_send(uint32_t strm_handle, ipc_msg_data *cur_wkld);
-
-    /**
-       This function gets the decoded workload from fw.
-       @param[in] strm_handle         : The handle of stream that we want to read workload from.
-       @param[out] cur_wkld           : The workload descriptor.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Sent the message.
-       @retval VIDDEC_FW_PORT_EMPTY   : Workload port is empty,unsuccesful in reading wkld.
-    */
-    uint32_t viddec_fw_decoder_recv(uint32_t strm_handle, ipc_msg_data *cur_wkld);
-
-    /**
-       This function unloads Decoder Firmware and free's the resources allocated in Load fw.
-       If this function is called before load fw it will crash with a segmentation fault.
-    */
-    void viddec_fw_decoder_deinit(void);
-
-    /**
-       This function gets the major and minor revison numbers of the loaded firmware.
-       @param[out] major              : The major revision number.
-       @param[out] minor              : The minor revision number.
-       @param[out] build              : The Internal Build number.
-    */
-    void viddec_fw_decoder_get_version_number(unsigned int *major, unsigned int *minor, unsigned int *build);
-
-    /**
-       This function returns the interrupt status of all streams which need to be processed. A value of zero
-       means no active streams which generated this interrupt.
-    */
-    uint32_t viddec_fw_decoder_active_pending_interrupts(void);
-
-    /**
-       This function clears the interrupts for all active streams represented by status input parameter.
-       The status should always be a value that was returned by viddec_fw_decoder_active_pending_interrupts().
-       @param[in] status              : The status value that was returned by viddec_fw_decoder_active_pending_interrupts().
-    */
-    void viddec_fw_decoder_clear_all_pending_interrupts(uint32_t status);
-
-    /**
-       This function enables/disables interrupt for the stream specified.
-       @param[in] strm_handle         : The handle of stream that we want enable or disable interrupts for.
-       @param[in] enable              : Boolean value if ==0 means disable Interrupts else enable.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Sent the message.
-       @retval VIDDEC_FW_INVALID_PARAM: Invalid stream handle was passed.
-    */
-    uint32_t viddec_fw_decoder_set_stream_interrupt_mask(uint32_t stream_handle, uint32_t enable);
-
-    /**
-       This function returns which stream interrupted in the past based on status, which is a snapshot of
-       interrupt status that was cleared in the past. The host has to call clear with status information
-       before calling this function again with status value. The Host should do this operation until this function
-       returns 0, which means all the streams that generated interrupt have been processed.
-       @param[out]strm_handle         : The handle of a stream that generated interrupt.
-       @param[in] status              : Snapshot of Interrupt status which was returned by viddec_fw_decoder_active_pending_interrupts().
-       @retval 1                      : A valid stream handle was found.
-       @retval 0                      : No more streams from the status which caused interrupt.
-    */
-    uint32_t viddec_fw_decoder_get_next_stream_from_interrupt_status(uint32_t status, uint32_t *stream_handle);
-
-    /**
-       This function clears the stream_handle from the status snapshot that we got from viddec_fw_decoder_active_pending_interrupts(),
-       This should be called after host performs all necessary actions for the stream.
-       @param[in] strm_handle         : The handle of a stream that we want to clear to indicate we handled it.
-       @param[in] status              : Snapshot of Interrupt status which was returned by viddec_fw_decoder_active_pending_interrupts().
-       @retval 1                      : Operation was sucessful.
-       @retval 0                      : Invalid stream handle was passed.
-    */
-    uint32_t viddec_fw_decoder_clear_stream_from_interrupt_status(uint32_t *status, uint32_t stream_handle);
-
-    /*@}*/
-#ifdef __cplusplus
-}
-#endif
-
-#endif//#ifndef VIDDEC_FW_DECODER_HOST_H
diff --git a/mixvbp/include/viddec_fw_frame_attr.h b/mixvbp/include/viddec_fw_frame_attr.h
index 4f4b479..3cea943 100644
--- a/mixvbp/include/viddec_fw_frame_attr.h
+++ b/mixvbp/include/viddec_fw_frame_attr.h
@@ -58,8 +58,6 @@
 #ifndef VIDDEC_FW_FRAME_ATTR_H
 #define VIDDEC_FW_FRAME_ATTR_H
 
-#include "viddec_fw_item_types.h"
-
 #define VIDDEC_PANSCAN_MAX_OFFSETS 4
 #define VIDDEC_MAX_CPB_CNT 32
 
diff --git a/mixvbp/include/viddec_fw_item_types.h b/mixvbp/include/viddec_fw_item_types.h
deleted file mode 100644
index 472dff2..0000000
--- a/mixvbp/include/viddec_fw_item_types.h
+++ /dev/null
@@ -1,784 +0,0 @@
-/*
-    This file is provided under a dual BSD/GPLv2 license.  When using or
-    redistributing this file, you may do so under either license.
-
-    GPL LICENSE SUMMARY
-
-    Copyright(c) 2007-2009 Intel Corporation. All rights reserved.
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of version 2 of the GNU General Public License as
-    published by the Free Software Foundation.
-
-    This program is distributed in the hope that it will be useful, but
-    WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
-    The full GNU General Public License is included in this distribution
-    in the file called LICENSE.GPL.
-
-    Contact Information:
-
-    BSD LICENSE
-
-    Copyright(c) 2007-2009 Intel Corporation. All rights reserved.
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in
-    the documentation and/or other materials provided with the
-    distribution.
-    * Neither the name of Intel Corporation nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*/
-#ifndef VIDDEC_FW_ITEM_TYPES_H
-#define VIDDEC_FW_ITEM_TYPES_H
-
-
-/* The following macros are defined to pack data into 32 bit words.
-   mask:    A 32 bit value of N 1 bits starting from lsb where N represents the length of data we are packing.
-   start:   Bit start position of data we want.
-          ex:  If we want to pack Height(16bits), width(16bits) where width is from (1:16) and height is from (17:32), these are
-          the start and mask values for width and height.
-          width: start = 0 mask=0xFFFF
-          Height:start=  16 mask=0xFFFF
-
-   extract: will extract data from x_32 of unsigned integer type from bit start offset(0 to 31) of length based on mask and returns in
-            unsigned integer type.
-   insert:  Will insert N bits from val_32 ,where N is length based on mask, into x_32 from bit offset based on start. val_32 is expected to
-           be a unsigned int of N bits starting with lsb.
-*/
-
-#define viddec_fw_bitfields_extract(x_32, start, mask)     (((x_32) >> (start)) & (mask) )
-#define viddec_fw_bitfields_insert(x_32, val_32, start, mask) ((x_32) = (((x_32) & ~( (mask) << (start))) | (((val_32) & (mask)) << (start))))
-
-
-/* Workload items type. Each item here represents data that Parser detected ex:slice data which
- is used either by host or decoder.*/
-typedef enum workload_item_type
-{
-    VIDDEC_WORKLOAD_INVALID                               =0x0,/* Unknown type */
-    VIDDEC_WORKLOAD_PIXEL_ES                              =0x100,/* Slice data tag */
-    VIDDEC_WORKLOAD_TAG                                   =0x200,/* Frame association tag */
-    VIDDEC_WORKLOAD_USERDATA                              =0x300,/* user data tag */
-
-    VIDDEC_WORKLOAD_IBUF_DONE                             =0x500,/* Es buffer completely used tag */
-    VIDDEC_WORKLOAD_IBUF_CONTINUED                        =0x600,/* Es buffer partially used tag */
-    VIDDEC_WORKLOAD_IBUF_DISCONTINUITY                    =0x700,/* Discontinuity tag on first workload after discontinuity */
-    VIDDEC_WORKLOAD_REFERENCE_FRAME_REORDER               =0x800, /* Reorder frames in DPB tag */
-    VIDDEC_WORKLOAD_IBUF_EOS                              =0x900,/* EOS tag on last workload used for current stream */
-    VIDDEC_WORKLOAD_SEQUENCE_INFO                         =0xa00,/* MPEG2 Seq Hdr, H264 SPS, VC1 SeqLayer */
-    VIDDEC_WORKLOAD_DISPLAY_INFO                          =0xb00,/* MPEG2 Seq Disp Ext, H264 VUI */
-    VIDDEC_WORKLOAD_GOP_INFO                              =0xc00,/* MPEG2 GOP, VC1 Entrypoint */
-    VIDDEC_WORKLOAD_SEQ_USER_DATA                         =0xd00,/* MPEG2, VC1 Sequence Level User data */
-    VIDDEC_WORKLOAD_GOP_USER_DATA                         =0xe00,/* MPEG2, VC1 Gop Level User data */
-    VIDDEC_WORKLOAD_FRM_USER_DATA                         =0xf00,/* MPEG2 Picture User data, VC1 Frame User data */
-
-    VIDDEC_WORKLOAD_FLD_USER_DATA                         =0x1000,/* MPEG2, VC1 Field User data */
-    VIDDEC_WORKLOAD_SLC_USER_DATA                         =0x1100,/* VC1 Slice User data */
-    VIDDEC_WORKLOAD_VISUAL_OBJ_USER_DATA                  =0x1200,/* MPEG4 Visual Object User data */
-    VIDDEC_WORKLOAD_VC1_SEQ_HDR_STRUCT_A_C                =0x1200,/* VC1 Only */
-    VIDDEC_WORKLOAD_VIDEO_OBJ_USER_DATA                   =0x1300,/* MPEG4 Video Object Layer User data */
-    VIDDEC_WORKLOAD_H264_CROPPING                         =0x1400,/* H264 only */
-    VIDDEC_WORKLOAD_H264_PAN_SCAN                         =0x1500,/* H264 only */
-    VIDDEC_WORKLOAD_SEI_PIC_TIMING                        =0x1600,/* H264 only */
-    VIDDEC_WORKLOAD_SEI_PAN_SCAN_RECT                     =0x1700,/* H264 only */
-    VIDDEC_WORKLOAD_SEI_USER_DATA_REGISTERED              =0x1800,/* H264 only */
-    VIDDEC_WORKLOAD_SEI_USER_DATA_UNREGISTERED            =0x1900,/* H264 only */
-    VIDDEC_WORKLOAD_SEI_RECOVERY_POINT                    =0x1a00,/* H264 only */
-    VIDDEC_WORKLOAD_MPEG2_SEQ_EXT                         =0x1b00,/* MPEG2 Only - Sequence Extension */
-    VIDDEC_WORKLOAD_H264_MVC_SPS_VIEW_IDS                 =0x1c00,/* H264 only */
-    VIDDEC_WORKLOAD_MPEG4_VISUAL_SEQ_OBJ                  =0x1d00,/* MPEG4 Only - Visual Sequence */
-    VIDDEC_WORKLOAD_MPEG4_VIDEO_OBJ                       =0x1e00,/* MPEG4 Only - Video Object Layer */
-    VIDDEC_WORKLOAD_MPEG4_GRP_VIDEO_OBJ                   =0x1f00,/* MPEG4 Only - Group of Video Object Planes */
-
-    VIDDEC_WORKLOAD_MPEG4_VIDEO_PLANE_SHORT               =0x2000,/* MPEG4 Only - Video Plane with Short Header */
-    VIDDEC_WORKLOAD_H264_VUI_TIMING_INFO                  =0x2100,/* H264 only */
-
-    VIDDEC_WORKLOAD_REF_FRAME_SOURCE_0                    =0x10000,/* required reference frames tag,last eight bits indicate index in dpb */
-    VIDDEC_WORKLOAD_REF_FRAME_RELEASE_0                   =0x20000,/* release frames tag, last eight bits indicate index in dpb*/
-    VIDDEC_WORKLOAD_REF_FRAME_DISPLAY_0                   =0x30000,/* Display order in DPB tag, for H264 */
-    VIDDEC_WORKLOAD_REF_FRAME_DROPOUT_0                   =0x40000,/* Release frames but not display, for H264 */
-    VIDDEC_WORKLOAD_EOS_RELEASE_FRAME_0                   =0x50000,/* Release list while EOS, last eight bits indicate index in dpb */
-    VIDDEC_WORKLOAD_EOS_DISPLAY_FRAME_0                   =0x60000,/* Display list while EOS, last eight bits indicate index in dpb */
-    VIDDEC_WORKLOAD_DPB_ACTIVE_FRAME_0                    =0x70000,/* required for H264 as it needs whole DPB for each frame */
-    VIDDEC_WORKLOAD_H264_REFR_LIST_0                      =0x80000,/* ref list 0 for H264 */
-    VIDDEC_WORKLOAD_H264_REFR_LIST_1                      =0x90000,/* ref list 1 for H264 */
-    VIDDEC_WORKLOAD_EOS_BEGIN_BOUNDARY                    =0xa0000,/* eos items begin after this */
-
-    VIDDEC_WORKLOAD_DECODER_SPECIFIC                      =0x100000,/* pvt info for decoder tags */
-    VIDDEC_WORKLOAD_MAX,
-} workload_item_type;
-
-struct h264_witem_sps_mvc_id
-{
-    /*
-      0-9:    num_views_minus1
-      10-19:  start index of views in current item.
-      20-23:  Number of valid items.
-    */
-#define viddec_fw_h264_sps_mvc_id_get_num_views_minus1(x)         viddec_fw_bitfields_extract( (x)->num_views, 0, 0x3FF)
-#define viddec_fw_h264_sps_mvc_id_set_num_views_minus1(x, val)    viddec_fw_bitfields_insert( (x)->num_views, val, 0, 0x3FF)
-#define viddec_fw_h264_sps_mvc_id_get_cur_start_index(x)          viddec_fw_bitfields_extract( (x)->num_views, 10, 0x3FF)
-#define viddec_fw_h264_sps_mvc_id_set_cur_start_index(x, val)     viddec_fw_bitfields_insert( (x)->num_views, val, 10, 0x3FF)
-#define viddec_fw_h264_sps_mvc_id_get_num_cur_valid_items(x)      viddec_fw_bitfields_extract( (x)->num_views, 20, 0x7)
-#define viddec_fw_h264_sps_mvc_id_set_num_cur_valid_items(x, val) viddec_fw_bitfields_insert( (x)->num_views, val, 20, 0x7)
-    unsigned int num_views;
-
-    /* We pack six id's into two integers.Each packed_view(integer) contains three 10 bit ids at 0-9, 10-19, 20-29
-       These values can be extracted/set using viddec_fw_h264_sps_mvc_id_get_data_frm_index()
-       and viddec_fw_h264_sps_mvc_id_set_data_frm_index() functions.
-    */
-#define viddec_fw_h264_sps_mvc_id_max_packed_ids        6 /* Max number of packed ids in a workload item */
-    unsigned int packed_view[2];
-};
-
-/* This function extracts a 10 bit view id of index( <6) that was packed into h264_witem_sps_mvc_id structure */
-static inline unsigned int viddec_fw_h264_sps_mvc_id_get_data_frm_index(struct h264_witem_sps_mvc_id *data, unsigned int index)
-{
-    unsigned int start=0, *word;
-
-    start = ((index > 2) ?(index - 3) : index) *10;
-    word = &(data->packed_view[(index > 2) ? 1:0]);
-    return viddec_fw_bitfields_extract(*word, start, 0x3FF);
-}
-
-/* This function packs  a 10 bit view id(val) at index( <6) in h264_witem_sps_mvc_id structure */
-static inline void viddec_fw_h264_sps_mvc_id_set_data_frm_index(struct h264_witem_sps_mvc_id *data, unsigned int index, unsigned int val)
-{
-    unsigned int start=0, *word;
-
-    start = ((index > 2) ?(index - 3) : index) *10;
-    word = &(data->packed_view[(index > 2) ? 1:0]);
-    viddec_fw_bitfields_insert(*word, val, start, 0x3FF);
-}
-
-/* 16-byte workload */
-typedef struct viddec_workload_item
-{
-    enum workload_item_type vwi_type;
-    union
-    {
-        struct
-        {
-            unsigned int    es_phys_addr;
-            unsigned int    es_phys_len;
-            unsigned int    es_flags;
-        } es;
-        struct
-        {
-            unsigned int    tag_phys_addr;
-            unsigned int    tag_phys_len;
-            unsigned int    tag_value;
-        } tag;
-        struct
-        {
-            unsigned int    data_offset;
-            unsigned int    data_payload[2];
-        } data;
-        struct
-        {
-            signed int      reference_id;     /* Assigned by parser */
-            unsigned int    luma_phys_addr;   /* assigned by host, for DM */
-            unsigned int    chroma_phys_addr; /* assigned by host, for DM */
-        } ref_frame;
-        struct   /* when vwi_type == VIDDEC_WORKLOAD_REFERENCE_FRAME_REORDER */
-        {
-            signed int      ref_table_offset;    /* Index of first "reordered" */
-            /* index from Current[] for Next[offset+0], Ref[offset+1], Ref[offset+2], Ref[offset+3] */
-            unsigned int    ref_reorder_00010203;
-            /* index from Current[] for Next[offset+4], Ref[offset+5], Ref[offset+6], Ref[offset+7] */
-            unsigned int    ref_reorder_04050607;
-        } ref_reorder;
-        struct
-        {
-            /* we pack a maximum of 11 bytes of user data and 1 byte for size */
-            /* TODO: we can pack 12 bytes and use bottom 8 bits of type to indicate size */
-#define viddec_fw_get_user_data_size(x)  ((x)->user_data.size)
-#define viddec_fw_get_user_data(x)   (unsigned char *)&((x)->user_data.data_payload[0])
-            unsigned char size;
-            unsigned char data_payload[11];
-            /*
-              ITEM TYPES WHICH use this:
-              VIDDEC_WORKLOAD_SEI_USER_DATA_UNREGISTERED, VIDDEC_WORKLOAD_SEI_USER_DATA_REGISTERED,
-              VIDDEC_WORKLOAD_SEQ_USER_DATA, VIDDEC_WORKLOAD_GOP_USER_DATA,
-              VIDDEC_WORKLOAD_FRM_USER_DATA, VIDDEC_WORKLOAD_FLD_USER_DATA, VIDDEC_WORKLOAD_SLC_USER_DATA,
-            */
-        } user_data;
-        struct
-        {
-            // Sequence Header Item I (From LSB):
-            //    - horizontal_size_value    - 12 bits
-            //    - vertical_size_value      - 12 bits
-            //    - aspect_ratio_information - 4 bits
-            //    - frame_rate_code          - 4 bits
-#define viddec_fw_mp2_sh_get_horizontal_size_value(x)    viddec_fw_bitfields_extract( (x)->seq_hdr_item_1,  0, 0xFFF)
-#define viddec_fw_mp2_sh_get_vertical_size_value(x)      viddec_fw_bitfields_extract( (x)->seq_hdr_item_1, 12, 0xFFF)
-#define viddec_fw_mp2_sh_get_aspect_ratio_information(x) viddec_fw_bitfields_extract( (x)->seq_hdr_item_1, 24, 0xF)
-#define viddec_fw_mp2_sh_get_frame_rate_code(x)          viddec_fw_bitfields_extract( (x)->seq_hdr_item_1, 28, 0xF)
-#define viddec_fw_mp2_sh_set_horizontal_size_value(x, val)    viddec_fw_bitfields_insert ( (x)->seq_hdr_item_1, val,  0, 0xFFF)
-#define viddec_fw_mp2_sh_set_vertical_size_value(x, val)      viddec_fw_bitfields_insert ( (x)->seq_hdr_item_1, val, 12, 0xFFF)
-#define viddec_fw_mp2_sh_set_aspect_ratio_information(x, val) viddec_fw_bitfields_insert ( (x)->seq_hdr_item_1, val, 24, 0xF)
-#define viddec_fw_mp2_sh_set_frame_rate_code(x, val)          viddec_fw_bitfields_insert ( (x)->seq_hdr_item_1, val, 28, 0xF)
-            unsigned int seq_hdr_item_1;
-
-            // Sequence Header Item II (From LSB):
-            //    - bit_rate_value        - 18 bits
-            //    - vbv_buffer_size_value - 10 bits
-            //    - remaining pad bits
-#define viddec_fw_mp2_sh_get_bit_rate_value(x)        viddec_fw_bitfields_extract( (x)->seq_hdr_item_2,  0, 0x3FFFF)
-#define viddec_fw_mp2_sh_get_vbv_buffer_size_value(x) viddec_fw_bitfields_extract( (x)->seq_hdr_item_2, 18, 0x3FF)
-#define viddec_fw_mp2_sh_set_bit_rate_value(x, val)        viddec_fw_bitfields_insert ( (x)->seq_hdr_item_2, val,  0, 0x3FFFF)
-#define viddec_fw_mp2_sh_set_vbv_buffer_size_value(x, val) viddec_fw_bitfields_insert ( (x)->seq_hdr_item_2, val, 18, 0x3FF)
-            unsigned int seq_hdr_item_2;
-
-            unsigned int pad;
-        } mp2_sh; // mp2 item of type VIDDEC_WORKLOAD_SEQUENCE_INFO
-        struct
-        {
-            // Sequence Extension Item I (From LSB):
-            //    - profile_and_level_indication - 8 bits
-            //    - progressive_sequence         - 1 bit
-            //    - chroma_format                - 2 bits
-            //    - horizontal_size_extension    - 2 bits
-            //    - vertical_size_extension      - 2 bits
-            //    - bit_rate_extension           - 12 bits
-            //    - remaining pad bits
-#define viddec_fw_mp2_se_get_profile_and_level_indication(x) viddec_fw_bitfields_extract( (x)->seq_ext_item_1,  0, 0xFF)
-#define viddec_fw_mp2_se_get_progressive_sequence(x)         viddec_fw_bitfields_extract( (x)->seq_ext_item_1,  8, 0x1)
-#define viddec_fw_mp2_se_get_chroma_format(x)                viddec_fw_bitfields_extract( (x)->seq_ext_item_1,  9, 0x3)
-#define viddec_fw_mp2_se_get_horizontal_size_extension(x)    viddec_fw_bitfields_extract( (x)->seq_ext_item_1, 11, 0x3)
-#define viddec_fw_mp2_se_get_vertical_size_extension(x)      viddec_fw_bitfields_extract( (x)->seq_ext_item_1, 13, 0x3)
-#define viddec_fw_mp2_se_get_bit_rate_extension(x)           viddec_fw_bitfields_extract( (x)->seq_ext_item_1, 15, 0xFFF)
-#define viddec_fw_mp2_se_set_profile_and_level_indication(x, val) viddec_fw_bitfields_insert ( (x)->seq_ext_item_1, val,  0, 0xFF)
-#define viddec_fw_mp2_se_set_progressive_sequence(x, val)         viddec_fw_bitfields_insert ( (x)->seq_ext_item_1, val,  8, 0x1)
-#define viddec_fw_mp2_se_set_chroma_format(x, val)                viddec_fw_bitfields_insert ( (x)->seq_ext_item_1, val,  9, 0x3)
-#define viddec_fw_mp2_se_set_horizontal_size_extension(x, val)    viddec_fw_bitfields_insert ( (x)->seq_ext_item_1, val, 11, 0x3)
-#define viddec_fw_mp2_se_set_vertical_size_extension(x, val)      viddec_fw_bitfields_insert ( (x)->seq_ext_item_1, val, 13, 0x3)
-#define viddec_fw_mp2_se_set_bit_rate_extension(x, val)           viddec_fw_bitfields_insert ( (x)->seq_ext_item_1, val, 15, 0xFFF)
-            unsigned int seq_ext_item_1;
-
-            // Sequence Extension Item II (From LSB):
-            //    - vbv_buffer_size_extension - 8 bits
-            //    - frame_rate_extension_n    - 2 bits
-            //    - frame_rate_extension_d    - 5 bits
-            //    - remaining pad bits
-#define viddec_fw_mp2_se_get_vbv_buffer_size_extension(x) viddec_fw_bitfields_extract( (x)->seq_ext_item_2,  0, 0xFF)
-#define viddec_fw_mp2_se_get_frame_rate_extension_n(x)    viddec_fw_bitfields_extract( (x)->seq_ext_item_2,  8, 0x3)
-#define viddec_fw_mp2_se_get_frame_rate_extension_d(x)    viddec_fw_bitfields_extract( (x)->seq_ext_item_2, 10, 0x1F)
-#define viddec_fw_mp2_se_set_vbv_buffer_size_extension(x, val) viddec_fw_bitfields_insert ( (x)->seq_ext_item_2, val,  0, 0xFF)
-#define viddec_fw_mp2_se_set_frame_rate_extension_n(x, val)    viddec_fw_bitfields_insert ( (x)->seq_ext_item_2, val,  8, 0x3)
-#define viddec_fw_mp2_se_set_frame_rate_extension_d(x, val)    viddec_fw_bitfields_insert ( (x)->seq_ext_item_2, val, 10, 0x1F)
-            unsigned int seq_ext_item_2;
-
-            unsigned int pad;
-        } mp2_se; // mp2 item of type VIDDEC_WORKLOAD_MPEG2_SEQ_EXT
-        struct
-        {
-            // Sequence Display Extension Item I (From LSB):
-            //   - display_horizontal_size - 14 bits
-            //   - display_vertical_size   - 14 bits
-            //   - video_format            - 3 bits
-            //   - color_description       - 1 bit
-#define viddec_fw_mp2_sde_get_display_horizontal_size(x) viddec_fw_bitfields_extract( (x)->seq_disp_ext_item_1,  0, 0x3FFF)
-#define viddec_fw_mp2_sde_get_display_vertical_size(x)   viddec_fw_bitfields_extract( (x)->seq_disp_ext_item_1, 14, 0x3FFF)
-#define viddec_fw_mp2_sde_get_video_format(x)            viddec_fw_bitfields_extract( (x)->seq_disp_ext_item_1, 28, 0x7)
-#define viddec_fw_mp2_sde_get_color_description(x)       viddec_fw_bitfields_extract( (x)->seq_disp_ext_item_1, 31, 0x1)
-#define viddec_fw_mp2_sde_set_display_horizontal_size(x, val) viddec_fw_bitfields_insert ( (x)->seq_disp_ext_item_1, val,  0, 0x3FFF)
-#define viddec_fw_mp2_sde_set_display_vertical_size(x, val)   viddec_fw_bitfields_insert ( (x)->seq_disp_ext_item_1, val, 14, 0x3FFF)
-#define viddec_fw_mp2_sde_set_video_format(x, val)            viddec_fw_bitfields_insert ( (x)->seq_disp_ext_item_1, val, 28, 0x7)
-#define viddec_fw_mp2_sde_set_color_description(x, val)       viddec_fw_bitfields_insert ( (x)->seq_disp_ext_item_1, val, 31, 0x1)
-            unsigned int seq_disp_ext_item_1;
-
-            // Sequence Display Extension II (From LSB):
-            //   - color_primaries - 8 bits
-            //   - transfer_characteristics - 8 bits
-            //   - remaining pad bits
-#define viddec_fw_mp2_sde_get_color_primaries(x)          viddec_fw_bitfields_extract( (x)->seq_disp_ext_item_2,  0, 0xFF)
-#define viddec_fw_mp2_sde_get_transfer_characteristics(x) viddec_fw_bitfields_extract( (x)->seq_disp_ext_item_2,  8, 0xFF)
-#define viddec_fw_mp2_sde_set_color_primaries(x, val)          viddec_fw_bitfields_insert ( (x)->seq_disp_ext_item_2, val,  0, 0xFF)
-#define viddec_fw_mp2_sde_set_transfer_characteristics(x, val) viddec_fw_bitfields_insert ( (x)->seq_disp_ext_item_2, val,  8, 0xFF)
-            unsigned int seq_disp_ext_item_2;
-
-            unsigned int pad;
-        } mp2_sde; // mp2 item of type VIDDEC_WORKLOAD_DISPLAY_INFO
-        struct
-        {
-            // Group of Pictures Header Item I (From LSB):
-            //   - closed_gop - 1 bit
-            //   - broken_link - 1 bit
-            //   - remaining pad bits
-#define viddec_fw_mp2_gop_get_closed_gop(x)  viddec_fw_bitfields_extract( (x)->gop_hdr_item_1,  0, 0x1)
-#define viddec_fw_mp2_gop_get_broken_link(x) viddec_fw_bitfields_extract( (x)->gop_hdr_item_1,  1, 0x1)
-#define viddec_fw_mp2_gop_set_closed_gop(x, val)  viddec_fw_bitfields_insert ( (x)->gop_hdr_item_1, val,  0, 0x1)
-#define viddec_fw_mp2_gop_set_broken_link(x, val) viddec_fw_bitfields_insert ( (x)->gop_hdr_item_1, val,  1, 0x1)
-            unsigned int gop_hdr_item_1;
-
-            unsigned int pad1;
-            unsigned int pad2;
-        } mp2_gop; // mp2 item of type VIDDEC_WORKLOAD_GOP_INFO
-        struct
-        {
-#define viddec_fw_vc1_get_profile(x) viddec_fw_bitfields_extract((x)->size, 30, 0x3)
-#define viddec_fw_vc1_set_profile(x, val) viddec_fw_bitfields_insert((x)->size, val, 30, 0x3)
-
-#define viddec_fw_vc1_get_level(x) viddec_fw_bitfields_extract((x)->size, 27, 0x7)
-#define viddec_fw_vc1_set_level(x, val) viddec_fw_bitfields_insert((x)->size, val, 27, 0x7)
-
-#define viddec_fw_vc1_get_colordiff_format(x) viddec_fw_bitfields_extract((x)->size, 25, 0x3)
-#define viddec_fw_vc1_set_colordiff_format(x, val) viddec_fw_bitfields_insert((x)->size, val, 25, 0x3)
-
-#define viddec_fw_vc1_get_pulldown(x) viddec_fw_bitfields_extract((x)->size, 24, 0x1)
-#define viddec_fw_vc1_set_pulldown(x, val) viddec_fw_bitfields_insert((x)->size, val, 24, 0x1)
-
-#define viddec_fw_vc1_get_max_coded_width(x) viddec_fw_bitfields_extract((x)->size, 12, 0xFFF)
-#define viddec_fw_vc1_set_max_coded_width(x, val) viddec_fw_bitfields_insert((x)->size, val, 12, 0xFFF)
-
-#define viddec_fw_vc1_get_max_coded_height(x) viddec_fw_bitfields_extract((x)->size, 0, 0xFFF)
-#define viddec_fw_vc1_set_max_coded_height(x, val) viddec_fw_bitfields_insert((x)->size, val, 0, 0xFFF)
-
-#define viddec_fw_vc1_get_bitrtq_postproc(x) viddec_fw_bitfields_extract((x)->flags, 8, 0x1F)
-#define viddec_fw_vc1_set_bitrtq_postproc(x, val) viddec_fw_bitfields_insert((x)->flags, val, 8, 0x1F)
-
-#define viddec_fw_vc1_get_frmrtq_postproc(x) viddec_fw_bitfields_extract((x)->flags, 5, 0x7)
-#define viddec_fw_vc1_set_frmrtq_postproc(x, val) viddec_fw_bitfields_insert((x)->flags, val, 5, 0x7)
-
-#define viddec_fw_vc1_get_interlace(x) viddec_fw_bitfields_extract((x)->flags, 4, 0x1)
-#define viddec_fw_vc1_set_interlace(x, val) viddec_fw_bitfields_insert((x)->flags, val, 4, 0x1)
-
-#define viddec_fw_vc1_get_tfcntrflag(x) viddec_fw_bitfields_extract((x)->flags, 3, 0x1)
-#define viddec_fw_vc1_set_tfcntrflag(x, val) viddec_fw_bitfields_insert((x)->flags, val, 3, 0x1)
-
-#define viddec_fw_vc1_get_finterpflag(x) viddec_fw_bitfields_extract((x)->flags, 2, 0x1)
-#define viddec_fw_vc1_set_finterpflag(x, val) viddec_fw_bitfields_insert((x)->flags, val, 2, 0x1)
-
-#define viddec_fw_vc1_get_psf(x) viddec_fw_bitfields_extract((x)->flags, 1, 0x1)
-#define viddec_fw_vc1_set_psf(x, val) viddec_fw_bitfields_insert((x)->flags, val, 1, 0x1)
-
-#define viddec_fw_vc1_get_display_ext(x) viddec_fw_bitfields_extract((x)->flags, 0, 0x1)
-#define viddec_fw_vc1_set_display_ext(x, val) viddec_fw_bitfields_insert((x)->flags, val, 0, 0x1)
-
-            uint32_t size;    // profile:2, level:3, colordiff_format:2, pulldown:1, max_coded_width:12, max_coded_height:12
-            uint32_t flags;   // bitrtq_postproc:5, frmrtq_postproc:3, interlace:1, tfcntrflag:1, finterpflag:1, psf:1, display_ext:1
-            uint32_t pad;
-        } vc1_sl; // vc1 item of type VIDDEC_WORKLOAD_SEQUENCE_INFO
-        struct
-        {
-            // This item is populated when display_ext flag is set in the sequence layer
-            // therefore, no need to provide this flag
-#define viddec_fw_vc1_get_disp_horiz_size(x) viddec_fw_bitfields_extract((x)->size, 18, 0x3FFF)
-#define viddec_fw_vc1_set_disp_horiz_size(x, val) viddec_fw_bitfields_insert((x)->size, val, 18, 0x3FFF)
-
-#define viddec_fw_vc1_get_disp_vert_size(x) viddec_fw_bitfields_extract((x)->size, 4, 0x3FFF)
-#define viddec_fw_vc1_set_disp_vert_size(x, val) viddec_fw_bitfields_insert((x)->size, val, 4, 0x3FFF)
-
-#define viddec_fw_vc1_get_disp_aspect_ratio_flag(x) viddec_fw_bitfields_extract((x)->size, 3, 0x1)
-#define viddec_fw_vc1_set_disp_aspect_ratio_flag(x, val) viddec_fw_bitfields_insert((x)->size, val, 3, 0x1)
-
-#define viddec_fw_vc1_get_disp_color_format_flag(x) viddec_fw_bitfields_extract((x)->size, 2, 0x1)
-#define viddec_fw_vc1_set_disp_color_format_flag(x, val) viddec_fw_bitfields_insert((x)->size, val, 2, 0x1)
-
-#define viddec_fw_vc1_get_disp_framerate_flag(x) viddec_fw_bitfields_extract((x)->size, 1, 0x1)
-#define viddec_fw_vc1_set_disp_framerate_flag(x, val) viddec_fw_bitfields_insert((x)->size, val, 1, 0x1)
-
-#define viddec_fw_vc1_get_disp_framerateind(x) viddec_fw_bitfields_extract((x)->size, 0, 0x1)
-#define viddec_fw_vc1_set_disp_framerateind(x, val) viddec_fw_bitfields_insert((x)->size, val, 0, 0x1)
-
-#define viddec_fw_vc1_get_disp_aspect_ratio(x) viddec_fw_bitfields_extract((x)->framerate, 28, 0xF)
-#define viddec_fw_vc1_set_disp_aspect_ratio(x, val) viddec_fw_bitfields_insert((x)->framerate, val, 28, 0xF)
-
-#define viddec_fw_vc1_get_disp_frameratenr(x) viddec_fw_bitfields_extract((x)->framerate, 20, 0xFF)
-#define viddec_fw_vc1_set_disp_frameratenr(x, val) viddec_fw_bitfields_insert((x)->framerate, val, 20, 0xFF)
-
-#define viddec_fw_vc1_get_disp_frameratedr(x) viddec_fw_bitfields_extract((x)->framerate, 16, 0xF)
-#define viddec_fw_vc1_set_disp_frameratedr(x, val) viddec_fw_bitfields_insert((x)->framerate, val, 16, 0xF)
-
-#define viddec_fw_vc1_get_disp_framerateexp(x) viddec_fw_bitfields_extract((x)->framerate, 0, 0xFFFF)
-#define viddec_fw_vc1_set_disp_framerateexp(x, val) viddec_fw_bitfields_insert((x)->framerate, val, 0, 0xFFFF)
-
-#define viddec_fw_vc1_get_disp_aspect_ratio_horiz_size(x) viddec_fw_bitfields_extract((x)->aspectsize, 24, 0xFF)
-#define viddec_fw_vc1_set_disp_aspect_ratio_horiz_size(x, val) viddec_fw_bitfields_insert((x)->aspectsize, val, 24, 0xFF)
-
-#define viddec_fw_vc1_get_disp_aspect_ratio_vert_size(x) viddec_fw_bitfields_extract((x)->aspectsize, 16, 0xFF)
-#define viddec_fw_vc1_set_disp_aspect_ratio_vert_size(x, val) viddec_fw_bitfields_insert((x)->aspectsize, val, 16, 0xFF)
-
-#define viddec_fw_vc1_get_disp_color_prim(x) viddec_fw_bitfields_extract((x)->aspectsize, 8, 0xFF)
-#define viddec_fw_vc1_set_disp_color_prim(x, val) viddec_fw_bitfields_insert((x)->aspectsize, val, 8, 0xFF)
-
-#define viddec_fw_vc1_get_disp_transfer_char(x) viddec_fw_bitfields_extract((x)->aspectsize, 0, 0xFF)
-#define viddec_fw_vc1_set_disp_transfer_char(x, val) viddec_fw_bitfields_insert((x)->aspectsize, val, 0, 0xFF)
-
-            uint32_t size; // disp_horiz_size:14, disp_vert_size:14, aspect_ratio_flag:1, color_format_flag:1, framerate_flag:1, framerateind:1
-            uint32_t framerate;  // aspect_ratio:4, frameratenr:8, frameratedr:4, framerateexp:16
-            uint32_t aspectsize; // aspect_ratio_horiz_size:8, aspect_ratio_vert_size:8, color_prim:8, transfer_char:8
-        } vc1_sl_de; // vc1 item of type VIDDEC_WORKLOAD_DISPLAY_INFO
-        struct
-        {
-#define viddec_fw_vc1_get_rcv_horiz_size(x) viddec_fw_bitfields_extract((x)->size, 16, 0xFFFF)
-#define viddec_fw_vc1_set_rcv_horiz_size(x, val) viddec_fw_bitfields_insert((x)->size, val, 16, 0xFFFF)
-
-#define viddec_fw_vc1_get_rcv_vert_size(x) viddec_fw_bitfields_extract((x)->size, 0, 0xFFFF)
-#define viddec_fw_vc1_set_rcv_vert_size(x, val) viddec_fw_bitfields_insert((x)->size, val, 0, 0xFFFF)
-
-#define viddec_fw_vc1_get_rcv_bitrtq_postproc(x) viddec_fw_bitfields_extract((x)->flags, 16, 0x1F)
-#define viddec_fw_vc1_set_rcv_bitrtq_postproc(x, val) viddec_fw_bitfields_insert((x)->flags, val, 16, 0x1F)
-
-#define viddec_fw_vc1_get_rcv_frmrtq_postproc(x) viddec_fw_bitfields_extract((x)->flags, 13, 0x7)
-#define viddec_fw_vc1_set_rcv_frmrtq_postproc(x, val) viddec_fw_bitfields_insert((x)->flags, val, 13, 0x7)
-
-#define viddec_fw_vc1_get_rcv_profile(x) viddec_fw_bitfields_extract((x)->flags, 9, 0xF)
-#define viddec_fw_vc1_set_rcv_profile(x, val) viddec_fw_bitfields_insert((x)->flags, val, 9, 0xF)
-
-#define viddec_fw_vc1_get_rcv_level(x) viddec_fw_bitfields_extract((x)->flags, 6, 0x7)
-#define viddec_fw_vc1_set_rcv_level(x, val) viddec_fw_bitfields_insert((x)->flags, val, 6, 0x7)
-
-#define viddec_fw_vc1_get_rcv_cbr(x) viddec_fw_bitfields_extract((x)->flags, 5, 0x1)
-#define viddec_fw_vc1_set_rcv_cbr(x, val) viddec_fw_bitfields_insert((x)->flags, val, 5, 0x1)
-
-#define viddec_fw_vc1_get_rcv_rangered(x) viddec_fw_bitfields_extract((x)->flags, 4, 0x1)
-#define viddec_fw_vc1_set_rcv_rangered(x, val) viddec_fw_bitfields_insert((x)->flags, val, 4, 0x1)
-
-#define viddec_fw_vc1_get_rcv_maxbframes(x) viddec_fw_bitfields_extract((x)->flags, 1, 0x7)
-#define viddec_fw_vc1_set_rcv_maxbframes(x, val) viddec_fw_bitfields_insert((x)->flags, val, 1, 0x7)
-
-#define viddec_fw_vc1_get_rcv_finterpflag(x) viddec_fw_bitfields_extract((x)->flags, 0, 0x1)
-#define viddec_fw_vc1_set_rcv_finterpflag(x, val) viddec_fw_bitfields_insert((x)->flags, val, 0, 0x1)
-
-            uint32_t size;    // horiz_size:16, vert_size:16
-            uint32_t flags;   // bitrtq_postproc:5, frmrtq_postproc:3, profile:4, level:3, cbr:1, rangered:1, maxbframes:3, finterpflag:1
-            uint32_t pad;
-        } vc1_sh_struct_a_c; // vc1 item of type VIDDEC_WORKLOAD_VC1_SEQ_HDR_STRUCT_A_C
-        struct
-        {
-#define viddec_fw_vc1_get_ep_size_flag(x) viddec_fw_bitfields_extract((x)->size, 24, 0x1)
-#define viddec_fw_vc1_set_ep_size_flag(x, val) viddec_fw_bitfields_insert((x)->size, val, 24, 0x1)
-
-#define viddec_fw_vc1_get_ep_horiz_size(x) viddec_fw_bitfields_extract((x)->size, 12, 0xFFF)
-#define viddec_fw_vc1_set_ep_horiz_size(x, val) viddec_fw_bitfields_insert((x)->size, val, 12, 0xFFF)
-
-#define viddec_fw_vc1_get_ep_vert_size(x) viddec_fw_bitfields_extract((x)->size, 0, 0xFFF)
-#define viddec_fw_vc1_set_ep_vert_size(x, val) viddec_fw_bitfields_insert((x)->size, val, 0, 0xFFF)
-
-#define viddec_fw_vc1_get_ep_broken_link(x) viddec_fw_bitfields_extract((x)->flags, 10, 0x1)
-#define viddec_fw_vc1_set_ep_broken_link(x, val) viddec_fw_bitfields_insert((x)->flags, val, 10, 0x1)
-
-#define viddec_fw_vc1_get_ep_closed_entry(x) viddec_fw_bitfields_extract((x)->flags, 9, 0x1)
-#define viddec_fw_vc1_set_ep_closed_entry(x, val) viddec_fw_bitfields_insert((x)->flags, val, 9, 0x1)
-
-#define viddec_fw_vc1_get_ep_panscan_flag(x) viddec_fw_bitfields_extract((x)->flags, 8, 0x1)
-#define viddec_fw_vc1_set_ep_panscan_flag(x, val) viddec_fw_bitfields_insert((x)->flags, val, 8, 0x1)
-
-#define viddec_fw_vc1_get_ep_range_mapy_flag(x) viddec_fw_bitfields_extract((x)->flags, 7, 0x1)
-#define viddec_fw_vc1_set_ep_range_mapy_flag(x, val) viddec_fw_bitfields_insert((x)->flags, val, 7, 0x1)
-
-#define viddec_fw_vc1_get_ep_range_mapy(x) viddec_fw_bitfields_extract((x)->flags, 4, 0x7)
-#define viddec_fw_vc1_set_ep_range_mapy(x, val) viddec_fw_bitfields_insert((x)->flags, val, 4, 0x7)
-
-#define viddec_fw_vc1_get_ep_range_mapuv_flag(x) viddec_fw_bitfields_extract((x)->flags, 3, 0x1)
-#define viddec_fw_vc1_set_ep_range_mapuv_flag(x, val) viddec_fw_bitfields_insert((x)->flags, val, 3, 0x1)
-
-#define viddec_fw_vc1_get_ep_range_mapuv(x) viddec_fw_bitfields_extract((x)->flags, 0, 0x7)
-#define viddec_fw_vc1_set_ep_range_mapuv(x, val) viddec_fw_bitfields_insert((x)->flags, val, 0, 0x7)
-
-            uint32_t size;    // coded_size_flag:1, coded_width:12, coded_height:12
-            uint32_t flags;   // broken_link:1, closed_entry:1, panscan_flag:1, range_mapy_flag:1, range_mapy:3, range_mapuv_flag:1, range_mapuv:3
-            uint32_t pad;
-        } vc1_ep; // vc1 item of type VIDDEC_WORKLOAD_GOP_INFO
-        struct
-        {
-            /*
-              0-7 bits for profile_idc.
-              8-15 bits for level_idc.
-              16-17 bits for chroma_format_idc.
-              18-22 bits for num_ref_frames.
-              23  for gaps_in_frame_num_value_allowed_flag.
-              24 for frame_mbs_only_flag.
-              25 for frame_cropping_flag.
-              26 for vui_parameters_present_flag.
-             */
-#define viddec_fw_h264_sps_get_profile_idc(x)  viddec_fw_bitfields_extract( (x)->sps_messages, 0, 0xFF)
-#define viddec_fw_h264_sps_set_profile_idc(x, val)  viddec_fw_bitfields_insert( (x)->sps_messages, val, 0, 0xFF)
-#define viddec_fw_h264_sps_get_level_idc(x)  viddec_fw_bitfields_extract( (x)->sps_messages, 8, 0xFF)
-#define viddec_fw_h264_sps_set_level_idc(x, val)  viddec_fw_bitfields_insert( (x)->sps_messages, val, 8, 0xFF)
-#define viddec_fw_h264_sps_get_chroma_format_idc(x)  viddec_fw_bitfields_extract( (x)->sps_messages, 16, 0x3)
-#define viddec_fw_h264_sps_set_chroma_format_idc(x, val)  viddec_fw_bitfields_insert( (x)->sps_messages, val, 16, 0x3)
-#define viddec_fw_h264_sps_get_num_ref_frames(x)  viddec_fw_bitfields_extract( (x)->sps_messages, 18, 0x1F)
-#define viddec_fw_h264_sps_set_num_ref_frames(x, val)  viddec_fw_bitfields_insert( (x)->sps_messages, val, 18, 0x1F)
-#define viddec_fw_h264_sps_get_gaps_in_frame_num_value_allowed_flag(x)  viddec_fw_bitfields_extract( (x)->sps_messages, 23, 0x1)
-#define viddec_fw_h264_sps_set_gaps_in_frame_num_value_allowed_flag(x, val)  viddec_fw_bitfields_insert( (x)->sps_messages, val, 23, 0x1)
-#define viddec_fw_h264_sps_get_frame_mbs_only_flag(x)  viddec_fw_bitfields_extract( (x)->sps_messages, 24, 0x1)
-#define viddec_fw_h264_sps_set_frame_mbs_only_flag(x, val)  viddec_fw_bitfields_insert( (x)->sps_messages, val, 24, 0x1)
-#define viddec_fw_h264_sps_get_frame_cropping_flag(x)  viddec_fw_bitfields_extract( (x)->sps_messages, 25, 0x1)
-#define viddec_fw_h264_sps_set_frame_cropping_flag(x, val)  viddec_fw_bitfields_insert( (x)->sps_messages, val, 25, 0x1)
-#define viddec_fw_h264_sps_get_vui_parameters_present_flag(x)  viddec_fw_bitfields_extract( (x)->sps_messages, 26, 0x1)
-#define viddec_fw_h264_sps_set_vui_parameters_present_flag(x, val)  viddec_fw_bitfields_insert( (x)->sps_messages, val, 26, 0x1)
-            unsigned int sps_messages;
-            unsigned int pic_width_in_mbs_minus1;
-            unsigned int pic_height_in_map_units_minus1;
-        } h264_sps; // h264 item of type VIDDEC_WORKLOAD_SEQUENCE_INFO
-
-        struct h264_witem_sps_mvc_id h264_sps_mvc_id;
-
-        struct
-        {
-#define viddec_fw_h264_cropping_get_left(x)  viddec_fw_bitfields_extract( (x)->left_right, 16, 0xFFFF)
-#define viddec_fw_h264_cropping_get_right(x) viddec_fw_bitfields_extract( (x)->left_right, 0, 0xFFFF)
-#define viddec_fw_h264_cropping_set_left(x, val)  viddec_fw_bitfields_insert( (x)->left_right, val, 16, 0xFFFF)
-#define viddec_fw_h264_cropping_set_right(x, val) viddec_fw_bitfields_insert( (x)->left_right, val, 0, 0xFFFF)
-            unsigned int left_right; /* Left in upper 16 bits and right in Lower 16 bits */
-#define viddec_fw_h264_cropping_get_top(x)  viddec_fw_bitfields_extract( (x)->top_bottom, 16, 0xFFFF)
-#define viddec_fw_h264_cropping_get_bottom(x) viddec_fw_bitfields_extract( (x)->top_bottom, 0, 0xFFFF)
-#define viddec_fw_h264_cropping_set_top(x, val)  viddec_fw_bitfields_insert( (x)->top_bottom, val, 16, 0xFFFF)
-#define viddec_fw_h264_cropping_set_bottom(x, val) viddec_fw_bitfields_insert( (x)->top_bottom, val, 0, 0xFFFF)
-            unsigned int top_bottom; /* top in upper 16 bits and bottom in lower 16 bits */
-            unsigned int pad;
-        } h264_cropping; // h264 item of type VIDDEC_WORKLOAD_H264_CROPPING
-
-        struct
-        {
-            /* 0 bit for aspect_ratio_info_present_flag
-               1 st bit for video_signal_type_present_flag
-               2 nd bit for colour_description_present_flag
-               3 rd bit for timing_info_present_flag
-               4 th bit for nal_hrd_parameters_present_flag
-               5 th bit for vcl_hrd_parameters_present_flag
-               6 th bit for fixed_frame_rate_flag
-               7 th bit for pic_struct_present_flag
-               8 th bit for low_delay_hrd_flag
-               9,10,11 bits for video_format
-            */
-#define viddec_fw_h264_vui_get_aspect_ratio_info_present_flag(x)  viddec_fw_bitfields_extract( (x)->vui_flags_and_format, 0, 0x1)
-#define viddec_fw_h264_vui_set_aspect_ratio_info_present_flag(x, val)  viddec_fw_bitfields_insert( (x)->vui_flags_and_format, val, 0, 0x1)
-#define viddec_fw_h264_vui_get_video_signal_type_present_flag(x)  viddec_fw_bitfields_extract( (x)->vui_flags_and_format, 1, 0x1)
-#define viddec_fw_h264_vui_set_video_signal_type_present_flag(x, val)  viddec_fw_bitfields_insert( (x)->vui_flags_and_format, val, 1, 0x1)
-#define viddec_fw_h264_vui_get_colour_description_present_flag(x)  viddec_fw_bitfields_extract( (x)->vui_flags_and_format, 2, 0x1)
-#define viddec_fw_h264_vui_set_colour_description_present_flag(x, val)  viddec_fw_bitfields_insert( (x)->vui_flags_and_format, val, 2, 0x1)
-#define viddec_fw_h264_vui_get_timing_info_present_flag(x)  viddec_fw_bitfields_extract( (x)->vui_flags_and_format, 3, 0x1)
-#define viddec_fw_h264_vui_set_timing_info_present_flag(x, val)  viddec_fw_bitfields_insert( (x)->vui_flags_and_format, val, 3, 0x1)
-#define viddec_fw_h264_vui_get_nal_hrd_parameters_present_flag(x)  viddec_fw_bitfields_extract( (x)->vui_flags_and_format, 4, 0x1)
-#define viddec_fw_h264_vui_set_nal_hrd_parameters_present_flag(x, val)  viddec_fw_bitfields_insert( (x)->vui_flags_and_format, val, 4, 0x1)
-#define viddec_fw_h264_vui_get_vcl_hrd_parameters_present_flag(x)  viddec_fw_bitfields_extract( (x)->vui_flags_and_format, 5, 0x1)
-#define viddec_fw_h264_vui_set_vcl_hrd_parameters_present_flag(x, val)  viddec_fw_bitfields_insert( (x)->vui_flags_and_format, val, 5, 0x1)
-#define viddec_fw_h264_vui_get_fixed_frame_rate_flag(x)  viddec_fw_bitfields_extract( (x)->vui_flags_and_format, 6, 0x1)
-#define viddec_fw_h264_vui_set_fixed_frame_rate_flag(x, val)  viddec_fw_bitfields_insert( (x)->vui_flags_and_format, val, 6, 0x1)
-#define viddec_fw_h264_vui_get_pic_struct_present_flag(x)  viddec_fw_bitfields_extract( (x)->vui_flags_and_format, 7, 0x1)
-#define viddec_fw_h264_vui_set_pic_struct_present_flag(x, val)  viddec_fw_bitfields_insert( (x)->vui_flags_and_format, val, 7, 0x1)
-#define viddec_fw_h264_vui_get_low_delay_hrd_flag(x)  viddec_fw_bitfields_extract( (x)->vui_flags_and_format, 8, 0x1)
-#define viddec_fw_h264_vui_set_low_delay_hrd_flag(x, val)  viddec_fw_bitfields_insert( (x)->vui_flags_and_format, val, 8, 0x1)
-#define viddec_fw_h264_vui_get_video_format(x)  viddec_fw_bitfields_extract( (x)->vui_flags_and_format, 9, 0x7)
-#define viddec_fw_h264_vui_set_video_format(x, val)  viddec_fw_bitfields_insert( (x)->vui_flags_and_format, val, 9, 0x7)
-            unsigned int vui_flags_and_format;
-
-#define viddec_fw_h264_vui_get_aspect_ratio_idc(x)  viddec_fw_bitfields_extract( (x)->aspc_color_transfer, 0, 0xFF)
-#define viddec_fw_h264_vui_set_aspect_ratio_idc(x, val)  viddec_fw_bitfields_insert( (x)->aspc_color_transfer, val, 0, 0xFF)
-#define viddec_fw_h264_vui_get_colour_primaries(x)  viddec_fw_bitfields_extract( (x)->aspc_color_transfer, 8, 0xFF)
-#define viddec_fw_h264_vui_set_colour_primaries(x, val)  viddec_fw_bitfields_insert( (x)->aspc_color_transfer, val, 8, 0xFF)
-#define viddec_fw_h264_vui_get_transfer_characteristics(x)  viddec_fw_bitfields_extract( (x)->aspc_color_transfer, 16, 0xFF)
-#define viddec_fw_h264_vui_set_transfer_characteristics(x, val)  viddec_fw_bitfields_insert( (x)->aspc_color_transfer, val, 16, 0xFF)
-            /* lower 8 bits for aspect_ratio, next 8bits for color primaries and next 8 bits for transfer characteristics */
-            unsigned int aspc_color_transfer;
-
-#define viddec_fw_h264_vui_get_sar_width(x)  viddec_fw_bitfields_extract( (x)->sar_width_height, 16, 0xFFFF)
-#define viddec_fw_h264_vui_get_sar_height(x) viddec_fw_bitfields_extract( (x)->sar_width_height, 0, 0xFFFF)
-#define viddec_fw_h264_vui_set_sar_width(x, val)  viddec_fw_bitfields_insert( (x)->sar_width_height, val, 16, 0xFFFF)
-#define viddec_fw_h264_vui_set_sar_height(x, val) viddec_fw_bitfields_insert( (x)->sar_width_height, val, 0, 0xFFFF)
-            unsigned int sar_width_height; /* Lower 16 for height upper 16 for width */
-        } h264_vui; // h264 item of type VIDDEC_WORKLOAD_DISPLAY_INFO
-        struct
-        {
-#define viddec_fw_h264_vui_get_num_units_in_tick_flag(x)  viddec_fw_bitfields_extract( (x)->num_units_in_tick, 0, 0xFFFFFFFF)
-#define viddec_fw_h264_vui_set_num_units_in_tick_flag(x, val)  viddec_fw_bitfields_insert( (x)->num_units_in_tick, val, 0, 0xFFFFFFFF)
-#define viddec_fw_h264_vui_get_time_scale_flag(x)  viddec_fw_bitfields_extract( (x)->time_scale, 0, 0xFFFFFFFF)
-#define viddec_fw_h264_vui_set_time_scale_flag(x, val)  viddec_fw_bitfields_insert( (x)->time_scale, val, 0, 0xFFFFFFFF)
-            unsigned int num_units_in_tick;
-            unsigned int time_scale;
-            unsigned int pad1;
-        } h264_vui_time_info; // VIDDEC_WORKLOAD_H264_VUI_TIMING_INFO
-        struct
-        {
-            unsigned int pic_struct; /* 4 bit length */
-            unsigned int pad1;
-            unsigned int pad2;
-        } h264_sei_pic_timing; // h264 item of type VIDDEC_WORKLOAD_SEI_PIC_TIMING
-        struct
-        {
-            unsigned int pan_scan_rect_id;
-
-#define viddec_fw_h264_sei_pan_scan_get_cancel_flag(x)  viddec_fw_bitfields_extract( (x)->pan_scan_cancel_and_cnt, 0, 0x1)
-#define viddec_fw_h264_sei_pan_scan_get_cnt_minus1(x) viddec_fw_bitfields_extract( (x)->pan_scan_cancel_and_cnt, 1, 0x3)
-#define viddec_fw_h264_sei_pan_scan_set_cancel_flag(x, val)  viddec_fw_bitfields_insert( (x)->pan_scan_cancel_and_cnt, val, 0, 0x1)
-#define viddec_fw_h264_sei_pan_scan_set_cnt_minus1(x, val) viddec_fw_bitfields_insert( (x)->pan_scan_cancel_and_cnt, val, 1, 0x3)
-            unsigned int pan_scan_cancel_and_cnt; /* 0 bit for cancel flag and 2 bits for cnt_minus1 */
-            unsigned int pan_scan_rect_repetition_period;
-        } h264_sei_pan_scan; // h264 item of type VIDDEC_WORKLOAD_H264_PAN_SCAN
-
-        struct
-        {
-
-#define viddec_fw_h264_pan_scan_get_left(x)  viddec_fw_bitfields_extract( (x)->left_right, 16, 0xFFFF)
-#define viddec_fw_h264_pan_scan_get_right(x) viddec_fw_bitfields_extract( (x)->left_right, 0, 0xFFFF)
-#define viddec_fw_h264_pan_scan_set_left(x, val)  viddec_fw_bitfields_insert( (x)->left_right, val, 16, 0xFFFF)
-#define viddec_fw_h264_pan_scan_set_right(x, val) viddec_fw_bitfields_insert( (x)->left_right, val, 0, 0xFFFF)
-            unsigned int left_right; /* Left in upper 16 bits and right in Lower 16 bits */
-
-#define viddec_fw_h264_pan_scan_get_top(x)  viddec_fw_bitfields_extract( (x)->top_bottom, 16, 0xFFFF)
-#define viddec_fw_h264_pan_scan_get_bottom(x) viddec_fw_bitfields_extract( (x)->top_bottom, 0, 0xFFFF)
-#define viddec_fw_h264_pan_scan_set_top(x, val)  viddec_fw_bitfields_insert( (x)->top_bottom, val, 16, 0xFFFF)
-#define viddec_fw_h264_pan_scan_set_bottom(x, val) viddec_fw_bitfields_insert( (x)->top_bottom, val, 0, 0xFFFF)
-            unsigned int top_bottom; /* top in upper 16 bits and bottom in lower 16 bits */
-
-            unsigned int pad;
-        } h264_pan_scan_rect; // h264 item of type VIDDEC_WORKLOAD_SEI_PAN_SCAN_RECT
-        struct
-        {
-            unsigned int recovery_frame_cnt;
-#define viddec_fw_h264_h264_sei_recovery_get_exact_match_flag(x)  viddec_fw_bitfields_extract( (x)->broken_and_exctmatch_flags, 0, 0x1)
-#define viddec_fw_h264_h264_sei_recovery_get_broken_link_flag(x) viddec_fw_bitfields_extract( (x)->broken_and_exctmatch_flags, 1, 0x1)
-#define viddec_fw_h264_h264_sei_recovery_set_exact_match_flag(x, val)  viddec_fw_bitfields_insert( (x)->broken_and_exctmatch_flags, val, 0, 0x1)
-#define viddec_fw_h264_h264_sei_recovery_set_broken_link_flag(x, val) viddec_fw_bitfields_insert( (x)->broken_and_exctmatch_flags, val, 1, 0x1)
-            unsigned int broken_and_exctmatch_flags; /* 0 bit for exact match, 1 bit for brokenlink */
-
-            unsigned int changing_slice_group_idc; /* 2bit value for slice_group idc */
-
-        } h264_sei_recovery_point; // h264 item of type VIDDEC_WORKLOAD_SEI_RECOVERY_POINT
-
-
-        struct
-        {
-            // Visual Sequence (From LSB):
-            //   - profile_and_level_indication - 8 bits
-#define viddec_fw_mp4_vs_get_profile_and_level_indication(x)      viddec_fw_bitfields_extract( (x)->vs_item,  0, 0xFF)
-#define viddec_fw_mp4_vs_set_profile_and_level_indication(x, val) viddec_fw_bitfields_insert ( (x)->vs_item, val,  0, 0xFF)
-            unsigned int vs_item;
-
-            // Visual Object - video_signal_type
-            //   - video_signal_type - 1b
-            //   - video_format - 3b
-            //   - video_range - 1b
-            //   - colour_description - 1b
-#define viddec_fw_mp4_vo_get_colour_description(x)      viddec_fw_bitfields_extract( (x)->video_signal_type, 5, 0x1)
-#define viddec_fw_mp4_vo_set_colour_description(x, val) viddec_fw_bitfields_insert ( (x)->video_signal_type, val, 5, 0x1)
-#define viddec_fw_mp4_vo_get_video_range(x)      viddec_fw_bitfields_extract( (x)->video_signal_type, 4, 0x1)
-#define viddec_fw_mp4_vo_set_video_range(x, val) viddec_fw_bitfields_insert ( (x)->video_signal_type, val, 4, 0x1)
-#define viddec_fw_mp4_vo_get_video_format(x)      viddec_fw_bitfields_extract( (x)->video_signal_type,  1, 0x7)
-#define viddec_fw_mp4_vo_set_video_format(x, val) viddec_fw_bitfields_insert ( (x)->video_signal_type, val,  1, 0x7)
-#define viddec_fw_mp4_vo_get_video_signal_type(x)      viddec_fw_bitfields_extract( (x)->video_signal_type,  0, 0x1)
-#define viddec_fw_mp4_vo_set_video_signal_type(x, val) viddec_fw_bitfields_insert ( (x)->video_signal_type, val,  0, 0x1)
-            unsigned int video_signal_type;
-
-            // Visual Object - video_signal_type
-            //   - color_primaries - 8 bits
-            //   - transfer_characteristics - 8 bits
-#define viddec_fw_mp4_vo_get_transfer_char(x)      viddec_fw_bitfields_extract( (x)->color_desc,  8, 0xFF)
-#define viddec_fw_mp4_vo_set_transfer_char(x, val) viddec_fw_bitfields_insert ( (x)->color_desc, val,  8, 0xFF)
-#define viddec_fw_mp4_vo_get_color_primaries(x)      viddec_fw_bitfields_extract( (x)->color_desc,  0, 0xFF)
-#define viddec_fw_mp4_vo_set_color_primaries(x, val) viddec_fw_bitfields_insert ( (x)->color_desc, val,  0, 0xFF)
-            unsigned int color_desc;
-        } mp4_vs_vo; // mp4 item of type VIDDEC_WORKLOAD_MPEG4_VISUAL_SEQ_OBJ
-
-        struct
-        {
-            // Video Object Layer(From LSB):
-            //   - aspect_ratio_info - 4b
-            //   - par_width - 8b
-            //   - par_height - 8b
-            //   - vol_control_param - 1b
-            //   - chroma_format - 2b
-            //   - interlaced - 1b
-            //   - fixed_vop_rate - 1b
-#define viddec_fw_mp4_vol_get_fixed_vop_rate(x)      viddec_fw_bitfields_extract( (x)->vol_aspect_ratio, 24, 0x1)
-#define viddec_fw_mp4_vol_set_fixed_vop_rate(x, val) viddec_fw_bitfields_insert ( (x)->vol_aspect_ratio, val, 24, 0x1)
-#define viddec_fw_mp4_vol_get_interlaced(x)      viddec_fw_bitfields_extract( (x)->vol_aspect_ratio, 23, 0x1)
-#define viddec_fw_mp4_vol_set_interlaced(x, val) viddec_fw_bitfields_insert ( (x)->vol_aspect_ratio, val, 23, 0x1)
-#define viddec_fw_mp4_vol_get_chroma_format(x)      viddec_fw_bitfields_extract( (x)->vol_aspect_ratio, 21, 0x3)
-#define viddec_fw_mp4_vol_set_chroma_format(x, val) viddec_fw_bitfields_insert ( (x)->vol_aspect_ratio, val, 21, 0x3)
-#define viddec_fw_mp4_vol_get_control_param(x)      viddec_fw_bitfields_extract( (x)->vol_aspect_ratio, 20, 0x1)
-#define viddec_fw_mp4_vol_set_control_param(x, val) viddec_fw_bitfields_insert ( (x)->vol_aspect_ratio, val, 20, 0x1)
-#define viddec_fw_mp4_vol_get_par_height(x)      viddec_fw_bitfields_extract( (x)->vol_aspect_ratio, 12, 0xFF)
-#define viddec_fw_mp4_vol_set_par_height(x, val) viddec_fw_bitfields_insert ( (x)->vol_aspect_ratio, val, 12, 0xFF)
-#define viddec_fw_mp4_vol_get_par_width(x)      viddec_fw_bitfields_extract( (x)->vol_aspect_ratio, 4, 0xFF)
-#define viddec_fw_mp4_vol_set_par_width(x, val) viddec_fw_bitfields_insert ( (x)->vol_aspect_ratio, val, 4, 0xFF)
-#define viddec_fw_mp4_vol_get_aspect_ratio_info(x)      viddec_fw_bitfields_extract( (x)->vol_aspect_ratio, 0, 0xF)
-#define viddec_fw_mp4_vol_set_aspect_ratio_info(x, val) viddec_fw_bitfields_insert ( (x)->vol_aspect_ratio, val, 0, 0xF)
-            unsigned int vol_aspect_ratio;
-
-            // Video Object Layer(From LSB):
-            //   - vbv_parameters - 1b
-            //   - bit_rate - 30b
-#define viddec_fw_mp4_vol_get_bit_rate(x)      viddec_fw_bitfields_extract( (x)->vol_bit_rate, 1, 0x3FFFFFFF)
-#define viddec_fw_mp4_vol_set_bit_rate(x, val) viddec_fw_bitfields_insert ( (x)->vol_bit_rate, val, 1, 0x3FFFFFFF)
-#define viddec_fw_mp4_vol_get_vbv_param(x)      viddec_fw_bitfields_extract( (x)->vol_bit_rate, 0, 0x1)
-#define viddec_fw_mp4_vol_set_vbv_param(x, val) viddec_fw_bitfields_insert ( (x)->vol_bit_rate, val, 0, 0x1)
-            unsigned int vol_bit_rate;
-
-            // Video Object Layer(From LSB):
-            //   - fixed_vop_time_increment - 16b
-            //   - vop_time_increment_resolution - 16b
-#define viddec_fw_mp4_vol_get_vop_time_increment_resolution(x) viddec_fw_bitfields_extract((x)->vol_frame_rate, 16, 0xFFFF)
-#define viddec_fw_mp4_vol_set_vop_time_increment_resolution(x, val) viddec_fw_bitfields_insert((x)->vol_frame_rate, val, 16, 0xFFFF)
-#define viddec_fw_mp4_vol_get_fixed_vop_time_increment(x)      viddec_fw_bitfields_extract((x)->vol_frame_rate, 1, 0xFFFF)
-#define viddec_fw_mp4_vol_set_fixed_vop_time_increment(x, val) viddec_fw_bitfields_insert((x)->vol_frame_rate, val, 1, 0xFFFF)
-            unsigned int vol_frame_rate;
-        } mp4_vol; // mp4 item of type VIDDEC_WORKLOAD_MPEG4_VIDEO_OBJ
-
-        struct
-        {
-            // Group of Video Object Planes(From LSB):
-            //   - time_code - 18b
-            //   - closed_gov - 1b
-            //   - broken_link - 1b
-#define viddec_fw_mp4_gvop_get_broken_link(x)      viddec_fw_bitfields_extract((x)->gvop_info, 19, 0x1)
-#define viddec_fw_mp4_gvop_set_broken_link(x, val) viddec_fw_bitfields_insert((x)->gvop_info, val, 19, 0x1)
-#define viddec_fw_mp4_gvop_get_closed_gov(x)      viddec_fw_bitfields_extract((x)->gvop_info, 18, 0x1)
-#define viddec_fw_mp4_gvop_set_closed_gov(x, val) viddec_fw_bitfields_insert((x)->gvop_info, val, 18, 0x1)
-#define viddec_fw_mp4_gvop_get_time_code(x)      viddec_fw_bitfields_extract((x)->gvop_info, 0, 0x3FFFF)
-#define viddec_fw_mp4_gvop_set_time_code(x, val) viddec_fw_bitfields_insert((x)->gvop_info, val, 0, 0x3FFFF)
-            unsigned int gvop_info;
-
-            unsigned int pad1;
-            unsigned int pad2;
-        } mp4_gvop; // mp4 item of type VIDDEC_WORKLOAD_MPEG4_GRP_VIDEO_OBJ
-
-        struct
-        {
-            // Group of Video Object Planes(From LSB):
-            //   - source_format - 3b
-#define viddec_fw_mp4_vpsh_get_source_format(x)      viddec_fw_bitfields_extract((x)->info, 0, 0x7)
-#define viddec_fw_mp4_vpsh_set_source_format(x, val) viddec_fw_bitfields_insert((x)->info, val, 0, 0x7)
-            unsigned int info;
-
-            unsigned int pad1;
-            unsigned int pad2;
-        } mp4_vpsh; // mp4 item of type VIDDEC_WORKLOAD_MPEG4_VIDEO_PLANE_SHORT
-
-        unsigned int    vwi_payload[3];
-    };
-} viddec_workload_item_t;
-
-
-
-#endif /* VIDDEC_ITEM_TYPES_H */
diff --git a/mixvbp/include/viddec_fw_parser_host.h b/mixvbp/include/viddec_fw_parser_host.h
deleted file mode 100644
index 550cf0a..0000000
--- a/mixvbp/include/viddec_fw_parser_host.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/*
-    This file is provided under a dual BSD/GPLv2 license.  When using or
-    redistributing this file, you may do so under either license.
-
-    GPL LICENSE SUMMARY
-
-    Copyright(c) 2007-2009 Intel Corporation. All rights reserved.
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of version 2 of the GNU General Public License as
-    published by the Free Software Foundation.
-
-    This program is distributed in the hope that it will be useful, but
-    WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
-    The full GNU General Public License is included in this distribution
-    in the file called LICENSE.GPL.
-
-    Contact Information:
-
-    BSD LICENSE
-
-    Copyright(c) 2007-2009 Intel Corporation. All rights reserved.
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in
-    the documentation and/or other materials provided with the
-    distribution.
-    * Neither the name of Intel Corporation nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*/
-
-#ifndef VIDDEC_FW_PARSER_HOST_H
-#define VIDDEC_FW_PARSER_HOST_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include "viddec_fw_common_defs.h"
-
-    /** @weakgroup viddec Fw Parser interface Functions */
-    /** @ingroup viddec_fw_parser */
-    /*@{*/
-
-    /**
-       This function returns the size required for loading fw.
-       @retval  size : Required size.
-    */
-    uint32_t viddec_fw_parser_query_fwsize(void);
-
-    /**
-       This function loads Parser Firmware and initialises necessary state information.This a synchronous message to FW.
-       @param[in] phys                : Physical address on where firmware should be loaded.
-       @param[in] len                 : Length of data allocated at phys.
-       @retval VIDDEC_FW_SUCCESS      : Successfully loaded firmware.
-       @retval VIDDEC_FW_FAILURE      : Failed to communicate with firmware.
-       @retval VIDDEC_FW_NORESOURCES  : Failed to allocate resources for Loading firmware.
-       @retval VIDDEC_FW_INVALID_PARAM: The input parameters are not valid.
-    */
-    uint32_t viddec_fw_parser_loadfw(uint32_t phys, uint32_t len);
-
-    /**
-       This function returns the size required opening a stream. This a synchronous message to FW.
-       @param[in] codec_type          : Type of codec that we want information about.
-       @param[out] num_wklds          : Number of wklds required for initialisation.
-       @param[out] size               : Size of memory required for opening a stream.
-    */
-    void viddec_fw_parser_query_streamsize(uint32_t codec_type, uint32_t *num_wklds, uint32_t *size);
-
-    /**
-       This function opens requested codec.This a synchronous message to FW.
-       @param[in] codec_type          : Type of codec that we want to open.
-       @param[in] phys                : Physical address of allocated memory for this codec.
-       @param[in] prority             : Priority of stream. 1 for realtime and 0 for background.
-       @param[out] strm_handle        : Handle of the opened stream.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Opened the stream.
-       @retval VIDDEC_FW_FAILURE      : Failed to Open a stream.
-       @retval VIDDEC_FW_NORESOURCES  : Failed to Open a stream as we are out of resources.
-    */
-    uint32_t viddec_fw_parser_openstream(uint32_t codec_type, uint32_t *strm_handle, uint32_t phys, uint32_t priority);
-
-    /**
-       This function closes stream.This a synchronous message to FW.
-       For the close stream to be effective, host has to do flush with discard first and then close the stream.
-       @param[in] strm_handle        : Handle of the stream to close.
-    */
-    void viddec_fw_parser_closestream(uint32_t strm_handle);
-
-    /**
-       This function flushes the current stream. This is a synchronous message to FW.
-       Before calling this function the host has to make sure the output queue of the firmware
-       is empty. After this function is executed the FW will read all entries in input
-       es buffer queue into a free or partial workload and push it into output queue.
-       After this operation the host has to read all entries in output queue again to
-       finish the flush operation.
-       @param[in] flush_type          : Type of flush we want to perform.ex:flush and discard.
-       @param[in]  strm_handle        : Handle of the stream we want to flush.
-       @retval VIDDEC_FW_SUCCESS      : Successfully flushed the stream.
-       @retval VIDDEC_FW_INVALID_PARAM: The input parameters are not valid.
-       @retval VIDDEC_FW_NEED_FREE_WKLD  : Failed to flush sice a free wkld was not available.
-    */
-    uint32_t viddec_fw_parser_flushstream(uint32_t strm_handle, uint32_t flush_type);
-
-    /**
-       This function sends an input es buffer.
-       @param[in] strm_handle         : The handle of stream that we want to send es buffer to.
-       @param[in] message             : The es buffer we want to send.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Sent the message.
-       @retval VIDDEC_FW_PORT_FULL    : Port to fw full unsuccesful in sending message.
-       @retval VIDDEC_FW_INVALID_PARAM: The input parameters are not valid.
-    */
-    uint32_t viddec_fw_parser_send(uint32_t strm_handle, ipc_msg_data *message);
-
-    /**
-       This function gets the next processed workload. The host is required to add free workloads
-       to keep the parser busy. The FW will stall when it doesn't have enough workloads(2) to continue.
-       @param[in] strm_handle         : The handle of stream that we want to read workload from.
-       @param[out] message            : The workload descriptor.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Sent the message.
-       @retval VIDDEC_FW_PORT_EMPTY   : Workload port is empty,unsuccesful in reading wkld.
-       @retval VIDDEC_FW_INVALID_PARAM: The input parameters are not valid.
-    */
-    uint32_t viddec_fw_parser_recv(uint32_t strm_handle, ipc_msg_data *message);
-
-    /**
-       This function adds a free workload to current stream.
-       @param[in] strm_handle         : The handle of stream that we want to write workload to.
-       @param[out] message            : The workload descriptor.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Sent the message.
-       @retval VIDDEC_FW_PORT_FULL    : Workload port is full,unsuccesful in writing wkld.
-       @retval VIDDEC_FW_INVALID_PARAM: The input parameters are not valid.
-    */
-    uint32_t viddec_fw_parser_addwkld(uint32_t strm_handle, ipc_msg_data *message);
-
-    /**
-       This function enables or disables Interrupts for a stream. By default the FW will always enable interrupts.
-       The driver can disable/enable Interrupts if it needs for this particular stream.
-
-       @param[in] strm_handle         : The handle of stream that we want to get mask from
-       @param[in] mask                : This is read as boolean variable, true to enable, false to disable.
-       @retval VIDDEC_FW_SUCCESS      : Successfully set mask.
-       @retval VIDDEC_FW_INVALID_PARAM: The input parameters are not valid.
-    */
-    uint32_t viddec_fw_parser_set_interruptmask(uint32_t strm_handle, uint32_t mask);
-    /**
-       This function gets the interrupt status for current stream.
-       When the host gets Interrupted since its a global interrupt it's expected that host will look at all active streams,
-       by calling this function. The status is what the FW thinks the current state of stream is. The status information that
-       FW provides is complete information on all possible events that are defined. The host should only access this information
-       in its ISR at which state FW doesn't modify this information.
-
-       @param[in] strm_handle         : The handle of stream that we want to get mask from
-       @param[out] status             : The status of the stream based on viddec_fw_parser_int_status_t enum.
-       @retval VIDDEC_FW_SUCCESS      : Successfully in reading status.
-       @retval VIDDEC_FW_INVALID_PARAM: The input parameters are not valid.
-    */
-    uint32_t viddec_fw_parser_getstatus(uint32_t strm_handle, uint32_t *status);
-
-    /**
-       This function allows to set stream attributes that are supported.
-       @param[in] strm_handle         : The handle of stream that we want to set attribute on.
-       @param[in] type                : The type of attribute we want to set, this should be one of items in viddec_fw_stream_attributes_t.
-       @param[in] value               : The value of the type that we want to set.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Set the attribute.
-       @retval VIDDEC_FW_INVALID_PARAM: The input parameters are not valid.
-    */
-    uint32_t viddec_fw_parser_set_stream_attributes(uint32_t strm_handle, uint32_t type, uint32_t value);
-
-    /**
-       This function allows to get current status of all the parser queues. If the current stream is active we return
-       number of inout messages that can be written to input queue, no of messages in output queue and number of
-       free available workloads the stream has.
-       Normally this is called when Host receives an interrupt from parser, In which case before releasing the INT
-       Host will try its best to keep the FW busy. We always get a interrupt if we passed the watermark on input or
-       a workload was pushed into output and INT line is free. If host holds onto INT when firmware tries to send an INT
-       FW would send the Interrupt after host releases INT. Since we have EDGE triggered interrupts we cannot guarantee
-       one interrupt per frame, ex: If three frames are generated and after the first frame FW was able to provide an INT
-       to host, but host held on to INT while the FW finished the next two frames, after host releases the INT the FW will
-       give only one INT and host should try to empty output queue.
-       @param[in] strm_handle         : The handle of stream that we want to get status of queues.
-       @param[out] status             : The status of each queue gets updated in here.
-       @retval VIDDEC_FW_SUCCESS      : Successfully Got the status information.
-       @retval VIDDEC_FW_INVALID_PARAM: Invalid parameter in this case an inactive stream.
-    */
-    uint32_t viddec_fw_parser_get_queue_status(uint32_t strm_handle, viddec_fw_q_status_t *status);
-
-    /**
-       This function unloads Parser Firmware and free's the resources allocated in Load fw.
-       If this function is called before load fw it will crash with a segmentation fault.
-    */
-    void viddec_fw_parser_deinit(void);
-
-    /**
-       This function gets the major and minor revison numbers of the loaded firmware.
-       @param[out] major              : The major revision numner.
-       @param[out] minor              : The minor revision number.
-       @param[out] build              : The Internal Build number.
-    */
-    void viddec_fw_parser_get_version_number(unsigned int *major, unsigned int *minor, unsigned int *build);
-
-    /**
-       This function clears the global interrupt. This is the last thing host calls before exiting ISR.
-    */
-    void viddec_fw_parser_clear_global_interrupt(void);
-
-    /*@}*/
-#ifdef __cplusplus
-}
-#endif
-
-#endif//#ifndef VIDDEC_FW_PARSER_HOST_H
diff --git a/mixvbp/include/viddec_fw_workload.h b/mixvbp/include/viddec_fw_workload.h
deleted file mode 100644
index 3b86270..0000000
--- a/mixvbp/include/viddec_fw_workload.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
-    This file is provided under a dual BSD/GPLv2 license.  When using or
-    redistributing this file, you may do so under either license.
-
-    GPL LICENSE SUMMARY
-
-    Copyright(c) 2007-2009 Intel Corporation. All rights reserved.
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of version 2 of the GNU General Public License as
-    published by the Free Software Foundation.
-
-    This program is distributed in the hope that it will be useful, but
-    WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
-    The full GNU General Public License is included in this distribution
-    in the file called LICENSE.GPL.
-
-    Contact Information:
-
-    BSD LICENSE
-
-    Copyright(c) 2007-2009 Intel Corporation. All rights reserved.
-    All rights reserved.
-
-    Redistribution and use in source and binary forms, with or without
-    modification, are permitted provided that the following conditions
-    are met:
-
-    * Redistributions of source code must retain the above copyright
-    notice, this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright
-    notice, this list of conditions and the following disclaimer in
-    the documentation and/or other materials provided with the
-    distribution.
-    * Neither the name of Intel Corporation nor the names of its
-    contributors may be used to endorse or promote products derived
-    from this software without specific prior written permission.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-*/
-#ifndef VIDDEC_FW_WORKLOAD_H
-#define VIDDEC_FW_WORKLOAD_H
-
-#include <stdint.h>
-#include "viddec_fw_item_types.h"
-#include "viddec_fw_frame_attr.h"
-#include "viddec_fw_common_defs.h"
-
-#define VIDDEC_WORKLOAD_FLAGS_ES_START_FRAME (1 << 0)
-#define VIDDEC_WORKLOAD_FLAGS_ES_START_SLICE (1 << 1)
-#define VIDDEC_WORKLOAD_FLAGS_ES_END_SLICE   (1 << 2)
-#define VIDDEC_WORKLOAD_FLAGS_ES_END_FRAME   (1 << 3)
-
-#define VIDDEC_FRAME_REFERENCE_IS_VALID   (0x1<<1)
-// PIP Output Frame request bits
-#define BLSB_VIDDEC_FRAME_REFERENCE_PIP_MODE  24
-#define BMSK_VIDDEC_FRAME_REFERENCE_PIP_MODE  (0x3<<BLSB_VIDDEC_FRAME_REFERENCE_PIP_MODE)
-#define VIDDEC_FRAME_REFERENCE_PIP_MODE_NORMAL     0x0
-#define VIDDEC_FRAME_REFERENCE_PIP_MODE_W_HALF     0x1
-#define VIDDEC_FRAME_REFERENCE_PIP_MODE_W_QUARTER  0x2
-
-/** Frame reference information to pass to video decoder  when performing a workload (frame decode)  */
-typedef struct viddec_frame_reference
-{
-    signed int   driver_frame_id;
-    unsigned int luma_phys_addr;
-    unsigned int chroma_phys_addr;
-    int internal_id; /* Used by workload manager only */
-} viddec_frame_reference_t;
-
-#define WORKLOAD_REFERENCE_FRAME (1 << 16)
-#define WORKLOAD_SKIPPED_FRAME   (1 << 17)
-/**
-Bitmask to indicate that this workload has range adjustment and needs a range_adjusted_out buffer for successful decode.
-Will be used for VC1 only.
-*/
-#define WORKLOAD_FLAGS_RA_FRAME   (1 << 21)
-#define WORKLOAD_REFERENCE_FRAME_BMASK 0x000000ff
-
-/** This structure contains all the information required  to fully decode one frame of data  */
-/**
-    num_error_mb: This field is populated at the output of the decoder.
-                  Currently, its valid only for MPEG2.
-                  For other codecs, it defaults to 0.
-
-    range_adjusted_out:	Frame buffer needed to store range adjusted frames for VC1 only.
-                        Range adjustment in VC1 requires that the luma/chroma values in the decoded frame be modified
-                        before the frame can be displayed. In this case, we need a new frame buffer to store he adjusted values.
-                        The parser will indicate this requirement by setting the WORKLOAD_FLAGS_RA_FRAME bit in the
-                        is_reference_frame of the workload. The decoder expects this field to be valid when range adjustment
-                        is indicated and populates this frame buffer along with frame_out.
-
-    Expectation from user:
-                        Before feeding workload to the decoder, do the following:
-                           If pip is indicated/needed,
-                              provide the pip_out buffer
-                           If range adjustment is indicated (WORKLOAD_FLAGS_RA_FRAME bit in is_reference_frame is set),
-                              provide range_adjusted_out buffer
-                           Provide frame_out buffer.
-
-                        After workload is returned from the decoder, do the following:
-                           If pip is indicated,
-                              display the pip_out buffer
-                           Else If range adjustment is indicated,
-                              display range_adjusted_out buffer
-                           Else
-                              display frame_out buffer.
-*/
-typedef struct viddec_workload
-{
-    enum viddec_stream_format codec;
-    signed int                is_reference_frame;
-    unsigned int              result;
-    unsigned int              time;
-    unsigned int              num_items;/* number of viddec_workload_item_t in current workload */
-    unsigned int              num_error_mb; /* Number of error macroblocks in the current picture. */
-    viddec_frame_attributes_t attrs;
-
-    viddec_frame_reference_t  frame_out;   /* output frame */
-    viddec_frame_reference_t  range_adjusted_out;   /* for VC1 only */
-    viddec_frame_reference_t  pip_out;     /* PIP Buffer */
-
-    /* Alignment is needed because the packing different between host and vSparc */
-    __attribute__ ((aligned (16))) viddec_workload_item_t   item[1];
-
-    /* ------------------------------------------------------ */
-    /* ------------------------------------------------------ */
-    /* ------------------------------------------------------ */
-    /* This structure is ALLOC_EXTENDED with workload_items   */
-    /* ------------------------------------------------------ */
-    /* ------------------------------------------------------ */
-    /* ------------------------------------------------------ */
-} viddec_workload_t;
-
-#endif /* VIDDEC_WORKLOAD_H */
diff --git a/mixvbp/vbp_manager/include/viddec_parser_ops.h b/mixvbp/vbp_manager/include/viddec_parser_ops.h
index b7e9984..f9629d5 100755
--- a/mixvbp/vbp_manager/include/viddec_parser_ops.h
+++ b/mixvbp/vbp_manager/include/viddec_parser_ops.h
@@ -1,7 +1,6 @@
 #ifndef VIDDEC_PARSER_OPS_H
 #define VIDDEC_PARSER_OPS_H
 
-#include "viddec_fw_workload.h"
 #include <stdint.h>
 
 #define VIDDEC_PARSE_INVALID_POS 0xFFFFFFFF
@@ -74,9 +73,6 @@
  */
 int32_t viddec_pm_skip_bits(void *parent, uint32_t num_bits);
 
-/* This function appends a work item to current/next workload.
- */
-int32_t viddec_pm_append_workitem(void *parent, viddec_workload_item_t *item, uint32_t next);
 
 /* This function gets current byte and bit positions and information on whether an emulation byte is present after
 current byte.
@@ -91,13 +87,6 @@
  */
 int32_t viddec_pm_append_pixeldata_next(void *parent);
 
-/* This function provides the workload header for pasers to fill in attribute values
- */
-viddec_workload_t* viddec_pm_get_header(void *parent);
-
-/* This function provides the next workload header for pasers to fill in attribute values
- */
-viddec_workload_t* viddec_pm_get_next_header(void *parent);
 
 /* Returns the current byte value where offset is on */
 uint32_t viddec_pm_get_cur_byte(void *parent, uint8_t *byte);
@@ -105,17 +94,9 @@
 /* Tells us if there is more data that need to parse */
 int32_t viddec_pm_is_nomoredata(void *parent);
 
-/* This function appends misc tag to work load starting from start position to end position of au unit */
-int32_t viddec_pm_append_misc_tags(void *parent, uint32_t start, uint32_t end, viddec_workload_item_t *wi, uint32_t using_next);
 
 void viddec_pm_set_next_frame_error_on_eos(void *parent, uint32_t error);
 
 void viddec_pm_set_late_frame_detect(void *parent);
 
-static inline void viddec_fw_reset_workload_item(viddec_workload_item_t *wi)
-{
-    wi->vwi_payload[0] = wi->vwi_payload[1] = wi->vwi_payload[2] = 0;
-}
-
-void viddec_pm_setup_userdata(viddec_workload_item_t *wi);
 #endif
diff --git a/mixvbp/vbp_manager/include/viddec_pm.h b/mixvbp/vbp_manager/include/viddec_pm.h
index 45b884b..e5fb679 100755
--- a/mixvbp/vbp_manager/include/viddec_pm.h
+++ b/mixvbp/vbp_manager/include/viddec_pm.h
@@ -2,6 +2,7 @@
 #define VIDDEC_PM_H
 
 #include <stdint.h>
+#include "viddec_pm_utils_list.h"
 #include "viddec_pm_utils_bstream.h"
 #include "viddec_pm_parse.h"
 #include "viddec_parser_ops.h"
@@ -9,42 +10,8 @@
 #define SC_DETECT_BUF_SIZE 1024
 #define MAX_CODEC_CXT_SIZE 4096
 
-typedef enum
-{
-    PM_SUCCESS = 0,
-    /* Messages to indicate more ES data */
-    PM_NO_DATA = 0x100,
-    /* Messages to indicate SC found */
-    PM_SC_FOUND = 0x200,
-    PM_FIRST_SC_FOUND = 0x201,
-    /* Messages to indicate Frame done */
-    PM_WKLD_DONE = 0x300,
-    /* Messages to indicate Error conditions */
-    PM_OVERFLOW = 0x400,
-    /* Messages to indicate inband conditions */
-    PM_INBAND_MESSAGES = 0x500,
-    PM_EOS = 0x501,
-    PM_DISCONTINUITY = 0x502,
-} pm_parse_state_t;
 
-/* This is a temporary structure for first pass sc parsing. index tells us where we are in list of es buffers
-   cur_es points to current es buffer we are parsing. */
-typedef struct
-{
-    int32_t list_index; /* current index of list */
-    uint32_t cur_offset;
-    uint32_t cur_size;
-    viddec_input_buffer_t *cur_es;
-} viddec_pm_sc_cur_buf_t;
 
-typedef struct
-{
-    uint32_t pending_tags[MAX_IBUFS_PER_SC];
-    uint8_t dummy;
-    uint8_t frame_done;
-    uint8_t first_buf_aligned;
-    uint8_t using_next;
-} vidded_pm_pending_tags_t;
 
 /* This structure holds all necessary data required by parser manager for stream parsing.
  */
@@ -54,18 +21,13 @@
     uint8_t scbuf[SC_DETECT_BUF_SIZE + 8];
     viddec_sc_parse_cubby_cxt_t parse_cubby;
     viddec_pm_utils_list_t list;
-    /* Place to store tags to be added to next to next workload */
-    viddec_pm_sc_cur_buf_t cur_buf;
-    //viddec_emitter emitter;
     viddec_pm_utils_bstream_cxt_t getbits;
+    //viddec_emitter emitter;
     viddec_sc_prefix_state_t sc_prefix_info;
-    vidded_pm_pending_tags_t pending_tags;
     uint8_t word_align_dummy;
     uint8_t late_frame_detect;
     uint8_t frame_start_found;
-    uint8_t found_fm_st_in_current_au;
     uint32_t next_workload_error_eos;
-    uint32_t pending_inband_tags;
 #ifdef VBP
     uint32_t codec_data[MAX_CODEC_CXT_SIZE<<3];
 #else
@@ -73,21 +35,5 @@
 #endif
 } viddec_pm_cxt_t;
 
-/*
- *
- * Functions used by Parser kernel
- *
- */
 
-/* This is for initialising parser manager context to default values */
-void viddec_pm_init_context(viddec_pm_cxt_t *cxt, uint32_t codec_type, uint32_t *persist_mem, uint32_t clean);
-
-/* This is the main parse function which returns state information that parser kernel can understand.*/
-uint32_t viddec_pm_parse_es_buffer(viddec_pm_cxt_t *cxt, uint32_t codec_type, viddec_input_buffer_t *es_buf);
-
-void viddec_pm_init_ops();
-
-void viddec_pm_update_time(viddec_pm_cxt_t *cxt, uint32_t time);
-
-uint32_t viddec_pm_get_parser_sizes(uint32_t codec_type, viddec_parser_memory_sizes_t *size);
 #endif
diff --git a/mixvbp/vbp_manager/vbp_utils.c b/mixvbp/vbp_manager/vbp_utils.c
index 72548f0..78bbb0e 100755
--- a/mixvbp/vbp_manager/vbp_utils.c
+++ b/mixvbp/vbp_manager/vbp_utils.c
@@ -225,12 +225,6 @@
         pcontext->func_free_query_data(pcontext);
     }
 
-    free(pcontext->workload2);
-    pcontext->workload2 = NULL;
-
-    free(pcontext->workload1);
-    pcontext->workload1 = NULL;
-
     free(pcontext->persist_mem);
     pcontext->persist_mem = NULL;
 
@@ -297,26 +291,6 @@
         }
     }
 
-    /* allocate a new workload with 1000 items. */
-    pcontext->workload1 = malloc(sizeof(viddec_workload_t) +
-                                       (MAX_WORKLOAD_ITEMS * sizeof(viddec_workload_item_t)));
-    if (NULL == pcontext->workload1)
-    {
-        ETRACE("Failed to allocate memory");
-        error = VBP_MEM;
-        goto cleanup;
-    }
-
-    /* allocate a second workload with 1000 items. */
-    pcontext->workload2 = malloc(sizeof(viddec_workload_t) +
-                                       (MAX_WORKLOAD_ITEMS * sizeof(viddec_workload_item_t)));
-    if (NULL == pcontext->workload2)
-    {
-        ETRACE("Failed to allocate memory");
-        error = VBP_MEM;
-        goto cleanup;
-    }
-
     /* allocate format-specific query data */
     error = pcontext->func_allocate_query_data(pcontext);
 
@@ -475,7 +449,6 @@
     }
 
     viddec_pm_utils_bstream_init(&(pcontext->parser_cxt->getbits), NULL, 0);
-    pcontext->parser_cxt->cur_buf.list_index = -1;
     pcontext->parser_cxt->parse_cubby.phase = 0;
 
     /* invoke the entry point to initialize the parser. */
diff --git a/mixvbp/vbp_manager/vbp_utils.h b/mixvbp/vbp_manager/vbp_utils.h
index 7761c26..455951c 100755
--- a/mixvbp/vbp_manager/vbp_utils.h
+++ b/mixvbp/vbp_manager/vbp_utils.h
@@ -85,9 +85,6 @@
     /* parser context */
     viddec_pm_cxt_t *parser_cxt;
 
-    /* work load */
-    viddec_workload_t *workload1, *workload2;
-
     /* persistent memory for parser */
     uint32 *persist_mem;
 
diff --git a/mixvbp/vbp_manager/vbp_vp8_parser.c b/mixvbp/vbp_manager/vbp_vp8_parser.c
index 72dcfa9..203ab75 100755
--- a/mixvbp/vbp_manager/vbp_vp8_parser.c
+++ b/mixvbp/vbp_manager/vbp_vp8_parser.c
@@ -28,6 +28,7 @@
 #include "vbp_loader.h"
 #include "vbp_utils.h"
 #include "vbp_vp8_parser.h"
+#include "viddec_fw_common_defs.h"
 
 uint32 vbp_init_parser_entries_vp8(vbp_context *pcontext)
 {
diff --git a/mixvbp/vbp_manager/viddec_pm_parser_ops.c b/mixvbp/vbp_manager/viddec_pm_parser_ops.c
index 6879a6a..1ba8aa8 100755
--- a/mixvbp/vbp_manager/viddec_pm_parser_ops.c
+++ b/mixvbp/vbp_manager/viddec_pm_parser_ops.c
@@ -3,6 +3,7 @@
 #include "viddec_pm.h"
 #include "viddec_parser_ops.h"
 #include "viddec_pm_utils_bstream.h"
+#include "viddec_fw_common_defs.h"
 
 int32_t viddec_pm_get_bits(void *parent, uint32_t *data, uint32_t num_bits)
 {
@@ -86,12 +87,3 @@
     cxt->late_frame_detect = true;
 }
 
-int32_t viddec_pm_append_workitem(void *parent, viddec_workload_item_t *item, uint32_t next)
-{
-    return 1;
-}
-
-void viddec_pm_setup_userdata(viddec_workload_item_t *wi)
-{
-    wi=wi;
-}
diff --git a/mixvbp/vbp_plugin/h264/h264parse_dpb.c b/mixvbp/vbp_plugin/h264/h264parse_dpb.c
index 13adb1b..5f660de 100755
--- a/mixvbp/vbp_plugin/h264/h264parse_dpb.c
+++ b/mixvbp/vbp_plugin/h264/h264parse_dpb.c
@@ -7,7 +7,6 @@
 
 #include "viddec_parser_ops.h"
 
-#include "viddec_fw_workload.h"
 #include "viddec_pm.h"
 
 
diff --git a/mixvbp/vbp_plugin/h264/h264parse_sei.c b/mixvbp/vbp_plugin/h264/h264parse_sei.c
index f70e64c..12f793d 100755
--- a/mixvbp/vbp_plugin/h264/h264parse_sei.c
+++ b/mixvbp/vbp_plugin/h264/h264parse_sei.c
@@ -8,9 +8,6 @@
 
 #include "viddec_parser_ops.h"
 
-#include "viddec_fw_item_types.h"
-#include "viddec_fw_workload.h"
-
 //////////////////////////////////////////////////////////////////////////////
 // avc_sei_stream_initialise ()
 //
@@ -132,9 +129,6 @@
     {
         int32_t i = 0, NumClockTS = 0;
 
-        viddec_workload_item_t     wi;
-
-        wi.vwi_payload[0] = wi.vwi_payload[1] = wi.vwi_payload[2] = 0;
         viddec_pm_get_bits(parent, &code , 4);
         sei_msg_ptr->pic_struct = (uint8_t)code;
 
@@ -145,13 +139,6 @@
             pInfo->sei_information.scan_format = SEI_SCAN_FORMAT_INTERLACED;
         }
 
-        wi.vwi_type = VIDDEC_WORKLOAD_SEI_PIC_TIMING;
-        wi.h264_sei_pic_timing.pic_struct = sei_msg_ptr->pic_struct;
-
-#ifndef VBP
-        //Push to current if we are in first frame, or we do not detect previous frame end
-        viddec_pm_append_workitem( parent, &wi , !(pInfo->Is_first_frame_in_stream ||(!pInfo->is_current_workload_done)));
-#endif
 
         if (sei_msg_ptr->pic_struct < 3) {
             NumClockTS = 1;
@@ -255,29 +242,20 @@
     h264_SEI_pan_scan_rectangle_t  sei_pan_scan;
     uint32_t code;
 
-    viddec_workload_item_t     wi;
-
     h264_memset( &(sei_pan_scan), 0x0, sizeof(h264_SEI_pan_scan_rectangle_t) );
 
-    viddec_fw_reset_workload_item(&wi);
-    wi.vwi_type = VIDDEC_WORKLOAD_H264_PAN_SCAN;
-
     sei_msg_ptr = (h264_SEI_pan_scan_rectangle_t *)(&sei_pan_scan);
 
     sei_msg_ptr->pan_scan_rect_id = h264_GetVLCElement(parent, pInfo, false);
 
-    wi.h264_sei_pan_scan.pan_scan_rect_id = sei_msg_ptr->pan_scan_rect_id;
-
     viddec_pm_get_bits(parent, &code , 1);
     sei_msg_ptr->pan_scan_rect_cancel_flag = (uint8_t)code;
-    viddec_fw_h264_sei_pan_scan_set_cancel_flag(&(wi.h264_sei_pan_scan), sei_msg_ptr->pan_scan_rect_cancel_flag);
 
     if (!sei_msg_ptr->pan_scan_rect_cancel_flag)
     {
         int32_t i;
         sei_msg_ptr->pan_scan_cnt_minus1 = h264_GetVLCElement(parent, pInfo, false);
 
-        viddec_fw_h264_sei_pan_scan_set_cnt_minus1(&(wi.h264_sei_pan_scan), sei_msg_ptr->pan_scan_cnt_minus1);
         if (sei_msg_ptr->pan_scan_cnt_minus1 > MAX_PAN_SCAN_CNT -1)
         {
             return H264_STATUS_SEI_ERROR;
@@ -290,31 +268,6 @@
             sei_msg_ptr->pan_scan_rect_bottom_offset[i] = h264_GetVLCElement(parent, pInfo, true);
         }
         sei_msg_ptr->pan_scan_rect_repetition_period = h264_GetVLCElement(parent, pInfo, false);
-        wi.h264_sei_pan_scan.pan_scan_rect_repetition_period = sei_msg_ptr->pan_scan_rect_repetition_period;
-    }
-#ifndef VBP
-    //cur is first frame
-    viddec_pm_append_workitem( parent, &wi , !(pInfo->Is_first_frame_in_stream ||(!pInfo->is_current_workload_done)));
-#endif
-
-    if (!sei_msg_ptr->pan_scan_rect_cancel_flag)
-    {
-        int32_t i;
-
-        viddec_fw_reset_workload_item(&wi);
-        wi.vwi_type = VIDDEC_WORKLOAD_SEI_PAN_SCAN_RECT;
-
-        for (i=0; i<= sei_msg_ptr->pan_scan_cnt_minus1; i++)
-        {
-            viddec_fw_h264_pan_scan_set_left(&(wi.h264_pan_scan_rect), sei_msg_ptr->pan_scan_rect_left_offset[i]);
-            viddec_fw_h264_pan_scan_set_right(&(wi.h264_pan_scan_rect), sei_msg_ptr->pan_scan_rect_right_offset[i]);
-            viddec_fw_h264_pan_scan_set_top(&(wi.h264_pan_scan_rect), sei_msg_ptr->pan_scan_rect_top_offset[i]);
-            viddec_fw_h264_pan_scan_set_bottom(&(wi.h264_pan_scan_rect), sei_msg_ptr->pan_scan_rect_bottom_offset[i]);
-#ifndef VBP
-            //cur is first frame
-            viddec_pm_append_workitem( parent, &wi , !pInfo->Is_first_frame_in_stream);
-#endif
-        }
     }
 
     return H264_STATUS_OK;
@@ -353,11 +306,7 @@
     uint32_t i;
     int32_t byte = 0;
     uint32_t code = 0;
-    viddec_workload_item_t     wi;
 
-    wi.vwi_type = VIDDEC_WORKLOAD_SEI_USER_DATA_REGISTERED;
-    wi.vwi_payload[0] = wi.vwi_payload[1] = wi.vwi_payload[2] = 0;
-    //remove warning
     pInfo = pInfo;
 
     sei_msg_ptr = (h264_SEI_userdata_registered_t *)(&sei_userdata_registered);
@@ -374,39 +323,12 @@
     }
 
 
-    wi.user_data.size =0;
     do
     {
-
         viddec_pm_get_bits(parent, (uint32_t *)&byte, 8);
-        if (wi.user_data.size < 11)
-        {
-            wi.user_data.data_payload[wi.user_data.size]=(uint8_t)byte;
-        }
-        wi.user_data.size++;
-
-        if (11 == wi.user_data.size)
-        {
-            viddec_pm_setup_userdata(&wi);
-#ifndef VBP
-            //cur is first frame
-            viddec_pm_append_workitem( parent, &wi , !(pInfo->Is_first_frame_in_stream ||(!pInfo->is_current_workload_done)));
-#endif
-            wi.user_data.size =0;
-        }
-
         i++;
     } while (i < payload_size);
 
-    if (0!=wi.user_data.size)
-    {
-        viddec_pm_setup_userdata(&wi);
-#ifndef VBP
-        //cur is first frame
-        viddec_pm_append_workitem( parent, &wi , !pInfo->Is_first_frame_in_stream);
-#endif
-    }
-
     return H264_STATUS_OK;
 }
 /* ------------------------------------------------------------------------------------------ */
@@ -421,10 +343,6 @@
     int32_t byte = 0;
     uint32_t code;
 
-    viddec_workload_item_t     wi;
-
-    wi.vwi_type = VIDDEC_WORKLOAD_SEI_USER_DATA_UNREGISTERED;
-
     //remove warning
     pInfo = pInfo;
 
@@ -436,35 +354,9 @@
         sei_msg_ptr->uuid_iso_iec_11578[i] = (uint8_t)code;
     }
 
-    wi.user_data.size =0;
     for (i = 16; i < payload_size; i++)
     {
-
         viddec_pm_get_bits(parent, (uint32_t *)&byte, 8);
-        if (wi.user_data.size < 11)
-        {
-            wi.user_data.data_payload[wi.user_data.size]=(uint8_t)byte;
-        }
-        wi.user_data.size++;
-
-        if (11 == wi.user_data.size)
-        {
-            viddec_pm_setup_userdata(&wi);
-#ifndef VBP
-            //cur is first frame
-            viddec_pm_append_workitem( parent, &wi , !(pInfo->Is_first_frame_in_stream ||(!pInfo->is_current_workload_done)));
-#endif
-            wi.user_data.size =0;
-        }
-    }
-
-    if (0!=wi.user_data.size)
-    {
-        viddec_pm_setup_userdata(&wi);
-#ifndef VBP
-        //cur is first frame
-        viddec_pm_append_workitem( parent, &wi , !pInfo->Is_first_frame_in_stream);
-#endif
     }
 
     return H264_STATUS_OK;
@@ -478,8 +370,6 @@
     h264_SEI_recovery_point_t* sei_msg_ptr;
     h264_SEI_recovery_point_t  sei_recovery_point;
     uint32_t code;
-    viddec_workload_item_t     wi;
-
 
     sei_msg_ptr = (h264_SEI_recovery_point_t *)(&sei_recovery_point);
 
@@ -507,20 +397,6 @@
             pInfo->sei_rp_received = 1;
     }
 
-    //
-    /// Append workload for SEI
-    //
-    viddec_fw_reset_workload_item(&wi);
-    wi.vwi_type = VIDDEC_WORKLOAD_SEI_RECOVERY_POINT;
-    wi.h264_sei_recovery_point.recovery_frame_cnt = sei_msg_ptr->recovery_frame_cnt;
-    viddec_fw_h264_h264_sei_recovery_set_exact_match_flag(&(wi.h264_sei_recovery_point), sei_msg_ptr->exact_match_flag);
-    viddec_fw_h264_h264_sei_recovery_set_broken_link_flag(&(wi.h264_sei_recovery_point), sei_msg_ptr->broken_link_flag);
-    wi.h264_sei_recovery_point.changing_slice_group_idc = sei_msg_ptr->changing_slice_group_idc;
-#ifndef VBP
-    //cur is first frame
-    viddec_pm_append_workitem( parent, &wi , !(pInfo->Is_first_frame_in_stream ||(!pInfo->is_current_workload_done)));
-#endif
-
     return H264_STATUS_OK;
 }
 /* ------------------------------------------------------------------------------------------ */
diff --git a/mixvbp/vbp_plugin/h264/include/h264.h b/mixvbp/vbp_plugin/h264/include/h264.h
index eac5541..6171e76 100755
--- a/mixvbp/vbp_plugin/h264/include/h264.h
+++ b/mixvbp/vbp_plugin/h264/include/h264.h
@@ -21,9 +21,8 @@
 #endif
 
 #include "stdint.h"
-#include "viddec_debug.h"
 
-#include "viddec_fw_workload.h"
+#include "viddec_fw_common_defs.h"
 #include "h264parse_sei.h"
 
 #ifdef VBP
@@ -947,17 +946,6 @@
         //uint32_t h264_dpb_mpr_bf_poc[16];        // 0x304
     } h264_pic_data;
 
-    enum h264_workload_item_type
-    {
-        VIDDEC_WORKLOAD_H264_SLICE_REG = VIDDEC_WORKLOAD_DECODER_SPECIFIC,
-        VIDDEC_WORKLOAD_H264_PIC_REG,
-        VIDDEC_WORKLOAD_H264_DPB_FRAME_POC,
-        VIDDEC_WORKLOAD_H264_SH_BITS_OFFSET,
-        VIDDEC_WORKLOAD_H264_PWT_BITS_OFFSET,
-        VIDDEC_WORKLOAD_H264_PWT_ES_BYTES,
-        VIDDEC_WORKLOAD_H264_SCALING_MATRIX,
-        VIDDEC_WORKLOAD_H264_DEBUG
-    };
 
 
 
diff --git a/mixvbp/vbp_plugin/h264/mix_vbp_h264_stubs.c b/mixvbp/vbp_plugin/h264/mix_vbp_h264_stubs.c
index b564d8b..daad16c 100755
--- a/mixvbp/vbp_plugin/h264/mix_vbp_h264_stubs.c
+++ b/mixvbp/vbp_plugin/h264/mix_vbp_h264_stubs.c
@@ -1,7 +1,6 @@
 #include "viddec_parser_ops.h"
 #include "h264.h"
 #include "h264parse.h"
-#include "viddec_fw_item_types.h"
 #include "h264parse_dpb.h"
 
 
@@ -128,7 +127,6 @@
 void h264_parse_emit_current_slice( void *parent, h264_Info *pInfo )
 {
 
-    viddec_workload_item_t     wi;
     h264_slice_data 				slice_data = {};
 
     uint32_t		i=0, nitems=0, data=0;
@@ -177,92 +175,11 @@
     /////file ref list 1
     //h264_parse_emit_ref_list(parent, pInfo, 1);
 
-    ///////////////////////////////////// Slice Data ////////////////////////////////
-    // h264_fill_slice_data(pInfo, &slice_data);
-
-    wi.vwi_type = (workload_item_type)(VIDDEC_WORKLOAD_H264_SLICE_REG);
-
-    wi.data.data_offset = slice_data.h264_bsd_slice_start;
-    wi.data.data_payload[0] = slice_data.h264_bsd_slice_p1;
-    wi.data.data_payload[1] = slice_data.h264_bsd_slice_p2;
-
-    if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-    {
-        // viddec_pm_append_workitem( parent , &wi);
-    }
-    else
-    {
-        // viddec_pm_append_workitem_next( parent , &wi);
-    }
-
-
-    ///////////////////////////predict weight table item and data if have///////////////////////////
-    if (pInfo->h264_pwt_enabled)
-    {
-        wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_H264_PWT_BITS_OFFSET;
-        wi.data.data_offset = pInfo->h264_pwt_end_byte_offset- pInfo->h264_pwt_start_byte_offset+1;
-        wi.data.data_payload[0] = pInfo->h264_pwt_start_bit_offset;
-        wi.data.data_payload[1] = pInfo->h264_pwt_end_bit_offset;
-
-        if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-        {
-            // viddec_pm_append_workitem( parent , &wi);
-
-            wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_H264_PWT_ES_BYTES;
-            wi.es.es_flags = 0;
-            // viddec_pm_append_misc_tags(parent, pInfo->h264_pwt_start_byte_offset, pInfo->h264_pwt_end_byte_offset,&wi,1);
-        }
-        else
-        {
-            //  viddec_pm_append_workitem_next( parent , &wi);
-
-            wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_H264_PWT_ES_BYTES;
-            wi.es.es_flags = 0;
-            //  viddec_pm_append_misc_tags(parent, pInfo->h264_pwt_start_byte_offset, pInfo->h264_pwt_end_byte_offset,&wi,0);
-        }
-    }
-
-
     ////////////////////////////////// Update ES Buffer for Slice ///////////////////////
     viddec_pm_get_au_pos(parent, &bits_offset, &byte_offset, &is_emul);
 
     //OS_INFO("DEBUG---entropy_coding_mode_flag:%d, bits_offset: %d\n", pInfo->active_PPS.entropy_coding_mode_flag, bits_offset);
 
-    if (pInfo->active_PPS.entropy_coding_mode_flag)
-    {
-        if (0!=bits_offset)  {
-            data = data; // fix compilation warning
-            // don't skip byte-aligned bits as those bits are actually
-            // part of slice_data
-            //viddec_pm_get_bits(parent, &data, 8-bits_offset);
-        }
-    }
-    else
-    {
-        if (0!=bits_offset)  {
-            wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_H264_SH_BITS_OFFSET;
-            wi.data.data_offset = bits_offset;
-            wi.data.data_payload[0]=0;
-            wi.data.data_payload[1]=0;
-
-            if (pInfo->push_to_cur) {			//cur is empty, fill new frame in cur
-                // viddec_pm_append_workitem( parent , &wi);
-            }
-            else {
-                //viddec_pm_append_workitem_next( parent , &wi);
-            }
-        }
-    }
-
-    if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-    {
-        //viddec_pm_append_pixeldata( parent );
-    }
-    else
-    {
-        //viddec_pm_append_pixeldata_next( parent);
-    }
-
     return;
 }
 
@@ -270,52 +187,23 @@
 void h264_parse_emit_current_pic( void *parent, h264_Info *pInfo )
 {
 
-    viddec_workload_item_t     wi;
-
     const uint32_t             *pl;
     uint32_t                   i=0,nitems=0;
 
     h264_pic_data pic_data;
 
     pInfo->qm_present_list=0;
-
-    //h264_parse_emit_4X4_scaling_matrix(parent, pInfo);
-    // h264_parse_emit_8X8_scaling_matrix(parent, pInfo);
-
-    // h264_fill_pic_data(pInfo, &pic_data);
-
     // How many payloads must be generated
     nitems = (sizeof(h264_pic_data) + 7) / 8; // In QWORDs rounded up
 
     pl = (const uint32_t *) &pic_data;
 
-    // Dump slice data to an array of workitems,  to do pl access non valid mem
-    for ( i = 0; i < nitems; i++ )
-    {
-        wi.vwi_type           = (workload_item_type)VIDDEC_WORKLOAD_H264_PIC_REG;
-        wi.data.data_offset   = (unsigned int)pl - (unsigned int)&pic_data; // offset within struct
-        wi.data.data_payload[0] = pl[0];
-        wi.data.data_payload[1] = pl[1];
-        pl += 2;
-
-        if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-        {
-
-            //  viddec_pm_append_workitem( parent, &wi );
-        }
-        else
-        {
-            //viddec_pm_append_workitem_next( parent, &wi );
-        }
-    }
-
     return;
 }
 
 void h264_parse_emit_start_new_frame( void *parent, h264_Info *pInfo )
 {
 
-    viddec_workload_item_t     wi;
     uint32_t                   i=0,nitems=0;
 
     ///////////////////////// Frame attributes//////////////////////////
@@ -343,165 +231,19 @@
     ///////////////////// SPS/////////////////////
     // h264_parse_emit_sps(parent, pInfo);
 
-    /////////////////////display frames/////////////////////
-    nitems = pInfo->dpb.frame_numbers_need_to_be_displayed;
-
-    for (i=0; i<nitems; i++)
-    {
-        wi.vwi_type = (workload_item_type)(VIDDEC_WORKLOAD_REF_FRAME_DISPLAY_0 + pInfo->dpb.frame_id_need_to_be_displayed[i]);
-        wi.ref_frame.reference_id = pInfo->dpb.frame_id_need_to_be_displayed[i];
-        wi.ref_frame.luma_phys_addr = 0;
-        wi.ref_frame.chroma_phys_addr = 0;
-
-        if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-        {
-            // viddec_pm_append_workitem( parent, &wi );
-        }
-        else
-        {
-            // viddec_pm_append_workitem_next( parent, &wi );
-        }
-    }
     pInfo->dpb.frame_numbers_need_to_be_displayed =0;
 
 
     /////////////////////release frames/////////////////////
-    nitems = pInfo->dpb.frame_numbers_need_to_be_removed;
-
-    for (i=0; i<nitems; i++)
-    {
-        wi.vwi_type = (workload_item_type)(VIDDEC_WORKLOAD_REF_FRAME_RELEASE_0 + pInfo->dpb.frame_id_need_to_be_removed[i]);
-        wi.ref_frame.reference_id = pInfo->dpb.frame_id_need_to_be_removed[i];
-        wi.ref_frame.luma_phys_addr = 0;
-        wi.ref_frame.chroma_phys_addr = 0;
-
-        if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-        {
-            //viddec_pm_append_workitem( parent, &wi );
-        }
-        else
-        {
-            // viddec_pm_append_workitem_next( parent, &wi );
-        }
-
-    }
     pInfo->dpb.frame_numbers_need_to_be_removed =0;
 
     /////////////////////flust frames (do not display)/////////////////////
-    nitems = pInfo->dpb.frame_numbers_need_to_be_dropped;
-
-    for (i=0; i<nitems; i++)
-    {
-        wi.vwi_type = (workload_item_type)(VIDDEC_WORKLOAD_REF_FRAME_DROPOUT_0 + pInfo->dpb.frame_id_need_to_be_dropped[i]);
-        wi.ref_frame.reference_id = pInfo->dpb.frame_id_need_to_be_dropped[i];
-        wi.ref_frame.luma_phys_addr = 0;
-        wi.ref_frame.chroma_phys_addr = 0;
-
-        if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-        {
-            //viddec_pm_append_workitem( parent, &wi );
-        }
-        else
-        {
-            // viddec_pm_append_workitem_next( parent, &wi );
-        }
-
-    }
     pInfo->dpb.frame_numbers_need_to_be_dropped =0;
 
     /////////////////////updata DPB frames/////////////////////
-    nitems = pInfo->dpb.used_size;
-    for (i=0; i<nitems; i++)
-    {
-        uint8_t fs_id = pInfo->dpb.fs_dpb_idc[i];
-
-        if (viddec_h264_get_is_non_existent(&(pInfo->dpb.fs[fs_id])) == 0)
-        {
-            wi.vwi_type = (workload_item_type)(VIDDEC_WORKLOAD_DPB_ACTIVE_FRAME_0+fs_id);
-            wi.ref_frame.reference_id = fs_id;
-            wi.ref_frame.luma_phys_addr = 0;
-            wi.ref_frame.chroma_phys_addr = 0;
-
-            if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-            {
-                // viddec_pm_append_workitem( parent, &wi );
-            }
-            else
-            {
-                //viddec_pm_append_workitem_next( parent, &wi );
-            }
-        }
-    }
-
-
-    /////////////////////updata dpb frames info (poc)/////////////////////
-    nitems = pInfo->dpb.used_size;
-    for (i=0; i<nitems; i++)
-    {
-        uint8_t fs_id = pInfo->dpb.fs_dpb_idc[i];
-
-        if (viddec_h264_get_is_non_existent(&(pInfo->dpb.fs[fs_id])) == 0)
-        {
-            wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_H264_DPB_FRAME_POC;
-            wi.data.data_offset = fs_id;
-            //printf("is_used = %d, tpoc = %d, bpoc = %d\n", pInfo->dpb.fs[fs_id].is_used, pInfo->dpb.fs[fs_id].top_field.poc, pInfo->dpb.fs[fs_id].bottom_field.poc);
-
-            switch (viddec_h264_get_is_used(&(pInfo->dpb.fs[fs_id])))
-            {
-            case (FRAME): {
-                wi.data.data_payload[0] = pInfo->dpb.fs[fs_id].top_field.poc;
-                wi.data.data_payload[1] = pInfo->dpb.fs[fs_id].bottom_field.poc;
-                break;
-            };
-
-            case (TOP_FIELD): {
-                wi.data.data_payload[0] = pInfo->dpb.fs[fs_id].top_field.poc;
-                wi.data.data_payload[1] = 0;
-                break;
-            };
-
-            case (BOTTOM_FIELD): {
-                wi.data.data_payload[0] = 0;
-                wi.data.data_payload[1] = pInfo->dpb.fs[fs_id].bottom_field.poc;
-                break;
-            };
-
-            default : {
-                wi.data.data_payload[0] = 0;
-                wi.data.data_payload[1] = 0;
-                break;
-            };
-            }
-
-
-            if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-            {
-                //  viddec_pm_append_workitem( parent, &wi );
-            }
-            else
-            {
-                //viddec_pm_append_workitem_next( parent, &wi );
-            }
-
-        }
-    }
 
     /////////////////////Alloc buffer for current Existing frame/////////////////////
-    if (0!=pInfo->dpb.frame_numbers_need_to_be_allocated)
-    {
-        if (pInfo->push_to_cur)
-        {
-            // viddec_workload_t        *wl_cur = viddec_pm_get_header (parent);
-            //  wl_cur->is_reference_frame |= WORKLOAD_REFERENCE_FRAME | (pInfo->dpb.frame_id_need_to_be_allocated & 0x1f);
-        }
-        else
-        {
-            // viddec_workload_t        *wl_next = viddec_pm_get_next_header (parent);
-            //wl_next->is_reference_frame |= WORKLOAD_REFERENCE_FRAME | (pInfo->dpb.frame_id_need_to_be_allocated & 0x1f);
-        }
-    }
     pInfo->dpb.frame_numbers_need_to_be_allocated =0;
-
     return;
 }
 
@@ -511,8 +253,6 @@
 {
 
     uint32_t nitems=0, i=0;
-    viddec_workload_item_t	wi;
-
     ////
     //// Now we can flush out all frames in DPB fro display
     if (viddec_h264_get_is_used(&(pInfo->dpb.fs[pInfo->dpb.fs_dec_idc])) != 3)
@@ -525,48 +265,10 @@
 
 
     /////////////////////display frames/////////////////////
-    nitems = pInfo->dpb.frame_numbers_need_to_be_displayed;
-
-    for (i=0; i<nitems; i++)
-    {
-        wi.vwi_type = (workload_item_type)(VIDDEC_WORKLOAD_EOS_DISPLAY_FRAME_0 + pInfo->dpb.frame_id_need_to_be_displayed[i]);
-        wi.ref_frame.reference_id = pInfo->dpb.frame_id_need_to_be_displayed[i];
-        wi.ref_frame.luma_phys_addr = 0;
-        wi.ref_frame.chroma_phys_addr = 0;
-
-        if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-        {
-            //viddec_pm_append_workitem( parent, &wi );
-        }
-        else
-        {
-            //viddec_pm_append_workitem_next( parent, &wi );
-        }
-    }
     pInfo->dpb.frame_numbers_need_to_be_displayed =0;
 
 
     /////////////////////release frames/////////////////////
-    nitems = pInfo->dpb.frame_numbers_need_to_be_removed;
-
-    for (i=0; i<nitems; i++)
-    {
-        wi.vwi_type = (workload_item_type)(VIDDEC_WORKLOAD_EOS_RELEASE_FRAME_0 + pInfo->dpb.frame_id_need_to_be_removed[i]);
-        wi.ref_frame.reference_id = pInfo->dpb.frame_id_need_to_be_removed[i];
-        wi.ref_frame.luma_phys_addr = 0;
-        wi.ref_frame.chroma_phys_addr = 0;
-
-        if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-        {
-            //  viddec_pm_append_workitem( parent, &wi );
-            viddec_pm_set_next_frame_error_on_eos(parent, VIDDEC_FW_WORKLOAD_ERR_NOTDECODABLE);
-        }
-        else
-        {
-            // viddec_pm_append_workitem_next( parent, &wi );
-            viddec_pm_set_next_frame_error_on_eos(parent, pInfo->wl_err_next);
-        }
-    }
     pInfo->dpb.frame_numbers_need_to_be_removed =0;
 
     return;
diff --git a/mixvbp/vbp_plugin/h264/viddec_h264_parse.c b/mixvbp/vbp_plugin/h264/viddec_h264_parse.c
index c55db6b..db36c0b 100755
--- a/mixvbp/vbp_plugin/h264/viddec_h264_parse.c
+++ b/mixvbp/vbp_plugin/h264/viddec_h264_parse.c
@@ -1,6 +1,5 @@
 #include "viddec_parser_ops.h"
 
-#include "viddec_fw_workload.h"
 #include "viddec_pm.h"
 
 #include "h264.h"
diff --git a/mixvbp/vbp_plugin/h264/viddec_h264_workload.c b/mixvbp/vbp_plugin/h264/viddec_h264_workload.c
deleted file mode 100755
index 54c96db..0000000
--- a/mixvbp/vbp_plugin/h264/viddec_h264_workload.c
+++ /dev/null
@@ -1,1195 +0,0 @@
-/* Any workload management goes in this file */
-
-#include "viddec_fw_debug.h"
-#include "viddec_parser_ops.h"
-#include "h264.h"
-#include "h264parse.h"
-#include "viddec_fw_item_types.h"
-#include "h264parse_dpb.h"
-
-
-#include "viddec_fw_workload.h"
-#include <auto_eas/gen4_mfd.h>
-#include "viddec_pm_utils_bstream.h"
-
-// picture parameter 1
-#define PUT_BSD_PP1_IMG_DISPOSABLE_FLAG_BIT(w)            (((uint32_t)w)&0x1)
-#define PUT_BSD_PP1_SLICE_TYPE_BITS(w)                    ((((uint32_t)w)&0x7)<<1)
-#define PUT_BSD_PP1_WEIGHTED_BIPRED_IDC_BITS(w)           ((((uint32_t)w)&0x3)<<4)
-#define PUT_BSD_PP1_WEIGHTED_PRED_FLAG_BIT(w)             ((((uint32_t)w)&0x1)<<6)
-#define PUT_BSD_PP1_NUM_REF_IDX_L0_BITS(w)                ((((uint32_t)w)&0x3F)<<8)
-#define PUT_BSD_PP1_NUM_REF_IDX_L1_BITS(w)                ((((uint32_t)w)&0x3F)<<16)
-
-// picture parameter 2
-#define PUT_BSD_PP2_CABAC_INIT_IDC_BITS(w)                (((uint32_t)w)&0x3)
-#define PUT_BSD_PP2_QP_BITS(w)                            ((((uint32_t)w)&0x3F)<<2)
-#define PUT_BSD_PP2_DISABLE_DBF_IDC_BITS(w)               ((((uint32_t)w)&0x3)<<8)
-#define PUT_BSD_PP2_ALPHA_C0_OFFSET_DIV2_BITS(w)          ((((uint32_t)w)&0xF)<<10)
-#define PUT_BSD_PP2_BETA_OFFSET_DIV2_BITS(w)              ((((uint32_t)w)&0xF)<<14)
-#define PUT_BSD_PP2_IMG_DIRECT_TYPE_BIT(w)                ((((uint32_t)w)&0x1)<<18)
-#define PUT_BSD_PP2_CHROMA_QP_OFFSET_BITS(w)              ((((uint32_t)w)&0x1F)<<19)
-#define PUT_BSD_PP2_CHROMA_QP_OFFSET_2_BITS(w)            ((((uint32_t)w)&0x1F)<<24)
-
-
-// slice start parameter
-#define PUT_BSD_SS_START_ADDR_BITS(w)                      (((uint32_t)w)&0x7fff)         // 14:0  current slice start address
-#define PUT_BSD_SS_SKIP_FS_IDC_BITS(w)                    ((((uint32_t)w)&0x3f)<<16)      // [5:0], [4:0] frame store idc, [5] - 0: top-filed, 1: bottom field
-#define PUT_BSD_SS_SKIP_TYPE_BIT(w)                       ((((uint32_t)w)&0x1)<<24)       // 0: P-skip, 1: I-skip
-#define PUT_BSD_SS_SKIP_REWIND_BITS(w)                    ((((uint32_t)w)&0xf)<<28)       // number of MB or MBAFF pairs to rewind before skip
-
-//h264_dpb_init
-#define PUT_FRAME_WIDTH_MB_BITS(w)                        (((uint32_t)w)&0x7F)
-#define PUT_FRAME_HEIGHT_MB_BITS(w)                       ((((uint32_t)w)&0x7F)<<16)
-
-//dpb lut table init
-//#define PUT_BSD_IMAGE_FRAME_STORE_IDC_BITS(w)             ((((uint32_t)w)&0x1F)<<8)
-
-//h264 img init
-#define PUT_BSD_IMAGE_STRUCTURE_BITS(w)                   (((uint32_t)w)&0x3)
-#define PUT_BSD_IMAGE_IDR_BIT(w)                          ((((uint32_t)w)&0x1)<<2)
-#define PUT_BSD_IMAGE_MBAFF_FRAME_FLAG_BIT(w)             ((((uint32_t)w)&0x1)<<3)
-#define PUT_BSD_IMAGE_ENTROPY_CODING_MODE_FLAG_BIT(w)     ((((uint32_t)w)&0x1)<<4)
-#define PUT_BSD_IMAGE_CONSTRAINED_INTRA_PRED_FLAG_BIT(w)  ((((uint32_t)w)&0x1)<<5)
-#define PUT_BSD_IMG_FRAME_MBS_ONLY_FLAG_BIT(w)            ((((uint32_t)w)&0x1)<<6)
-#define PUT_BSD_IMG_DIRECT_8X8_INFER_FLAG_BIT(w)          ((((uint32_t)w)&0x1)<<7)
-#define PUT_BSD_IMAGE_FRAME_STORE_IDC_BITS(w)             ((((uint32_t)w)&0x1F)<<8)
-
-#define PUT_HPD_BSD_IMG_TRANSFORM_8X8_MODE_FLAG_BIT(w)    ((((uint32_t)w)&0x1)<<13)
-#define PUT_HPD_BSD_IMG_MONOCHROME_FLAG_BIT(w)            ((((uint32_t)w)&0x1)<<14)
-#define PUT_HPD_BSD_IMG_GREY_NONEXISTING_FLAG_BIT(w)      ((((uint32_t)w)&0x1)<<15)
-#define PUT_HPD_BSD_IMG_QM_PRESENT_FLAG_BIT(w)            ((((uint32_t)w)&0x1)<<16)
-#define PUT_HPD_BSD_IMG_QM_LIST_FLAGS_BITS(w)             ((((uint32_t)w)&0xFF)<<17)
-#define PUT_HPD_BSD_IMG_MONOCHROME_PWT_FLAG_BIT(w)        ((((uint32_t)w)&0x1)<<25)
-
-
-extern void h264_dpb_store_previous_picture_in_dpb(h264_Info * pInfo,
-        int32_t NonExisting,
-        int32_t use_old);
-
-extern void h264_dpb_flush_dpb (h264_Info * pInfo,int32_t output_all, int32_t keep_complement, int32_t num_ref_frames);
-
-
-
-void h264_translate_parser_info_to_frame_attributes(viddec_workload_t *wl, h264_Info *pInfo)
-{
-
-    viddec_frame_attributes_t *attrs = &wl->attrs;
-
-
-
-    //// Cont_size
-    attrs->cont_size.height       = pInfo->img.FrameHeightInMbs*16;
-    attrs->cont_size.width        = pInfo->img.PicWidthInMbs*16;
-
-    //// The following attributes will be updated in slice level
-    attrs->h264.used_for_reference = 0;
-    attrs->h264.top_field_first = 0;
-    attrs->h264.top_field_poc = 0;
-    attrs->h264.bottom_field_poc = 0;
-    attrs->h264.field_pic_flag = 0;
-
-#if 1
-/// Double check the size late!!!!!
-    //attrs->h264.cropped_size.width = pInfo->img.PicWidthInMbs*16;
-    //attrs->h264.cropped_size.height = pInfo->img.PicWidthInMbs*16;
-
-    if ( (pInfo->active_SPS.sps_disp.frame_cropping_flag) &&
-            (pInfo->active_SPS.sps_disp.chroma_format_idc < 4))
-    {
-        int32_t CropUnitX, CropUnitY;
-        int32_t SubWidthC, SubHeightC;
-
-        if (pInfo->active_SPS.sps_disp.chroma_format_idc == 0)
-        {
-            CropUnitX = 1;
-            CropUnitY = 2 - pInfo->active_SPS.sps_disp.frame_mbs_only_flag;
-        }
-        else
-        {
-            SubWidthC = 2 - ((pInfo->active_SPS.sps_disp.chroma_format_idc - 1) >> 1);
-            SubHeightC = 2 - ((pInfo->active_SPS.sps_disp.chroma_format_idc - 1) >>1)
-                         - ((pInfo->active_SPS.sps_disp.chroma_format_idc - 1) & 0x1);
-            CropUnitX = SubWidthC;
-            CropUnitY = SubHeightC * (2 - pInfo->active_SPS.sps_disp.frame_mbs_only_flag);
-        }
-
-        if ((int32_t)attrs->cont_size.height >(pInfo->active_SPS.sps_disp.frame_crop_rect_bottom_offset*CropUnitY))
-        {
-            attrs->cont_size.height -= (pInfo->active_SPS.sps_disp.frame_crop_rect_bottom_offset*CropUnitY);
-            //attrs->h264.cropped_size.height-= (pInfo->active_SPS.sps_disp.frame_crop_rect_bottom_offset*CropUnitY);
-        }
-    }
-/// Pan-Scan Info
-
-#endif
-
-}
-
-
-static void h264_parse_update_frame_attributes(void *parent, h264_Info *pInfo)
-{
-    viddec_workload_t        *wl_cur,  *wl_next;
-    viddec_frame_attributes_t *attrs;
-    uint8_t    frame_type=0;
-
-
-    if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-    {
-        wl_cur = viddec_pm_get_header( parent );
-        attrs = &wl_cur->attrs;
-    }
-    else
-    {
-        wl_next = viddec_pm_get_next_header (parent);
-        attrs = &wl_next->attrs;
-    }
-
-    /////////update frame type
-    if ((pInfo->dpb.fs[pInfo->dpb.fs_dec_idc].pic_type)&(0x1 << FRAME_TYPE_STRUCTRUE_OFFSET))
-    {
-        frame_type = ( (pInfo->dpb.fs[pInfo->dpb.fs_dec_idc].pic_type)&((0x7 << FRAME_TYPE_FRAME_OFFSET)) )>> FRAME_TYPE_FRAME_OFFSET;
-        switch (frame_type)
-        {
-        case FRAME_TYPE_IDR:
-            attrs->frame_type = VIDDEC_FRAME_TYPE_IDR;
-            break;
-        case FRAME_TYPE_I:
-            attrs->frame_type = VIDDEC_FRAME_TYPE_I;
-            break;
-        case FRAME_TYPE_P:
-            attrs->frame_type = VIDDEC_FRAME_TYPE_P;
-            break;
-        case FRAME_TYPE_B:
-            attrs->frame_type = VIDDEC_FRAME_TYPE_B;
-            break;
-        default:
-            attrs->frame_type = VIDDEC_FRAME_TYPE_INVALID;
-            break;
-        }
-
-        attrs->bottom_field_type = VIDDEC_FRAME_TYPE_INVALID;
-    }
-    else
-    {
-        frame_type = ( (pInfo->dpb.fs[pInfo->dpb.fs_dec_idc].pic_type)&((0x7 << FRAME_TYPE_TOP_OFFSET)) )>> FRAME_TYPE_TOP_OFFSET;
-        switch (frame_type)
-        {
-        case FRAME_TYPE_IDR:
-            attrs->frame_type = VIDDEC_FRAME_TYPE_IDR;
-            break;
-        case FRAME_TYPE_I:
-            attrs->frame_type = VIDDEC_FRAME_TYPE_I;
-            break;
-        case FRAME_TYPE_P:
-            attrs->frame_type = VIDDEC_FRAME_TYPE_P;
-            break;
-        case FRAME_TYPE_B:
-            attrs->frame_type = VIDDEC_FRAME_TYPE_B;
-            break;
-        default:
-            attrs->frame_type = VIDDEC_FRAME_TYPE_INVALID;
-            break;
-
-        }
-
-        frame_type = ( (pInfo->dpb.fs[pInfo->dpb.fs_dec_idc].pic_type)&((0x7 << FRAME_TYPE_BOTTOM_OFFSET)) )>> FRAME_TYPE_BOTTOM_OFFSET;
-        switch (frame_type)
-        {
-        case FRAME_TYPE_IDR:
-            attrs->bottom_field_type = VIDDEC_FRAME_TYPE_IDR;
-            break;
-        case FRAME_TYPE_I:
-            attrs->bottom_field_type = VIDDEC_FRAME_TYPE_I;
-            break;
-        case FRAME_TYPE_P:
-            attrs->bottom_field_type = VIDDEC_FRAME_TYPE_P;
-            break;
-        case FRAME_TYPE_B:
-            attrs->bottom_field_type = VIDDEC_FRAME_TYPE_B;
-            break;
-        default:
-            attrs->bottom_field_type = VIDDEC_FRAME_TYPE_INVALID;
-            break;
-
-        }
-    }
-
-    /////////update is_referece flag
-    attrs->h264.used_for_reference |= (pInfo->SliceHeader.nal_ref_idc == 0)? 0: 1;
-
-    /////////update POC
-    attrs->h264.top_field_poc = pInfo->img.toppoc;
-    attrs->h264.bottom_field_poc = pInfo->img.bottompoc;
-
-    //////// update TFF
-    if (attrs->h264.top_field_poc <= attrs->h264.bottom_field_poc) {
-        attrs->h264.top_field_first = 1;
-    } else {
-        attrs->h264.top_field_first = 0;
-    }
-
-    /////// update field_pic_flag
-    //attrs->h264.field_pic_flag |= (pInfo->SliceHeader.field_pic_flag << pInfo->SliceHeader.bottom_field_flag);
-    attrs->h264.field_pic_flag |= pInfo->SliceHeader.field_pic_flag;
-
-    return;
-}
-
-
-static void h264_fill_slice_data(h264_Info *pInfo, h264_slice_data * p_slice_data)
-{
-    uint32_t data=0;
-    uint32_t first_mb_in_slice =0;
-
-
-
-    ////////////fill pic parameters 1
-    data =   PUT_BSD_PP1_IMG_DISPOSABLE_FLAG_BIT( (pInfo->SliceHeader.nal_ref_idc == 0) ) +
-             PUT_BSD_PP1_SLICE_TYPE_BITS(pInfo->SliceHeader.slice_type) +
-             PUT_BSD_PP1_WEIGHTED_BIPRED_IDC_BITS(pInfo->active_PPS.weighted_bipred_idc) +
-             PUT_BSD_PP1_WEIGHTED_PRED_FLAG_BIT(pInfo->active_PPS.weighted_pred_flag)  +
-             PUT_BSD_PP1_NUM_REF_IDX_L0_BITS(pInfo->SliceHeader.num_ref_idx_l0_active)  +
-             PUT_BSD_PP1_NUM_REF_IDX_L1_BITS(pInfo->SliceHeader.num_ref_idx_l1_active);
-    p_slice_data->h264_bsd_slice_p1 = data;
-
-
-    ///////////fill pic parameters 2
-    data =   PUT_BSD_PP2_CABAC_INIT_IDC_BITS(pInfo->SliceHeader.cabac_init_idc) +
-             PUT_BSD_PP2_QP_BITS( (pInfo->SliceHeader.slice_qp_delta + pInfo->active_PPS.pic_init_qp_minus26+26) ) +
-             PUT_BSD_PP2_DISABLE_DBF_IDC_BITS(pInfo->SliceHeader.disable_deblocking_filter_idc) +
-             PUT_BSD_PP2_ALPHA_C0_OFFSET_DIV2_BITS(pInfo->SliceHeader.slice_alpha_c0_offset_div2) +
-             PUT_BSD_PP2_BETA_OFFSET_DIV2_BITS(pInfo->SliceHeader.slice_beta_offset_div2) +
-             PUT_BSD_PP2_IMG_DIRECT_TYPE_BIT(pInfo->SliceHeader.direct_spatial_mv_pred_flag) +
-             PUT_BSD_PP2_CHROMA_QP_OFFSET_BITS(pInfo->active_PPS.chroma_qp_index_offset) +
-             PUT_BSD_PP2_CHROMA_QP_OFFSET_2_BITS(pInfo->active_PPS.second_chroma_qp_index_offset);
-
-    p_slice_data->h264_bsd_slice_p2 = data;
-
-    /////////fill slice start
-    first_mb_in_slice = pInfo->SliceHeader.first_mb_in_slice;
-
-    data =   PUT_BSD_SS_START_ADDR_BITS(first_mb_in_slice);
-    data |=  PUT_BSD_SS_SKIP_FS_IDC_BITS( pInfo->h264_list_replacement) |
-             PUT_BSD_SS_SKIP_TYPE_BIT(0) |
-             PUT_BSD_SS_SKIP_REWIND_BITS((pInfo->img.MbaffFrameFlag? 2: 3));
-
-    p_slice_data->h264_bsd_slice_start = data;
-
-}
-
-
-static void h264_parse_emit_4X4_scaling_matrix( void *parent, h264_Info *pInfo )
-{
-
-    viddec_workload_item_t     wi;
-
-    uint32_t                   i=0, n_items=0;
-    uint32_t                   qm_type=0;
-
-
-    for ( i = 0; i < 6; i++ )
-    {
-        qm_type = FB_QM;
-        if (pInfo->active_SPS.seq_scaling_matrix_present_flag) // check sps first
-        {
-            if (pInfo->active_SPS.seq_scaling_list_present_flag[i])
-            {
-                pInfo->qm_present_list |= ((0x1)<<i);
-
-                if (pInfo->active_SPS.UseDefaultScalingMatrix4x4Flag[i]) {
-                    qm_type = DEFAULT_QM;
-                } else {
-                    qm_type = SPS_QM;
-                }
-            }
-        }
-
-        if (pInfo->active_PPS.pic_scaling_matrix_present_flag) // then check pps
-        {
-            if (pInfo->active_PPS.pic_scaling_list_present_flag[i])
-            {
-                pInfo->qm_present_list |= ((0x1)<<i);
-                if (pInfo->active_PPS.UseDefaultScalingMatrix4x4Flag[i]) {
-                    qm_type = DEFAULT_QM;
-                } else {
-                    qm_type = PPS_QM;
-                }
-            }
-            else
-            {
-                if ((i != 0) && (i != 3) && (i < 6)) {
-                    pInfo->qm_present_list  &= ~((0x1)<<i);
-                    qm_type = FB_QM;
-                }
-            }
-        }
-
-
-        ///////////////////// Emit out Scaling_matrix//////////////////////
-        wi.vwi_type = VIDDEC_WORKLOAD_H264_SCALING_MATRIX;
-        //    data_offset    0x aa  bb  cc  dd
-        //    bb    is the workload item offset
-        //    cc    is the qm_type
-        //    dd    is the matrix number
-        //
-        switch (qm_type)
-        {
-        case (SPS_QM): {
-
-            for (n_items =0; n_items<2; n_items++)
-            {
-                wi.data.data_offset = i + (SPS_QM << 4) + (n_items <<8);
-                wi.data.data_payload[0] = ((uint32_t)(pInfo->active_SPS.ScalingList4x4[i][n_items*8+0]))+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList4x4[i][n_items*8+1]))<<8)+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList4x4[i][n_items*8+2]))<<16)+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList4x4[i][n_items*8+3]))<<24);
-                wi.data.data_payload[1] = ((uint32_t)(pInfo->active_SPS.ScalingList4x4[i][n_items*8+4]))+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList4x4[i][n_items*8+5]))<<8)+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList4x4[i][n_items*8+6]))<<16)+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList4x4[i][n_items*8+7]))<<24);
-                //cur is empty, fill new frame in cur
-                viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-            }
-
-            break;
-        }
-        case (PPS_QM): {
-
-            for (n_items =0; n_items<2; n_items++)
-            {
-                wi.data.data_offset = i + (PPS_QM << 4) + (n_items <<8);
-                wi.data.data_payload[0] = ((uint32_t)(pInfo->active_PPS.ScalingList4x4[i][n_items*8+0]))+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList4x4[i][n_items*8+1]))<<8)+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList4x4[i][n_items*8+2]))<<16)+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList4x4[i][n_items*8+3]))<<24);
-                wi.data.data_payload[1] = ((uint32_t)(pInfo->active_PPS.ScalingList4x4[i][n_items*8+4]))+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList4x4[i][n_items*8+5]))<<8)+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList4x4[i][n_items*8+6]))<<16)+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList4x4[i][n_items*8+7]))<<24);
-                //cur is empty, fill new frame in cur
-                viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-            }
-
-            break;
-        }
-        case (DEFAULT_QM):
-        {
-
-            wi.data.data_offset = i + (DEFAULT_QM << 4);
-            wi.data.data_payload[0] = 0;
-            wi.data.data_payload[1] = 0;
-            //cur is empty, fill new frame in cur
-            viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-            break;
-        }
-        default:
-        {
-            break;
-        }
-        }
-    }
-
-}
-
-static void h264_parse_emit_8X8_scaling_matrix( void *parent, h264_Info *pInfo )
-{
-
-    viddec_workload_item_t     wi;
-
-    uint32_t                   i=0, n_items=0;
-    uint32_t                   qm_type=0;
-
-    for ( i = 6; i < 8; i++ )
-    {
-        qm_type = FB_QM;
-        if (pInfo->active_SPS.seq_scaling_matrix_present_flag) // check sps first
-        {
-            if (pInfo->active_SPS.seq_scaling_list_present_flag[i])
-            {
-                pInfo->qm_present_list |= ((0x1)<<i);
-
-                if (pInfo->active_SPS.UseDefaultScalingMatrix8x8Flag[i-6])
-                {
-                    qm_type = DEFAULT_QM;
-                }
-                else
-                {
-                    qm_type = SPS_QM;
-                }
-            }
-        }
-
-        if (pInfo->active_PPS.pic_scaling_matrix_present_flag) // then check pps
-        {
-            if (pInfo->active_PPS.pic_scaling_list_present_flag[i])
-            {
-                pInfo->qm_present_list |= ((0x1)<<i);
-
-                if (pInfo->active_PPS.UseDefaultScalingMatrix8x8Flag[i-6])
-                {
-                    qm_type = DEFAULT_QM;
-                }
-                else
-                {
-                    qm_type = PPS_QM;
-                }
-            }
-        }
-        wi.vwi_type = VIDDEC_WORKLOAD_H264_SCALING_MATRIX;
-
-        //    data_offset    0x aa  bb  cc  dd
-        //    bb    is the workload item offset
-        //    cc    is the qm_type
-        //    dd    is the matrix number
-        //
-        switch (qm_type)
-        {
-        case (SPS_QM):
-        {
-            for (n_items =0; n_items<8; n_items++)
-            {
-                wi.data.data_offset = i + (SPS_QM << 4) + (n_items <<8);
-                wi.data.data_payload[0] = ((uint32_t)(pInfo->active_SPS.ScalingList8x8[i-6][n_items*8+0]))+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList8x8[i-6][n_items*8+1]))<<8)+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList8x8[i-6][n_items*8+2]))<<16)+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList8x8[i-6][n_items*8+3]))<<24);
-                wi.data.data_payload[1] = ((uint32_t)(pInfo->active_SPS.ScalingList8x8[i-6][n_items*8+4]))+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList8x8[i-6][n_items*8+5]))<<8)+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList8x8[i-6][n_items*8+6]))<<16)+
-                                          (((uint32_t)(pInfo->active_SPS.ScalingList8x8[i-6][n_items*8+7]))<<24);
-                //cur is empty, fill new frame in cur
-                viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-            }
-            break;
-        }
-        case (PPS_QM):
-        {
-            for (n_items =0; n_items<8; n_items++)
-            {
-                wi.data.data_offset = i + (PPS_QM << 4) + (n_items <<8);
-                wi.data.data_payload[0] = ((uint32_t)(pInfo->active_PPS.ScalingList8x8[i-6][n_items*8+0]))+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList8x8[i-6][n_items*8+1]))<<8)+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList8x8[i-6][n_items*8+2]))<<16)+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList8x8[i-6][n_items*8+3]))<<24);
-                wi.data.data_payload[1] = ((uint32_t)(pInfo->active_PPS.ScalingList8x8[i-6][n_items*8+4]))+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList8x8[i-6][n_items*8+5]))<<8)+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList8x8[i-6][n_items*8+6]))<<16)+
-                                          (((uint32_t)(pInfo->active_PPS.ScalingList8x8[i-6][n_items*8+7]))<<24);
-                //cur is empty, fill new frame in cur
-                viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-            }
-            break;
-        }
-        case (DEFAULT_QM):
-        {
-            wi.data.data_offset = i + (DEFAULT_QM << 4);
-            wi.data.data_payload[0] = 0;
-            wi.data.data_payload[1] = 0;
-            //cur is empty, fill new frame in cur
-            viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-            break;
-        }
-        default: {
-            break;
-        }
-        }
-    }
-
-}
-
-
-
-static void h264_fill_pic_data(h264_Info *pInfo, h264_pic_data * p_pic_data)
-{
-    uint32_t data=0;
-    uint32_t dec_idc =0;
-    uint32_t frame_structure =0;
-
-    //fill h264_dpb_init
-    data =   PUT_FRAME_WIDTH_MB_BITS(pInfo->dpb.PicWidthInMbs) +
-             PUT_FRAME_HEIGHT_MB_BITS(pInfo->dpb.FrameHeightInMbs);
-
-    p_pic_data->h264_dpb_init = data;
-
-    ////////////////////////////////file current pic info
-    data = 0;
-    dec_idc = pInfo->dpb.fs_dec_idc;
-    frame_structure = pInfo->img.structure;
-    if (frame_structure == FRAME)
-        frame_structure=0;
-    //data =  PUT_BSD_IMAGE_FRAME_STORE_IDC_BITS(pInfo->dpb.fs[dec_idc].fs_idc);
-
-    //p_pic_data->h264_cur_bsd_img_init= data;
-
-    data  =  PUT_BSD_IMAGE_STRUCTURE_BITS(frame_structure)  +
-             PUT_BSD_IMAGE_IDR_BIT(pInfo->nal_unit_type == h264_NAL_UNIT_TYPE_IDR) +
-             PUT_BSD_IMAGE_MBAFF_FRAME_FLAG_BIT(pInfo->img.MbaffFrameFlag) +
-             PUT_BSD_IMAGE_ENTROPY_CODING_MODE_FLAG_BIT(pInfo->active_PPS.entropy_coding_mode_flag) +
-             PUT_BSD_IMAGE_CONSTRAINED_INTRA_PRED_FLAG_BIT(pInfo->active_PPS.constrained_intra_pred_flag) +
-             PUT_BSD_IMG_FRAME_MBS_ONLY_FLAG_BIT(pInfo->active_SPS.sps_disp.frame_mbs_only_flag) +
-             PUT_BSD_IMG_DIRECT_8X8_INFER_FLAG_BIT(pInfo->active_SPS.sps_disp.direct_8x8_inference_flag) +
-             PUT_HPD_BSD_IMG_TRANSFORM_8X8_MODE_FLAG_BIT(pInfo->active_PPS.transform_8x8_mode_flag) +
-             PUT_HPD_BSD_IMG_MONOCHROME_FLAG_BIT(((pInfo->active_SPS.sps_disp.chroma_format_idc==0)? 0x1: 0x0)) +
-             PUT_HPD_BSD_IMG_GREY_NONEXISTING_FLAG_BIT(0x0) +
-             PUT_HPD_BSD_IMG_QM_PRESENT_FLAG_BIT((pInfo->active_PPS.pic_scaling_matrix_present_flag||pInfo->active_SPS.seq_scaling_matrix_present_flag)) +
-             PUT_HPD_BSD_IMG_QM_LIST_FLAGS_BITS(pInfo->qm_present_list) +
-             PUT_HPD_BSD_IMG_MONOCHROME_PWT_FLAG_BIT(0x1) +
-             PUT_BSD_IMAGE_FRAME_STORE_IDC_BITS(pInfo->dpb.fs[dec_idc].fs_idc);
-
-    p_pic_data->h264_cur_bsd_img_init= data;
-
-    //to do: add qm list
-    //PUT_HPD_BSD_IMG_QM_LIST_FLAGS_BITS(pInfo->img.q .qm_present_list) +
-    //printf("structure = %d, tpoc = %d, bpoc = %d\n", pInfo->img.structure, pInfo->img.toppoc, pInfo->img.bottompoc);
-
-    if (pInfo->img.structure == FRAME)
-    {
-        // Write down POC
-        p_pic_data->h264_cur_mpr_tf_poc = pInfo->img.toppoc;
-        p_pic_data->h264_cur_mpr_bf_poc = pInfo->img.bottompoc;
-    } else if (pInfo->img.structure == TOP_FIELD)
-    {
-        // Write down POC
-        p_pic_data->h264_cur_mpr_tf_poc = pInfo->img.toppoc;
-        p_pic_data->h264_cur_mpr_bf_poc = 0;
-    }
-    else if (pInfo->img.structure ==  BOTTOM_FIELD)
-    {
-        // Write down POC
-        p_pic_data->h264_cur_mpr_tf_poc = 0;
-        p_pic_data->h264_cur_mpr_bf_poc = pInfo->img.bottompoc;
-    }
-    else
-    {
-        // Write down POC
-        p_pic_data->h264_cur_mpr_tf_poc = 0;
-        p_pic_data->h264_cur_mpr_bf_poc = 0;
-    }
-
-    return;
-}
-
-static void h264_parse_emit_sps(void *parent, h264_Info *pInfo)
-{
-    viddec_workload_item_t     wi;
-
-    if (pInfo->Is_SPS_updated)
-    {
-        viddec_fw_reset_workload_item(&wi);
-        wi.vwi_type = VIDDEC_WORKLOAD_SEQUENCE_INFO;
-
-        viddec_fw_h264_sps_set_profile_idc(&(wi.h264_sps), pInfo->active_SPS.profile_idc);
-        viddec_fw_h264_sps_set_level_idc(&(wi.h264_sps), pInfo->active_SPS.level_idc);
-        viddec_fw_h264_sps_set_chroma_format_idc(&(wi.h264_sps), pInfo->active_SPS.sps_disp.chroma_format_idc);
-        viddec_fw_h264_sps_set_num_ref_frames(&(wi.h264_sps), pInfo->active_SPS.num_ref_frames);
-        viddec_fw_h264_sps_set_gaps_in_frame_num_value_allowed_flag(&(wi.h264_sps), pInfo->active_SPS.gaps_in_frame_num_value_allowed_flag);
-        viddec_fw_h264_sps_set_frame_mbs_only_flag(&(wi.h264_sps), pInfo->active_SPS.sps_disp.frame_mbs_only_flag);
-        viddec_fw_h264_sps_set_frame_cropping_flag(&(wi.h264_sps), pInfo->active_SPS.sps_disp.frame_cropping_flag);
-        viddec_fw_h264_sps_set_vui_parameters_present_flag(&(wi.h264_sps), pInfo->active_SPS.sps_disp.vui_parameters_present_flag);
-        wi.h264_sps.pic_width_in_mbs_minus1 = pInfo->active_SPS.sps_disp.pic_width_in_mbs_minus1;
-        wi.h264_sps.pic_height_in_map_units_minus1 = pInfo->active_SPS.sps_disp.pic_height_in_map_units_minus1;
-
-        //cur is empty, fill new frame in cur
-        viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-
-        viddec_fw_reset_workload_item(&wi);
-        if (pInfo->active_SPS.sps_disp.frame_cropping_flag)
-        {
-            wi.vwi_type = VIDDEC_WORKLOAD_H264_CROPPING;
-            viddec_fw_h264_cropping_set_left(&(wi.h264_cropping), pInfo->active_SPS.sps_disp.frame_crop_rect_left_offset);
-            viddec_fw_h264_cropping_set_right(&(wi.h264_cropping), pInfo->active_SPS.sps_disp.frame_crop_rect_right_offset);
-            viddec_fw_h264_cropping_set_top(&(wi.h264_cropping), pInfo->active_SPS.sps_disp.frame_crop_rect_top_offset);
-            viddec_fw_h264_cropping_set_bottom(&(wi.h264_cropping), pInfo->active_SPS.sps_disp.frame_crop_rect_bottom_offset);
-            //cur is empty, fill new frame in cur
-            viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-        }
-        viddec_fw_reset_workload_item(&wi);
-        if (pInfo->active_SPS.sps_disp.vui_parameters_present_flag == 1)
-        {
-            wi.vwi_type = VIDDEC_WORKLOAD_DISPLAY_INFO;
-            viddec_fw_h264_vui_set_aspect_ratio_info_present_flag(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.aspect_ratio_info_present_flag);
-            viddec_fw_h264_vui_set_video_signal_type_present_flag(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.video_signal_type_present_flag);
-            viddec_fw_h264_vui_set_pic_struct_present_flag(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.pic_struct_present_flag);
-            viddec_fw_h264_vui_set_timing_info_present_flag(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.timing_info_present_flag);
-            viddec_fw_h264_vui_set_nal_hrd_parameters_present_flag(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.nal_hrd_parameters_present_flag);
-            viddec_fw_h264_vui_set_vcl_hrd_parameters_present_flag(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.vcl_hrd_parameters_present_flag);
-
-            if (pInfo->active_SPS.sps_disp.vui_seq_parameters.aspect_ratio_info_present_flag == 1)
-            {
-                viddec_fw_h264_vui_set_aspect_ratio_idc(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.aspect_ratio_idc);
-                if (h264_AR_Extended_SAR == pInfo->active_SPS.sps_disp.vui_seq_parameters.aspect_ratio_idc)
-                {
-                    viddec_fw_h264_vui_set_sar_width(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.sar_width);
-                    viddec_fw_h264_vui_set_sar_height(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.sar_height);
-                }
-            }
-
-
-            if (pInfo->active_SPS.sps_disp.vui_seq_parameters.video_signal_type_present_flag)
-            {
-                viddec_fw_h264_vui_set_colour_description_present_flag(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.colour_description_present_flag);
-                if (pInfo->active_SPS.sps_disp.vui_seq_parameters.colour_description_present_flag)
-                {
-                    viddec_fw_h264_vui_set_colour_primaries(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.colour_primaries);
-                    viddec_fw_h264_vui_set_transfer_characteristics(&(wi.h264_vui),  pInfo->active_SPS.sps_disp.vui_seq_parameters.transfer_characteristics);
-                }
-                viddec_fw_h264_vui_set_video_format(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.video_format);
-            }
-
-            if (pInfo->active_SPS.sps_disp.vui_seq_parameters.timing_info_present_flag == 1)
-            {
-                viddec_fw_h264_vui_set_fixed_frame_rate_flag(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.fixed_frame_rate_flag);
-            }
-
-            if ( (pInfo->active_SPS.sps_disp.vui_seq_parameters.nal_hrd_parameters_present_flag == 1)
-                    || (pInfo->active_SPS.sps_disp.vui_seq_parameters.vcl_hrd_parameters_present_flag == 1))
-            {
-                viddec_fw_h264_vui_set_low_delay_hrd_flag(&(wi.h264_vui), pInfo->active_SPS.sps_disp.vui_seq_parameters.low_delay_hrd_flag);
-            }
-
-            //cur is empty, fill new frame in cur
-            viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-        }
-
-        viddec_fw_reset_workload_item(&wi);
-
-        if (pInfo->active_SPS.sps_disp.vui_seq_parameters.timing_info_present_flag == 1)
-        {
-            wi.vwi_type = VIDDEC_WORKLOAD_H264_VUI_TIMING_INFO;
-
-            wi.h264_vui_time_info.num_units_in_tick = pInfo->active_SPS.sps_disp.vui_seq_parameters.num_units_in_tick;
-            wi.h264_vui_time_info.time_scale = pInfo->active_SPS.sps_disp.vui_seq_parameters.time_scale;
-            //cur is empty, fill new frame in cur
-            viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-        }
-        pInfo->Is_SPS_updated =0;
-
-    }
-
-    return;
-}
-
-
-
-
-static void h264_parse_emit_ref_list( void *parent, h264_Info *pInfo, uint32_t list_id)
-{
-    uint32_t  i=0, nitems=0, byte_index=0, data=0, data_writed=0;
-    uint8_t    *p_list;
-    viddec_workload_item_t     wi;
-
-    if (0 == list_id)
-    {
-        wi.vwi_type = VIDDEC_WORKLOAD_H264_REFR_LIST_0;
-
-        if ( (h264_PtypeB==pInfo->SliceHeader.slice_type)||(h264_PtypeP==pInfo->SliceHeader.slice_type) )
-        {
-            nitems = pInfo->SliceHeader.num_ref_idx_l0_active;
-            if (pInfo->SliceHeader.sh_refpic_l0.ref_pic_list_reordering_flag)
-            {
-                p_list = pInfo->slice_ref_list0;
-            }
-            else
-            {
-                p_list = pInfo->dpb.listX_0;
-            }
-        }
-        else
-        {
-            nitems =0;
-            p_list = pInfo->dpb.listX_0;
-        }
-    }
-    else
-    {
-        wi.vwi_type = VIDDEC_WORKLOAD_H264_REFR_LIST_1;
-
-        if ( h264_PtypeB==pInfo->SliceHeader.slice_type)
-        {
-            nitems = pInfo->SliceHeader.num_ref_idx_l1_active;
-            if (pInfo->SliceHeader.sh_refpic_l1.ref_pic_list_reordering_flag)
-            {
-                p_list = pInfo->slice_ref_list1;
-            }
-            else
-            {
-                p_list = pInfo->dpb.listX_1;
-            }
-        }
-        else
-        {
-            nitems = 0;
-            p_list = pInfo->dpb.listX_1;
-        }
-
-    }
-
-    if (0 == nitems)
-    {
-        return;
-    }
-
-    byte_index =0;
-    data_writed=0;
-
-
-    for (i=0; i < 32; i++)
-    {
-        if (byte_index == 0) data = 0;
-
-        if (i<nitems)
-        {
-            if ( viddec_h264_get_is_non_existent(&(pInfo->dpb.fs[ (p_list[i]&0x1f) ])))
-            {
-                data |= (pInfo->h264_list_replacement) << byte_index;
-            }
-            else
-            {
-                data |= (p_list[i] & 0x7f) << byte_index;
-            }
-        }
-        else
-        {
-            data |= (0x80) << byte_index;
-        }
-
-
-        if (byte_index == 24)
-        {
-            byte_index = 0;
-            wi.data.data_offset = data_writed&(~0x1);
-            wi.data.data_payload[data_writed&0x1]=data;
-
-            data =0;
-
-            if (data_writed&0x1)
-            {
-                //cur is empty, fill new frame in cur
-                viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-            }
-            data_writed ++;
-        }
-        else
-        {
-            byte_index += 8;
-        }
-    }
-
-}
-
-
-
-void h264_parse_emit_current_slice( void *parent, h264_Info *pInfo )
-{
-
-    viddec_workload_item_t     wi;
-    h264_slice_data 				slice_data;
-
-    uint32_t		i=0, nitems=0, data=0;
-    uint32_t 	bits_offset =0, byte_offset =0;
-    uint8_t    	is_emul =0;
-
-    ////////////////////// Update frame attributes/////////////////
-    h264_parse_update_frame_attributes(parent,pInfo);
-
-
-    if (pInfo->SliceHeader.sh_error) {
-        // Error type definition, refer to viddec_fw_common_defs.h
-        //		if error in top field, VIDDEC_FW_WORKLOAD_ERR_TOPFIELD			= (1 << 17)
-        //		if error in bottom field, VIDDEC_FW_WORKLOAD_ERR_BOTTOMFIELD	   = (1 << 18)
-        //		if this is frame based, both 2 bits should be set
-
-        if (pInfo->push_to_cur) {
-            pInfo->wl_err_curr |= VIDDEC_FW_WORKLOAD_ERR_NOTDECODABLE;
-            pInfo->wl_err_curr |= (pInfo->SliceHeader.structure << FIELD_ERR_OFFSET);
-        } else {
-            pInfo->wl_err_next |= VIDDEC_FW_WORKLOAD_ERR_NOTDECODABLE;
-            pInfo->wl_err_next |= (pInfo->SliceHeader.structure << FIELD_ERR_OFFSET);
-        }
-    }
-
-
-    ////////////////////// Update Reference list //////////////////
-    if ( (h264_PtypeB==pInfo->SliceHeader.slice_type)||(h264_PtypeP==pInfo->SliceHeader.slice_type) )
-    {
-        if (pInfo->SliceHeader.sh_refpic_l0.ref_pic_list_reordering_flag)
-        {
-            nitems = pInfo->SliceHeader.num_ref_idx_l0_active;
-
-            for (i=0; i<nitems; i++)
-            {
-                if (viddec_h264_get_is_non_existent(&(pInfo->dpb.fs[pInfo->slice_ref_list0[i]&0x1f]))==0)
-                {
-                    pInfo->h264_list_replacement = (pInfo->slice_ref_list0[i]&0xFF)|0x80;
-                    break;
-                }
-            }
-        }
-        else
-        {
-            nitems = pInfo->dpb.listXsize[0];
-
-            for (i=0; i<nitems; i++)
-            {
-                if (viddec_h264_get_is_non_existent(&(pInfo->dpb.fs[pInfo->dpb.listX_0[i]&0x1f]))==0)
-                {
-                    pInfo->h264_list_replacement = (pInfo->dpb.listX_0[i]&0xFF)|0x80;
-                    break;
-                }
-            }
-        }
-
-    }
-    else
-    {
-        nitems =0;
-    }
-    /////file ref list 0
-    h264_parse_emit_ref_list(parent, pInfo, 0);
-
-    /////file ref list 1
-    h264_parse_emit_ref_list(parent, pInfo, 1);
-
-    ///////////////////////////////////// Slice Data ////////////////////////////////
-    h264_fill_slice_data(pInfo, &slice_data);
-
-    wi.vwi_type = VIDDEC_WORKLOAD_H264_SLICE_REG;
-
-    wi.data.data_offset = slice_data.h264_bsd_slice_start;
-    wi.data.data_payload[0] = slice_data.h264_bsd_slice_p1;
-    wi.data.data_payload[1] = slice_data.h264_bsd_slice_p2;
-
-    //cur is empty, fill new frame in cur
-    viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-
-    ///////////////////////////predict weight table item and data if have///////////////////////////
-    if (pInfo->h264_pwt_enabled)
-    {
-        wi.vwi_type = VIDDEC_WORKLOAD_H264_PWT_BITS_OFFSET;
-        wi.data.data_offset = pInfo->h264_pwt_end_byte_offset- pInfo->h264_pwt_start_byte_offset+1;
-        wi.data.data_payload[0] = pInfo->h264_pwt_start_bit_offset;
-        wi.data.data_payload[1] = pInfo->h264_pwt_end_bit_offset;
-
-        if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-        {
-            viddec_pm_append_workitem( parent , &wi, false);
-
-            wi.vwi_type = VIDDEC_WORKLOAD_H264_PWT_ES_BYTES;
-            wi.es.es_flags = 0;
-            viddec_pm_append_misc_tags(parent, pInfo->h264_pwt_start_byte_offset, pInfo->h264_pwt_end_byte_offset,&wi,1);
-        }
-        else
-        {
-            viddec_pm_append_workitem( parent , &wi, true);
-
-            wi.vwi_type = VIDDEC_WORKLOAD_H264_PWT_ES_BYTES;
-            wi.es.es_flags = 0;
-            viddec_pm_append_misc_tags(parent, pInfo->h264_pwt_start_byte_offset, pInfo->h264_pwt_end_byte_offset,&wi,0);
-        }
-    }
-
-
-    ////////////////////////////////// Update ES Buffer for Slice ///////////////////////
-    viddec_pm_get_au_pos(parent, &bits_offset, &byte_offset, &is_emul);
-
-    //OS_INFO("DEBUG---entropy_coding_mode_flag:%d, bits_offset: %d\n", pInfo->active_PPS.entropy_coding_mode_flag, bits_offset);
-
-    if (pInfo->active_PPS.entropy_coding_mode_flag)
-    {
-        if (0!=bits_offset)  {
-            viddec_pm_get_bits(parent, &data, 8-bits_offset);
-        }
-    }
-    else
-    {
-        if (0!=bits_offset)  {
-            wi.vwi_type = VIDDEC_WORKLOAD_H264_SH_BITS_OFFSET;
-            wi.data.data_offset = bits_offset;
-            wi.data.data_payload[0]=0;
-            wi.data.data_payload[1]=0;
-            //cur is empty, fill new frame in cur
-            viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-        }
-    }
-
-    if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-    {
-        viddec_pm_append_pixeldata( parent );
-    }
-    else
-    {
-        viddec_pm_append_pixeldata_next( parent);
-    }
-
-    return;
-}
-
-
-void h264_parse_emit_current_pic( void *parent, h264_Info *pInfo )
-{
-
-    viddec_workload_item_t     wi;
-
-    const uint32_t             *pl;
-    uint32_t                   i=0,nitems=0;
-
-    h264_pic_data pic_data;
-
-    pInfo->qm_present_list=0;
-
-    h264_parse_emit_4X4_scaling_matrix(parent, pInfo);
-    h264_parse_emit_8X8_scaling_matrix(parent, pInfo);
-
-    h264_fill_pic_data(pInfo, &pic_data);
-
-    // How many payloads must be generated
-    nitems = (sizeof(h264_pic_data) + 7) / 8; // In QWORDs rounded up
-
-    pl = (const uint32_t *) &pic_data;
-
-    // Dump slice data to an array of workitems,  to do pl access non valid mem
-    for ( i = 0; i < nitems; i++ )
-    {
-        wi.vwi_type           = VIDDEC_WORKLOAD_H264_PIC_REG;
-        wi.data.data_offset   = (unsigned int)pl - (unsigned int)&pic_data; // offset within struct
-        wi.data.data_payload[0] = pl[0];
-        wi.data.data_payload[1] = pl[1];
-        pl += 2;
-        //cur is empty, fill new frame in cur
-        viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-    }
-
-    return;
-}
-
-void h264_parse_emit_start_new_frame( void *parent, h264_Info *pInfo )
-{
-
-    viddec_workload_item_t     wi;
-    uint32_t                   i=0,nitems=0;
-
-    ///////////////////////// Frame attributes//////////////////////////
-
-    //Push data into current workload if first frame or frame_boundary already detected by non slice nal
-    if ( (pInfo->Is_first_frame_in_stream)||(pInfo->is_frame_boundary_detected_by_non_slice_nal))
-    {
-        viddec_workload_t			*wl_cur = viddec_pm_get_header( parent );
-        //pInfo->img.g_new_frame = 0;
-        pInfo->Is_first_frame_in_stream =0;
-        pInfo->is_frame_boundary_detected_by_non_slice_nal=0;
-        pInfo->push_to_cur = 1;
-        h264_translate_parser_info_to_frame_attributes(wl_cur, pInfo);
-    }
-    else  // move to cur if frame boundary detected by previous non slice nal, or move to next if not
-    {
-        viddec_workload_t        *wl_next = viddec_pm_get_next_header (parent);
-
-        pInfo->push_to_cur = 0;
-        h264_translate_parser_info_to_frame_attributes(wl_next, pInfo);
-
-        pInfo->is_current_workload_done=1;
-    }
-
-    ///////////////////// SPS/////////////////////
-    h264_parse_emit_sps(parent, pInfo);
-
-    /////////////////////display frames/////////////////////
-    nitems = pInfo->dpb.frame_numbers_need_to_be_displayed;
-
-    for (i=0; i<nitems; i++)
-    {
-        wi.vwi_type = VIDDEC_WORKLOAD_REF_FRAME_DISPLAY_0 + pInfo->dpb.frame_id_need_to_be_displayed[i];
-        wi.ref_frame.reference_id = pInfo->dpb.frame_id_need_to_be_displayed[i];
-        wi.ref_frame.luma_phys_addr = 0;
-        wi.ref_frame.chroma_phys_addr = 0;
-        //cur is empty, fill new frame in cur
-        viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-    }
-    pInfo->dpb.frame_numbers_need_to_be_displayed =0;
-
-
-    /////////////////////release frames/////////////////////
-    nitems = pInfo->dpb.frame_numbers_need_to_be_removed;
-
-    for (i=0; i<nitems; i++)
-    {
-        wi.vwi_type = VIDDEC_WORKLOAD_REF_FRAME_RELEASE_0 + pInfo->dpb.frame_id_need_to_be_removed[i];
-        wi.ref_frame.reference_id = pInfo->dpb.frame_id_need_to_be_removed[i];
-        wi.ref_frame.luma_phys_addr = 0;
-        wi.ref_frame.chroma_phys_addr = 0;
-        //cur is empty, fill new frame in cur
-        viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-    }
-    pInfo->dpb.frame_numbers_need_to_be_removed =0;
-
-    /////////////////////flust frames (do not display)/////////////////////
-    nitems = pInfo->dpb.frame_numbers_need_to_be_dropped;
-
-    for (i=0; i<nitems; i++)
-    {
-        wi.vwi_type = VIDDEC_WORKLOAD_REF_FRAME_DROPOUT_0 + pInfo->dpb.frame_id_need_to_be_dropped[i];
-        wi.ref_frame.reference_id = pInfo->dpb.frame_id_need_to_be_dropped[i];
-        wi.ref_frame.luma_phys_addr = 0;
-        wi.ref_frame.chroma_phys_addr = 0;
-        //cur is empty, fill new frame in cur
-        viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-    }
-    pInfo->dpb.frame_numbers_need_to_be_dropped =0;
-
-    /////////////////////updata DPB frames/////////////////////
-    nitems = pInfo->dpb.used_size;
-    for (i=0; i<nitems; i++)
-    {
-        uint8_t fs_id = pInfo->dpb.fs_dpb_idc[i];
-
-        if (viddec_h264_get_is_non_existent(&(pInfo->dpb.fs[fs_id])) == 0)
-        {
-            wi.vwi_type = VIDDEC_WORKLOAD_DPB_ACTIVE_FRAME_0+fs_id;
-            wi.ref_frame.reference_id = fs_id;
-            wi.ref_frame.luma_phys_addr = 0;
-            wi.ref_frame.chroma_phys_addr = 0;
-            //cur is empty, fill new frame in cur
-            viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-        }
-    }
-
-    /////////////////////updata dpb frames info (poc)/////////////////////
-    nitems = pInfo->dpb.used_size;
-    for (i=0; i<nitems; i++)
-    {
-        uint8_t fs_id = pInfo->dpb.fs_dpb_idc[i];
-
-        if (viddec_h264_get_is_non_existent(&(pInfo->dpb.fs[fs_id])) == 0)
-        {
-            wi.vwi_type = VIDDEC_WORKLOAD_H264_DPB_FRAME_POC;
-            wi.data.data_offset = fs_id;
-            //printf("is_used = %d, tpoc = %d, bpoc = %d\n", pInfo->dpb.fs[fs_id].is_used, pInfo->dpb.fs[fs_id].top_field.poc, pInfo->dpb.fs[fs_id].bottom_field.poc);
-
-            switch (viddec_h264_get_is_used(&(pInfo->dpb.fs[fs_id])))
-            {
-            case (FRAME): {
-                wi.data.data_payload[0] = pInfo->dpb.fs[fs_id].top_field.poc;
-                wi.data.data_payload[1] = pInfo->dpb.fs[fs_id].bottom_field.poc;
-                break;
-            };
-
-            case (TOP_FIELD): {
-                wi.data.data_payload[0] = pInfo->dpb.fs[fs_id].top_field.poc;
-                wi.data.data_payload[1] = 0;
-                break;
-            };
-
-            case (BOTTOM_FIELD): {
-                wi.data.data_payload[0] = 0;
-                wi.data.data_payload[1] = pInfo->dpb.fs[fs_id].bottom_field.poc;
-                break;
-            };
-
-            default : {
-                wi.data.data_payload[0] = 0;
-                wi.data.data_payload[1] = 0;
-                break;
-            };
-            }
-            //cur is empty, fill new frame in cur
-            viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-        }
-    }
-
-    /////////////////////Alloc buffer for current Existing frame/////////////////////
-    if (0!=pInfo->dpb.frame_numbers_need_to_be_allocated)
-    {
-        if (pInfo->push_to_cur)
-        {
-            viddec_workload_t        *wl_cur = viddec_pm_get_header (parent);
-            wl_cur->is_reference_frame |= WORKLOAD_REFERENCE_FRAME | (pInfo->dpb.frame_id_need_to_be_allocated & 0x1f);
-        }
-        else
-        {
-            viddec_workload_t        *wl_next = viddec_pm_get_next_header (parent);
-            wl_next->is_reference_frame |= WORKLOAD_REFERENCE_FRAME | (pInfo->dpb.frame_id_need_to_be_allocated & 0x1f);
-        }
-    }
-    pInfo->dpb.frame_numbers_need_to_be_allocated =0;
-
-    return;
-}
-
-
-
-void h264_parse_emit_eos( void *parent, h264_Info *pInfo )
-{
-
-    uint32_t nitems=0, i=0;
-    viddec_workload_item_t	wi;
-
-
-    wi.vwi_type = VIDDEC_WORKLOAD_EOS_BEGIN_BOUNDARY;
-    wi.ref_frame.reference_id = 0;
-    wi.ref_frame.luma_phys_addr = 0;
-    wi.ref_frame.chroma_phys_addr = 0;
-
-    //cur is empty, fill new frame in cur
-    viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-
-    //// Now we can flush out all frames in DPB fro display
-
-    if (MPD_DPB_FS_NULL_IDC != pInfo->dpb.fs_dec_idc)
-    {
-        if (viddec_h264_get_is_used(&(pInfo->dpb.fs[pInfo->dpb.fs_dec_idc])) != 3)
-        {
-            h264_dpb_mark_dangling_field(&pInfo->dpb, pInfo->dpb.fs_dec_idc);  //, DANGLING_TYPE_GAP_IN_FRAME
-        }
-    }
-
-
-    h264_dpb_store_previous_picture_in_dpb(pInfo, 0,0);
-    h264_dpb_flush_dpb(pInfo, 1, 0, pInfo->active_SPS.num_ref_frames);
-
-
-    /////////////////////display frames/////////////////////
-    nitems = pInfo->dpb.frame_numbers_need_to_be_displayed;
-
-    for (i=0; i<nitems; i++)
-    {
-        wi.vwi_type = VIDDEC_WORKLOAD_EOS_DISPLAY_FRAME_0 + pInfo->dpb.frame_id_need_to_be_displayed[i];
-        wi.ref_frame.reference_id = pInfo->dpb.frame_id_need_to_be_displayed[i];
-        wi.ref_frame.luma_phys_addr = 0;
-        wi.ref_frame.chroma_phys_addr = 0;
-        //cur is empty, fill new frame in cur
-        viddec_pm_append_workitem( parent, &wi , !pInfo->push_to_cur);
-    }
-    pInfo->dpb.frame_numbers_need_to_be_displayed =0;
-
-
-    /////////////////////release frames/////////////////////
-    nitems = pInfo->dpb.frame_numbers_need_to_be_removed;
-
-    for (i=0; i<nitems; i++)
-    {
-        wi.vwi_type = VIDDEC_WORKLOAD_EOS_RELEASE_FRAME_0 + pInfo->dpb.frame_id_need_to_be_removed[i];
-        wi.ref_frame.reference_id = pInfo->dpb.frame_id_need_to_be_removed[i];
-        wi.ref_frame.luma_phys_addr = 0;
-        wi.ref_frame.chroma_phys_addr = 0;
-
-        if (pInfo->push_to_cur) //cur is empty, fill new frame in cur
-        {
-            viddec_pm_append_workitem( parent, &wi , false);
-            viddec_pm_set_next_frame_error_on_eos(parent, VIDDEC_FW_WORKLOAD_ERR_NOTDECODABLE);
-        }
-        else
-        {
-            viddec_pm_append_workitem( parent, &wi , true);
-            viddec_pm_set_next_frame_error_on_eos(parent, pInfo->wl_err_next);
-        }
-    }
-    pInfo->dpb.frame_numbers_need_to_be_removed =0;
-
-    return;
-}
-
-
-
-
-
-
diff --git a/mixvbp/vbp_plugin/mp4/Android.mk b/mixvbp/vbp_plugin/mp4/Android.mk
index da9ed15..f1d3577 100755
--- a/mixvbp/vbp_plugin/mp4/Android.mk
+++ b/mixvbp/vbp_plugin/mp4/Android.mk
@@ -6,7 +6,6 @@
 	viddec_mp4_visualobject.c            \
 	viddec_mp4_decodevideoobjectplane.c  \
 	viddec_mp4_parse.c                   \
-	viddec_fw_mp4_workload.c             \
 	viddec_mp4_videoobjectplane.c        \
 	viddec_parse_sc_mp4.c                \
 	viddec_mp4_shortheader.c             \
diff --git a/mixvbp/vbp_plugin/mp4/include/viddec_fw_mp4.h b/mixvbp/vbp_plugin/mp4/include/viddec_fw_mp4.h
index bb772d4..d6502d9 100755
--- a/mixvbp/vbp_plugin/mp4/include/viddec_fw_mp4.h
+++ b/mixvbp/vbp_plugin/mp4/include/viddec_fw_mp4.h
@@ -1,7 +1,8 @@
 #ifndef VIDDEC_FW_MP4_H
 #define VIDDEC_FW_MP4_H
 
-#include "viddec_fw_workload.h"
+#include "viddec_fw_common_defs.h"
+#include "viddec_fw_frame_attr.h"
 
 enum viddec_fw_mp4_ref_frame_id
 {
@@ -11,19 +12,6 @@
     VIDDEC_MP4_FRAME_MAX = 3,
 };
 
-enum mp4_workload_item_type
-{
-    VIDDEC_WORKLOAD_MP4_PAST_FRAME = VIDDEC_WORKLOAD_REF_FRAME_SOURCE_0,
-    VIDDEC_WORKLOAD_MP4_FUTURE_FRAME,
-    VIDDEC_WORKLOAD_MP4_VOL_INFO = VIDDEC_WORKLOAD_DECODER_SPECIFIC,
-    VIDDEC_WORKLOAD_MP4_VOP_INFO,
-    VIDDEC_WORKLOAD_MP4_BVOP_INFO,
-    VIDDEC_WORKLOAD_MP4_SPRT_TRAJ,
-    VIDDEC_WORKLOAD_MP4_IQUANT,
-    VIDDEC_WORKLOAD_MP4_NIQUANT,
-    VIDDEC_WORKLOAD_MP4_SVH,
-};
-
 enum viddec_fw_mp4_vop_coding_type_t
 {
     VIDDEC_MP4_VOP_TYPE_I = 0,
diff --git a/mixvbp/vbp_plugin/mp4/viddec_fw_mp4_workload.c b/mixvbp/vbp_plugin/mp4/viddec_fw_mp4_workload.c
deleted file mode 100755
index c9ec2fb..0000000
--- a/mixvbp/vbp_plugin/mp4/viddec_fw_mp4_workload.c
+++ /dev/null
@@ -1,377 +0,0 @@
-#ifndef VBP
-#include <string.h>
-
-#include "viddec_fw_workload.h"
-#include "viddec_parser_ops.h"
-#include "viddec_fw_mp4.h"
-#include "viddec_mp4_parse.h"
-
-uint32_t viddec_fw_mp4_populate_attr(viddec_workload_t *wl, viddec_mp4_parser_t *parser)
-{
-    uint32_t result = MP4_STATUS_OK;
-    viddec_frame_attributes_t *attr = &(wl->attrs);
-    mp4_VideoObjectLayer_t *vol = &(parser->info.VisualObject.VideoObject);
-
-    memset(attr, 0, sizeof(viddec_frame_attributes_t));
-
-    attr->cont_size.width = vol->video_object_layer_width;
-    attr->cont_size.height = vol->video_object_layer_height;
-
-    // Translate vop_coding_type
-    switch (vol->VideoObjectPlane.vop_coding_type)
-    {
-    case MP4_VOP_TYPE_B:
-        attr->frame_type = VIDDEC_FRAME_TYPE_B;
-        break;
-    case MP4_VOP_TYPE_P:
-        attr->frame_type = VIDDEC_FRAME_TYPE_P;
-        break;
-    case MP4_VOP_TYPE_S:
-        attr->frame_type = VIDDEC_FRAME_TYPE_S;
-        break;
-    case MP4_VOP_TYPE_I:
-        attr->frame_type = VIDDEC_FRAME_TYPE_I;
-        break;
-    default:
-        break;
-    } // switch on vop_coding_type
-
-    attr->mpeg4.top_field_first = vol->VideoObjectPlane.top_field_first;
-
-    return result;
-} // viddec_fw_mp4_populate_attr
-
-uint32_t viddec_fw_mp4_insert_vol_workitem(void *parent, viddec_mp4_parser_t *parser)
-{
-    uint32_t result = MP4_STATUS_OK;
-    viddec_workload_item_t wi;
-    viddec_fw_mp4_vol_info_t vol_info;
-    mp4_VideoObjectLayer_t *vol = &(parser->info.VisualObject.VideoObject);
-
-    memset(&vol_info, 0, sizeof(viddec_fw_mp4_vol_info_t));
-
-    // Get vol_flags
-    viddec_fw_mp4_set_reversible_vlc(&vol_info, vol->reversible_vlc);
-    viddec_fw_mp4_set_data_partitioned(&vol_info, vol->data_partitioned);
-    viddec_fw_mp4_set_resync_marker_disable(&vol_info, vol->resync_marker_disable);
-    viddec_fw_mp4_set_quarter_sample(&vol_info, vol->quarter_sample);
-    viddec_fw_mp4_set_obmc_disable(&vol_info, vol->obmc_disable);
-    viddec_fw_mp4_set_interlaced(&vol_info, vol->interlaced);
-    viddec_fw_mp4_set_vol_shape(&vol_info, vol->video_object_layer_shape);
-    viddec_fw_mp4_set_short_video_header_flag(&vol_info, vol->short_video_header);
-
-    // Get vol_size
-    viddec_fw_mp4_set_vol_width(&vol_info, vol->video_object_layer_width);
-    viddec_fw_mp4_set_vol_height(&vol_info, vol->video_object_layer_height);
-
-    // Get vol_item
-    viddec_fw_mp4_set_quant_type(&vol_info, vol->quant_type);
-    viddec_fw_mp4_set_quant_precision(&vol_info, vol->quant_precision);
-    viddec_fw_mp4_set_sprite_warping_accuracy(&vol_info, vol->sprite_info.sprite_warping_accuracy);
-    viddec_fw_mp4_set_sprite_warping_points(&vol_info, vol->sprite_info.no_of_sprite_warping_points);
-    viddec_fw_mp4_set_sprite_enable(&vol_info, vol->sprite_enable);
-    viddec_fw_mp4_set_vop_time_increment_resolution(&vol_info, vol->vop_time_increment_resolution);
-
-
-    wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_MP4_VOL_INFO;
-    wi.vwi_payload[0] = vol_info.vol_flags;
-    wi.vwi_payload[1] = vol_info.vol_size;
-    wi.vwi_payload[2] = vol_info.vol_item;
-
-    result = viddec_pm_append_workitem(parent, &wi, false);
-
-    return result;
-} // viddec_fw_mp4_insert_vol_workitem
-
-uint32_t viddec_fw_mp4_insert_vop_workitem(void *parent, viddec_mp4_parser_t *parser)
-{
-    uint32_t result = MP4_STATUS_OK;
-    viddec_workload_item_t wi;
-    viddec_fw_mp4_vop_info_t vop_info;
-    mp4_VideoObjectPlane_t *vop = &(parser->info.VisualObject.VideoObject.VideoObjectPlane);
-    uint32_t byte = 0;
-    unsigned char is_emul;
-
-    memset(&vop_info, 0, sizeof(viddec_fw_mp4_vop_info_t));
-
-    // Get frame_info
-    viddec_fw_mp4_set_past_field_frame(&vop_info, parser->ref_frame[VIDDEC_MP4_INDX_2].is_field);
-    viddec_fw_mp4_set_past_frame_id(&vop_info, VIDDEC_MP4_FRAME_PAST);
-    viddec_fw_mp4_set_future_field_frame(&vop_info, parser->ref_frame[VIDDEC_MP4_INDX_1].is_field);
-    viddec_fw_mp4_set_future_frame_id(&vop_info, VIDDEC_MP4_FRAME_FUTURE);
-    viddec_fw_mp4_set_current_field_frame(&vop_info, parser->ref_frame[VIDDEC_MP4_INDX_0].is_field);
-    viddec_fw_mp4_set_current_frame_id(&vop_info, VIDDEC_MP4_FRAME_CURRENT);
-
-    // HW has a limitation that the enums for PAST(1), FUTURE(2) and CURRENT(0) cannot be changed and
-    // the spec does not support field pictures. Hence the field_frame bits are always zero.
-    // This gives us the constant 0x10200.
-    vop_info.frame_info = 0x10200;
-
-    // Get vop_data
-    // Quant scale is in the video_packet_header or the gob_layer - both of which are parsed by the BSP
-    viddec_fw_mp4_set_vop_quant_scale(&vop_info, 0);
-    viddec_fw_mp4_set_vop_fcode_backward(&vop_info, vop->vop_fcode_backward);
-    viddec_fw_mp4_set_vop_fcode_forward(&vop_info, vop->vop_fcode_forward);
-    viddec_fw_mp4_set_vop_quant(&vop_info, vop->vop_quant);
-    viddec_fw_mp4_set_alternate_vertical_scan_flag(&vop_info, vop->alternate_vertical_scan_flag);
-    viddec_fw_mp4_set_top_field_first(&vop_info, vop->top_field_first);
-    viddec_fw_mp4_set_intra_dc_vlc_thr(&vop_info, vop->intra_dc_vlc_thr);
-    viddec_fw_mp4_set_vop_rounding_type(&vop_info, vop->vop_rounding_type);
-    viddec_fw_mp4_set_vop_coding_type(&vop_info, vop->vop_coding_type);
-
-    // Get vol_item
-    result = viddec_pm_get_au_pos(parent, &vop_info.bit_offset, &byte, &is_emul);
-
-    wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_MP4_VOP_INFO;
-    wi.vwi_payload[0] = vop_info.frame_info;
-    wi.vwi_payload[1] = vop_info.vop_data;
-    wi.vwi_payload[2] = vop_info.bit_offset;
-
-    result = viddec_pm_append_workitem(parent, &wi, false);
-
-    return result;
-} // viddec_fw_mp4_insert_vop_workitem
-
-uint32_t viddec_fw_mp4_insert_vpsh_workitem(void *parent, viddec_mp4_parser_t *parser)
-{
-    uint32_t result = MP4_STATUS_OK;
-    viddec_workload_item_t wi;
-    viddec_fw_mp4_svh_t svh_info;
-    mp4_VideoObjectPlaneH263 *svh = &(parser->info.VisualObject.VideoObject.VideoObjectPlaneH263);
-
-    memset(&svh_info, 0, sizeof(viddec_fw_mp4_svh_t));
-
-    // Get svh_data
-    viddec_fw_mp4_set_temporal_reference(&svh_info, svh->temporal_reference);
-    viddec_fw_mp4_set_num_macroblocks_in_gob(&svh_info, svh->num_macroblocks_in_gob);
-    viddec_fw_mp4_set_num_gobs_in_vop(&svh_info, svh->num_gobs_in_vop);
-    viddec_fw_mp4_set_num_rows_in_gob(&svh_info, svh->num_rows_in_gob);
-
-    wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_MP4_SVH;
-    wi.vwi_payload[0] = svh_info.svh_data;
-    wi.vwi_payload[1] = svh_info.pad1;
-    wi.vwi_payload[2] = svh_info.pad2;
-
-    result = viddec_pm_append_workitem(parent, &wi, false);
-
-    return result;
-} // viddec_fw_mp4_insert_vpsh_workitem
-
-uint32_t viddec_fw_mp4_insert_sprite_workitem(void *parent, viddec_mp4_parser_t *parser)
-{
-    uint32_t result = MP4_STATUS_OK;
-    viddec_workload_item_t wi;
-    viddec_fw_mp4_sprite_trajectory_t sprite_info;
-    mp4_VideoObjectLayer_t *vol = &(parser->info.VisualObject.VideoObject);
-    mp4_VideoObjectPlane_t *vop = &(parser->info.VisualObject.VideoObject.VideoObjectPlane);
-    uint8_t no_of_entries_per_item = 3;
-    uint8_t no_of_sprite_workitems = 0;
-    uint8_t warp_index = 0;
-    int i, j;
-
-    if (!vol->sprite_info.no_of_sprite_warping_points)
-        return result;
-
-    no_of_sprite_workitems = (vol->sprite_info.no_of_sprite_warping_points > 3) ? 2 : 1;
-
-    for (i=0; i<no_of_sprite_workitems; i++)
-    {
-        memset(&sprite_info, 0, sizeof(viddec_fw_mp4_sprite_trajectory_t));
-
-        for (j=0; j<no_of_entries_per_item; j++)
-        {
-            if (warp_index < vol->sprite_info.no_of_sprite_warping_points)
-            {
-                if (warp_index < 4)
-                {
-                    viddec_fw_mp4_set_warping_point_index(sprite_info.warping_mv_code[j], warp_index);
-                    viddec_fw_mp4_set_warping_mv_code_du(sprite_info.warping_mv_code[j], vop->warping_mv_code_du[warp_index]);
-                    viddec_fw_mp4_set_warping_mv_code_dv(sprite_info.warping_mv_code[j], vop->warping_mv_code_dv[warp_index]);
-                }
-            }
-            else
-            {
-                sprite_info.warping_mv_code[j] = 0xF << 28;
-            }
-            warp_index++;
-        }
-
-        wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_MP4_SPRT_TRAJ;
-        wi.vwi_payload[0] = sprite_info.warping_mv_code[0];
-        wi.vwi_payload[1] = sprite_info.warping_mv_code[1];
-        wi.vwi_payload[2] = sprite_info.warping_mv_code[2];
-
-        result = viddec_pm_append_workitem(parent, &wi, false);
-    }
-
-    return result;
-} // viddec_fw_mp4_insert_sprite_workitem
-
-uint32_t viddec_fw_mp4_insert_bvop_workitem(void *parent, viddec_mp4_parser_t *parser)
-{
-    uint32_t result = MP4_STATUS_OK;
-    viddec_workload_item_t wi;
-    mp4_VideoObjectLayer_t *vol = &(parser->info.VisualObject.VideoObject);
-
-    wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_MP4_BVOP_INFO;
-    wi.vwi_payload[0] = vol->Tframe;
-    wi.vwi_payload[1] = vol->TRD;
-    wi.vwi_payload[2] = vol->TRB;
-
-    result = viddec_pm_append_workitem(parent, &wi, false);
-
-    return result;
-} // viddec_fw_mp4_insert_bvop_workitem
-
-uint32_t viddec_fw_mp4_insert_qmat(void *parent, uint8_t intra_quant_flag, uint32_t *qmat)
-{
-    uint32_t result = MP4_STATUS_OK;
-    viddec_workload_item_t wi;
-    uint8_t i;
-
-    // No of items = (64/4 Dwords / 3 entries per workload item)
-    // 64 8b entries => 64 * 8 / 32 DWORDS => 64/4 DWORDS => 16 DWORDS
-    // Each item can store 3 DWORDS, 16 DWORDS => 16/3 items => 6 items
-    for (i=0; i<6; i++)
-    {
-        memset(&wi, 0, sizeof(viddec_workload_item_t));
-
-        if (intra_quant_flag)
-            wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_MP4_IQUANT;
-        else
-            wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_MP4_NIQUANT;
-
-        if (i == 6)
-        {
-            wi.vwi_payload[0] = qmat[0];
-            wi.vwi_payload[1] = 0;
-            wi.vwi_payload[2] = 0;
-        }
-        else
-        {
-            wi.vwi_payload[0] = qmat[0];
-            wi.vwi_payload[1] = qmat[1];
-            wi.vwi_payload[2] = qmat[2];
-        }
-
-        qmat += 3;
-
-        result = viddec_pm_append_workitem(parent, &wi, false);
-    }
-
-    return result;
-} // viddec_fw_mp4_insert_qmat
-
-uint32_t viddec_fw_mp4_insert_inversequant_workitem(void *parent, mp4_VOLQuant_mat_t *qmat)
-{
-    uint32_t result = MP4_STATUS_OK;
-
-    if (qmat->load_intra_quant_mat)
-    {
-        result = viddec_fw_mp4_insert_qmat(parent, true, (uint32_t *) &(qmat->intra_quant_mat));
-    }
-
-    if (qmat->load_nonintra_quant_mat)
-    {
-        result = viddec_fw_mp4_insert_qmat(parent, false, (uint32_t *) &(qmat->nonintra_quant_mat));
-    }
-
-    return result;
-} // viddec_fw_mp4_insert_inversequant_workitem
-
-uint32_t viddec_fw_mp4_insert_past_frame_workitem(void *parent)
-{
-    uint32_t result = MP4_STATUS_OK;
-    viddec_workload_item_t wi;
-
-    wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_MP4_PAST_FRAME;
-    wi.ref_frame.reference_id = 0;
-    wi.ref_frame.luma_phys_addr = 0;
-    wi.ref_frame.chroma_phys_addr = 0;
-    result = viddec_pm_append_workitem(parent, &wi, false);
-
-    return result;
-} // viddec_fw_mp4_insert_past_frame_workitem
-
-uint32_t viddec_fw_mp4_insert_future_frame_workitem(void *parent)
-{
-    uint32_t result = MP4_STATUS_OK;
-    viddec_workload_item_t wi;
-
-    wi.vwi_type = (workload_item_type)VIDDEC_WORKLOAD_MP4_FUTURE_FRAME;
-    wi.ref_frame.reference_id = 0;
-    wi.ref_frame.luma_phys_addr = 0;
-    wi.ref_frame.chroma_phys_addr = 0;
-    result = viddec_pm_append_workitem(parent, &wi, false);
-
-    return result;
-} // viddec_fw_mp4_insert_future_frame_workitem
-
-uint32_t viddec_fw_mp4_insert_reorder_workitem(void *parent)
-{
-    uint32_t result = MP4_STATUS_OK;
-    viddec_workload_item_t wi;
-
-    // Move frame at location 1 of the reference table to location 0
-    wi.vwi_type = VIDDEC_WORKLOAD_REFERENCE_FRAME_REORDER;
-    wi.ref_reorder.ref_table_offset = 0;
-    wi.ref_reorder.ref_reorder_00010203 = 0x01010203;
-    wi.ref_reorder.ref_reorder_04050607 = 0x04050607;
-
-    result = viddec_pm_append_workitem(parent, &wi, false);
-
-    return result;
-} // viddec_fw_mp4_insert_reorder_workitem
-
-uint32_t viddec_fw_mp4_emit_workload(void *parent, void *ctxt)
-{
-    uint32_t result = 0;
-    viddec_mp4_parser_t *parser = (viddec_mp4_parser_t *) ctxt;
-    viddec_workload_t *wl = viddec_pm_get_header(parent);
-
-    result = viddec_fw_mp4_populate_attr(wl, parser);
-    result = viddec_fw_mp4_insert_vol_workitem(parent, parser);
-    result = viddec_fw_mp4_insert_vop_workitem(parent, parser);
-    result = viddec_fw_mp4_insert_sprite_workitem(parent, parser);
-    result = viddec_fw_mp4_insert_inversequant_workitem(parent, &(parser->info.VisualObject.VideoObject.quant_mat_info));
-
-    if (parser->info.VisualObject.VideoObject.short_video_header)
-        result = viddec_fw_mp4_insert_vpsh_workitem(parent, parser);
-
-    if (!parser->info.VisualObject.VideoObject.VideoObjectPlane.vop_coded)
-        wl->is_reference_frame |= WORKLOAD_SKIPPED_FRAME;
-
-    // Send reference re-order tag for all reference frame types
-    if (parser->info.VisualObject.VideoObject.VideoObjectPlane.vop_coding_type != MP4_VOP_TYPE_B)
-    {
-        result = viddec_fw_mp4_insert_reorder_workitem(parent);
-    }
-
-    // Handle vop_coding_type based information
-    switch (parser->info.VisualObject.VideoObject.VideoObjectPlane.vop_coding_type)
-    {
-    case MP4_VOP_TYPE_B:
-        result = viddec_fw_mp4_insert_bvop_workitem(parent, parser);
-        result = viddec_fw_mp4_insert_past_frame_workitem(parent);
-        result = viddec_fw_mp4_insert_future_frame_workitem(parent);
-        break;
-    case MP4_VOP_TYPE_P:
-    case MP4_VOP_TYPE_S:
-        result = viddec_fw_mp4_insert_past_frame_workitem(parent);
-        // Deliberate fall-thru to type I
-    case MP4_VOP_TYPE_I:
-        wl->is_reference_frame |= WORKLOAD_REFERENCE_FRAME | (1 & WORKLOAD_REFERENCE_FRAME_BMASK);
-        // Swap reference information
-        parser->ref_frame[VIDDEC_MP4_INDX_2] = parser->ref_frame[VIDDEC_MP4_INDX_1];
-        parser->ref_frame[VIDDEC_MP4_INDX_1] = parser->ref_frame[VIDDEC_MP4_INDX_0];
-        break;
-        break;
-    default:
-        break;
-    } // switch on vop_coding_type
-
-    result = viddec_pm_append_pixeldata(parent);
-
-    return result;
-} // viddec_fw_mp4_emit_workload
-#endif
diff --git a/mixvbp/vbp_plugin/mp4/viddec_mp4_parse.c b/mixvbp/vbp_plugin/mp4/viddec_mp4_parse.c
index 85eab1a..ac4fb2e 100755
--- a/mixvbp/vbp_plugin/mp4/viddec_mp4_parse.c
+++ b/mixvbp/vbp_plugin/mp4/viddec_mp4_parse.c
@@ -98,7 +98,6 @@
         }
         case MP4_SC_USER_DATA:
         {   /* Copy userdata to user-visible buffer (EMIT) */
-            status = mp4_Parse_UserData(parent, cxt);
             DEB("MP4_USER_DATA_SC: \n");
             break;
         }
diff --git a/mixvbp/vbp_plugin/mp4/viddec_mp4_shortheader.c b/mixvbp/vbp_plugin/mp4/viddec_mp4_shortheader.c
index 11c82d4..2a6a933 100755
--- a/mixvbp/vbp_plugin/mp4/viddec_mp4_shortheader.c
+++ b/mixvbp/vbp_plugin/mp4/viddec_mp4_shortheader.c
@@ -346,22 +346,5 @@
 
     mp4_set_hdr_bitstream_error(parser, false, ret);
 
-    // POPULATE WORKLOAD ITEM
-    {
-        viddec_workload_item_t wi;
-
-        wi.vwi_type = VIDDEC_WORKLOAD_MPEG4_VIDEO_PLANE_SHORT;
-
-        wi.mp4_vpsh.info = 0;
-        wi.mp4_vpsh.pad1 = 0;
-        wi.mp4_vpsh.pad2 = 0;
-
-        viddec_fw_mp4_vpsh_set_source_format(&wi.mp4_vpsh, svh->source_format);
-
-        ret = (mp4_Status_t)viddec_pm_append_workitem(parent, &wi, false);
-        if (ret == 1)
-            ret = MP4_STATUS_OK;
-    }
-
     return ret;
 }
diff --git a/mixvbp/vbp_plugin/mp4/viddec_mp4_videoobjectlayer.c b/mixvbp/vbp_plugin/mp4/viddec_mp4_videoobjectlayer.c
index c50ef3c..1ed52f3 100755
--- a/mixvbp/vbp_plugin/mp4/viddec_mp4_videoobjectlayer.c
+++ b/mixvbp/vbp_plugin/mp4/viddec_mp4_videoobjectlayer.c
@@ -587,43 +587,6 @@
         parser->bitstream_error |= MP4_BS_ERROR_HDR_NONDEC;
         return ret;
     }
-//DEB("before wkld mp4_Parse_VideoObjectLayer: bs_err: %d, ret: %d\n", parser->bitstream_error, ret);
 
-    // POPULATE WORKLOAD ITEM
-/*
-    {
-        viddec_workload_item_t wi;
-        viddec_workload_t *wl = viddec_pm_get_header(parent);
-
-        wi.vwi_type = VIDDEC_WORKLOAD_MPEG4_VIDEO_OBJ;
-
-        wi.mp4_vol.vol_aspect_ratio = 0;
-        wi.mp4_vol.vol_bit_rate = 0;
-        wi.mp4_vol.vol_frame_rate = 0;
-
-        viddec_fw_mp4_vol_set_aspect_ratio_info(&wi.mp4_vol, vidObjLay->aspect_ratio_info);
-        viddec_fw_mp4_vol_set_par_width(&wi.mp4_vol, vidObjLay->aspect_ratio_info_par_width);
-        viddec_fw_mp4_vol_set_par_height(&wi.mp4_vol, vidObjLay->aspect_ratio_info_par_height);
-        viddec_fw_mp4_vol_set_control_param(&wi.mp4_vol, vidObjLay->is_vol_control_parameters);
-        viddec_fw_mp4_vol_set_chroma_format(&wi.mp4_vol, vidObjLay->VOLControlParameters.chroma_format);
-        viddec_fw_mp4_vol_set_interlaced(&wi.mp4_vol, vidObjLay->interlaced);
-        viddec_fw_mp4_vol_set_fixed_vop_rate(&wi.mp4_vol, vidObjLay->fixed_vop_rate);
-
-        viddec_fw_mp4_vol_set_vbv_param(&wi.mp4_vol, vidObjLay->VOLControlParameters.vbv_parameters);
-        viddec_fw_mp4_vol_set_bit_rate(&wi.mp4_vol, vidObjLay->VOLControlParameters.bit_rate);
-
-        viddec_fw_mp4_vol_set_fixed_vop_time_increment(&wi.mp4_vol, vidObjLay->fixed_vop_time_increment);
-        viddec_fw_mp4_vol_set_vop_time_increment_resolution(&wi.mp4_vol, vidObjLay->vop_time_increment_resolution);
-
-        ret = (mp4_Status_t)viddec_pm_append_workitem(parent, &wi, false);
-        if (ret == 1)
-            ret = MP4_STATUS_OK;
-
-        memset(&(wl->attrs), 0, sizeof(viddec_frame_attributes_t));
-
-        wl->attrs.cont_size.width = vidObjLay->video_object_layer_width;
-        wl->attrs.cont_size.height = vidObjLay->video_object_layer_height;
-    }
-*/
     return ret;
 }
diff --git a/mixvbp/vbp_plugin/mp4/viddec_mp4_videoobjectplane.c b/mixvbp/vbp_plugin/mp4/viddec_mp4_videoobjectplane.c
index 97f36a3..cbe88bd 100755
--- a/mixvbp/vbp_plugin/mp4/viddec_mp4_videoobjectplane.c
+++ b/mixvbp/vbp_plugin/mp4/viddec_mp4_videoobjectplane.c
@@ -41,25 +41,6 @@
 
     mp4_set_hdr_bitstream_error(parser, true, ret);
 
-    // POPULATE WORKLOAD ITEM
-    {
-        viddec_workload_item_t wi;
-
-        wi.vwi_type = VIDDEC_WORKLOAD_MPEG4_GRP_VIDEO_OBJ;
-
-        wi.mp4_gvop.gvop_info = 0;
-        wi.mp4_gvop.pad1 = 0;
-        wi.mp4_gvop.pad2 = 0;
-
-        viddec_fw_mp4_gvop_set_broken_link(&wi.mp4_gvop, data->broken_link);
-        viddec_fw_mp4_gvop_set_closed_gov(&wi.mp4_gvop, data->closed_gov);
-        viddec_fw_mp4_gvop_set_time_code(&wi.mp4_gvop, time_code);
-
-        ret = (mp4_Status_t)viddec_pm_append_workitem(parent, &wi, false);
-        if (ret == 1)
-            ret = MP4_STATUS_OK;
-    }
-
     return ret;
 }
 
diff --git a/mixvbp/vbp_plugin/mp4/viddec_mp4_visualobject.c b/mixvbp/vbp_plugin/mp4/viddec_mp4_visualobject.c
index d1ec032..ee54452 100755
--- a/mixvbp/vbp_plugin/mp4/viddec_mp4_visualobject.c
+++ b/mixvbp/vbp_plugin/mp4/viddec_mp4_visualobject.c
@@ -188,103 +188,7 @@
 
     mp4_set_hdr_bitstream_error(parser, true, ret);
 
-    // POPULATE WORKLOAD ITEM
-    {
-        viddec_workload_item_t wi;
-        mp4_VideoSignalType_t *vst = &(visObj->VideoSignalType);
-
-        wi.vwi_type = VIDDEC_WORKLOAD_MPEG4_VISUAL_SEQ_OBJ;
-
-        wi.mp4_vs_vo.vs_item = 0;
-        wi.mp4_vs_vo.video_signal_type = 0;
-        wi.mp4_vs_vo.color_desc = 0;
-
-        viddec_fw_mp4_vs_set_profile_and_level_indication(&wi.mp4_vs_vo, pInfo->profile_and_level_indication);
-
-        viddec_fw_mp4_vo_set_video_signal_type(&wi.mp4_vs_vo, vst->is_video_signal_type);
-        if (vst->is_video_signal_type)
-        {
-            viddec_fw_mp4_vo_set_video_range(&wi.mp4_vs_vo, vst->video_range);
-            viddec_fw_mp4_vo_set_video_format(&wi.mp4_vs_vo, vst->video_format);
-            viddec_fw_mp4_vo_set_colour_description(&wi.mp4_vs_vo, vst->is_colour_description);
-            if (vst->is_colour_description)
-            {
-                viddec_fw_mp4_vo_set_transfer_char(&wi.mp4_vs_vo, vst->transfer_characteristics);
-                viddec_fw_mp4_vo_set_color_primaries(&wi.mp4_vs_vo, vst->colour_primaries);
-            }
-        }
-
-        int ret_val;
-        ret_val = viddec_pm_append_workitem(parent, &wi, false);
-        if (ret_val == 1)
-            ret = MP4_STATUS_OK;
-    }
-
     return ret;
 } // mp4_Parse_VisualObject
 
-mp4_Status_t mp4_Parse_UserData(void *parent, viddec_mp4_parser_t *parser)
-{
-    mp4_Status_t ret = MP4_STATUS_PARSE_ERROR;
-    uint32_t user_data;
-    viddec_workload_item_t wi;
-
-    DEB("ParseUser-prev_sc: 0x%x\n", parser->prev_sc);
-
-    /* find the scope based on start code sc */
-    switch (parser->prev_sc) {
-    case MP4_SC_VISUAL_OBJECT_SEQUENCE:
-        wi.vwi_type = VIDDEC_WORKLOAD_SEQ_USER_DATA;
-        break;
-    case MP4_SC_VISUAL_OBJECT:
-        wi.vwi_type = VIDDEC_WORKLOAD_VISUAL_OBJ_USER_DATA;
-        break;
-    case MP4_SC_GROUP_OF_VOP:
-        wi.vwi_type = VIDDEC_WORKLOAD_GOP_USER_DATA;
-        break;
-    case MP4_SC_VIDEO_OBJECT_LAYER_MIN:
-        wi.vwi_type = VIDDEC_WORKLOAD_VIDEO_OBJ_USER_DATA;
-        break;
-    default:
-        wi.vwi_type = VIDDEC_WORKLOAD_INVALID; //ERROR - should not happen
-        break;
-    }
-
-    /* Read 1 byte of user data and store it in workitem for the current stream level (VS/VO/VOL/GVOP).
-       Keep adding data payloads till it reaches size 11. When it is 11, the maximum user data payload size,
-       append the workitem. This loop is repeated till all user data is extracted and appended. */
-    wi.user_data.size = 0;
-    while (viddec_pm_get_bits(parent, &user_data, 8) != -1)
-    {
-        /* Store the valid byte in data payload */
-        wi.user_data.data_payload[wi.user_data.size] = user_data;
-        wi.user_data.size++;
-
-        /* When size exceeds payload size, append workitem and continue */
-        if (wi.user_data.size >= 11)
-        {
-            viddec_pm_setup_userdata(&wi);
-
-            ret = (mp4_Status_t)viddec_pm_append_workitem(parent, &wi, false);
-            wi.user_data.size = 0;
-        }
-    }
-    /* If size is not 0, append remaining user data. */
-    if (wi.user_data.size > 0)
-    {
-        int i;
-        for (i=wi.user_data.size; i<11; i++)
-        {
-            wi.user_data.data_payload[i] = 0;
-        }
-        viddec_pm_setup_userdata(&wi);
-        ret = (mp4_Status_t)viddec_pm_append_workitem(parent, &wi, false);
-        wi.user_data.size = 0;
-    }
-
-    if (ret == 1)
-        ret = MP4_STATUS_OK;
-
-    return ret;
-} // mp4_Parse_UserData
 
diff --git a/mixvbp/vbp_plugin/mp4/viddec_mp4_visualobject.h b/mixvbp/vbp_plugin/mp4/viddec_mp4_visualobject.h
index d1f5a23..a5afe74 100755
--- a/mixvbp/vbp_plugin/mp4/viddec_mp4_visualobject.h
+++ b/mixvbp/vbp_plugin/mp4/viddec_mp4_visualobject.h
@@ -7,6 +7,4 @@
 
 mp4_Status_t mp4_Parse_VisualObject(void *parent, viddec_mp4_parser_t *parser);
 
-mp4_Status_t mp4_Parse_UserData(void *parent, viddec_mp4_parser_t *parser);
-
 #endif
diff --git a/mixvbp/vbp_plugin/vc1/include/vc1common.h b/mixvbp/vbp_plugin/vc1/include/vc1common.h
index e4f1b3f..8b3a8b8 100755
--- a/mixvbp/vbp_plugin/vc1/include/vc1common.h
+++ b/mixvbp/vbp_plugin/vc1/include/vc1common.h
@@ -26,7 +26,7 @@
 
 enum vc1_workload_item_type
 {
-    VIDDEC_WORKLOAD_VC1_DMEM = VIDDEC_WORKLOAD_DECODER_SPECIFIC,
+    VIDDEC_WORKLOAD_VC1_DMEM,
     VIDDEC_WORKLOAD_VC1_BITOFFSET,
     VIDDEC_WORKLOAD_VC1_BITPLANE0,
     VIDDEC_WORKLOAD_VC1_BITPLANE1,
@@ -40,7 +40,7 @@
     VIDDEC_WORKLOAD_VC1_REGS_SLICE_CONTROL_INFO,
     VIDDEC_WORKLOAD_VC1_REGS_SLICE_OTHER_INFO,
     VIDDEC_WORKLOAD_VC1_REGS_REF_FRAME_TYPE,
-    VIDDEC_WORKLOAD_VC1_PAST_FRAME   = VIDDEC_WORKLOAD_REF_FRAME_SOURCE_0,
+    VIDDEC_WORKLOAD_VC1_PAST_FRAME,
     VIDDEC_WORKLOAD_VC1_FUTURE_FRAME,
 };
 
diff --git a/mixvbp/vbp_plugin/vc1/vc1.h b/mixvbp/vbp_plugin/vc1/vc1.h
index ca92d17..e7d0ac2 100755
--- a/mixvbp/vbp_plugin/vc1/vc1.h
+++ b/mixvbp/vbp_plugin/vc1/vc1.h
@@ -37,10 +37,10 @@
 #endif
 #endif
 
-#include "viddec_fw_workload.h"
-#include "vc1parse_common_defs.h"
+#include "viddec_fw_common_defs.h"
+#include "viddec_fw_frame_attr.h"
 #include "vc1common.h"
-
+#include "vc1parse_common_defs.h"
 #ifdef __cplusplus
 extern "C" {
 #endif
diff --git a/mixvbp/vbp_plugin/vc1/vc1parse.c b/mixvbp/vbp_plugin/vc1/vc1parse.c
index 06ac094..bce1f57 100755
--- a/mixvbp/vbp_plugin/vc1/vc1parse.c
+++ b/mixvbp/vbp_plugin/vc1/vc1parse.c
@@ -79,31 +79,6 @@
 
     DEB("rcv: res: %dx%d\n", md->width, md->height);
 
-    // POPULATE WORKLOAD ITEM
-    {
-        viddec_workload_item_t wi;
-
-        wi.vwi_type = VIDDEC_WORKLOAD_VC1_SEQ_HDR_STRUCT_A_C;
-
-        wi.vc1_sh_struct_a_c.size = 0;
-        wi.vc1_sh_struct_a_c.flags = 0;
-        wi.vc1_sh_struct_a_c.pad = 0;
-
-        viddec_fw_vc1_set_rcv_horiz_size(&wi.vc1_sh_struct_a_c, rcv.struct_a.HORIZ_SIZE);
-        viddec_fw_vc1_set_rcv_vert_size(&wi.vc1_sh_struct_a_c, rcv.struct_a.VERT_SIZE);
-
-        viddec_fw_vc1_set_rcv_bitrtq_postproc(&wi.vc1_sh_struct_a_c, rcv.struct_c.BITRTQ_POSTPROC);
-        viddec_fw_vc1_set_rcv_frmrtq_postproc(&wi.vc1_sh_struct_a_c, rcv.struct_c.FRMRTQ_POSTPROC);
-        viddec_fw_vc1_set_rcv_profile(&wi.vc1_sh_struct_a_c, rcv.struct_c.PROFILE);
-        viddec_fw_vc1_set_rcv_level(&wi.vc1_sh_struct_a_c, 0);
-        viddec_fw_vc1_set_rcv_cbr(&wi.vc1_sh_struct_a_c, 0);
-        viddec_fw_vc1_set_rcv_rangered(&wi.vc1_sh_struct_a_c, rcv.struct_c.RANGERED);
-        viddec_fw_vc1_set_rcv_maxbframes(&wi.vc1_sh_struct_a_c, rcv.struct_c.MAXBFRAMES);
-        viddec_fw_vc1_set_rcv_finterpflag(&wi.vc1_sh_struct_a_c, rcv.struct_c.FINTERPFLAG);
-
-        result = viddec_pm_append_workitem(ctxt, &wi, false);
-    }
-
     return status;
 }
 
@@ -255,63 +230,6 @@
     DEB("md: res: %dx%d\n", md->width, md->height);
     DEB("sh: dispres: %dx%d\n", sh.seq_disp_size.DISP_HORIZ_SIZE, sh.seq_disp_size.DISP_VERT_SIZE);
 
-    // POPULATE WORKLOAD ITEM
-    {
-        viddec_workload_item_t wi_sl, wi_de;
-
-        wi_sl.vwi_type = VIDDEC_WORKLOAD_SEQUENCE_INFO;
-
-        wi_sl.vc1_sl.size = 0;
-        wi_sl.vc1_sl.flags = 0;
-        wi_sl.vc1_sl.pad = 0;
-
-        viddec_fw_vc1_set_profile(&wi_sl.vc1_sl, sh.seq_flags.PROFILE);
-        viddec_fw_vc1_set_level(&wi_sl.vc1_sl, sh.seq_flags.LEVEL);
-        viddec_fw_vc1_set_colordiff_format(&wi_sl.vc1_sl, sh.seq_flags.COLORDIFF_FORMAT);
-        viddec_fw_vc1_set_pulldown(&wi_sl.vc1_sl, sh.seq_max_size.PULLDOWN);
-        viddec_fw_vc1_set_max_coded_width(&wi_sl.vc1_sl, sh.seq_max_size.MAX_CODED_WIDTH);
-        viddec_fw_vc1_set_max_coded_height(&wi_sl.vc1_sl, sh.seq_max_size.MAX_CODED_HEIGHT);
-
-        viddec_fw_vc1_set_bitrtq_postproc(&wi_sl.vc1_sl, sh.seq_flags.BITRTQ_POSTPROC);
-        viddec_fw_vc1_set_frmrtq_postproc(&wi_sl.vc1_sl, sh.seq_flags.FRMRTQ_POSTPROC);
-        viddec_fw_vc1_set_interlace(&wi_sl.vc1_sl, sh.seq_max_size.INTERLACE);
-        viddec_fw_vc1_set_tfcntrflag(&wi_sl.vc1_sl, sh.seq_max_size.TFCNTRFLAG);
-        viddec_fw_vc1_set_finterpflag(&wi_sl.vc1_sl, sh.seq_max_size.FINTERPFLAG);
-        viddec_fw_vc1_set_psf(&wi_sl.vc1_sl, sh.seq_max_size.PSF);
-        viddec_fw_vc1_set_display_ext(&wi_sl.vc1_sl, sh.seq_max_size.DISPLAY_EXT);
-
-        result = viddec_pm_append_workitem(ctxt, &wi_sl, false);
-
-        // send DISPLAY EXTENSION metadata if present
-        if (sh.seq_max_size.DISPLAY_EXT)
-        {
-            wi_de.vwi_type = VIDDEC_WORKLOAD_DISPLAY_INFO;
-
-            wi_de.vc1_sl_de.size = 0;
-            wi_de.vc1_sl_de.framerate = 0;
-            wi_de.vc1_sl_de.aspectsize = 0;
-
-            viddec_fw_vc1_set_disp_horiz_size(&wi_de.vc1_sl_de, sh.seq_disp_size.DISP_HORIZ_SIZE);
-            viddec_fw_vc1_set_disp_vert_size(&wi_de.vc1_sl_de, sh.seq_disp_size.DISP_VERT_SIZE);
-            viddec_fw_vc1_set_disp_aspect_ratio_flag(&wi_de.vc1_sl_de, sh.seq_disp_size.ASPECT_RATIO_FLAG);
-            viddec_fw_vc1_set_disp_color_format_flag(&wi_de.vc1_sl_de, sh.COLOR_FORMAT_FLAG);
-            viddec_fw_vc1_set_disp_framerate_flag(&wi_de.vc1_sl_de, sh.FRAMERATE_FLAG);
-            viddec_fw_vc1_set_disp_framerateind(&wi_de.vc1_sl_de, sh.FRAMERATEIND);
-
-            viddec_fw_vc1_set_disp_aspect_ratio(&wi_de.vc1_sl_de, sh.ASPECT_RATIO);
-            viddec_fw_vc1_set_disp_frameratenr(&wi_de.vc1_sl_de, sh.seq_framerate_fraction.FRAMERATENR);
-            viddec_fw_vc1_set_disp_frameratedr(&wi_de.vc1_sl_de, sh.seq_framerate_fraction.FRAMERATEDR);
-            viddec_fw_vc1_set_disp_framerateexp(&wi_de.vc1_sl_de, sh.FRAMERATEEXP);
-
-            viddec_fw_vc1_set_disp_aspect_ratio_horiz_size(&wi_de.vc1_sl_de, sh.seq_aspect_size.ASPECT_HORIZ_SIZE);
-            viddec_fw_vc1_set_disp_aspect_ratio_vert_size(&wi_de.vc1_sl_de, sh.seq_aspect_size.ASPECT_VERT_SIZE);
-            viddec_fw_vc1_set_disp_color_prim(&wi_de.vc1_sl_de, sh.seq_color_format.COLOR_PRIM);
-            viddec_fw_vc1_set_disp_transfer_char(&wi_de.vc1_sl_de, sh.seq_color_format.TRANSFER_CHAR);
-
-            result = viddec_pm_append_workitem(ctxt, &wi_de, false);
-        }
-    }
-
     return status;
 }
 
@@ -400,31 +318,6 @@
         }
     }
 
-    // POPULATE WORKLOAD ITEM
-    {
-        viddec_workload_item_t wi;
-
-        wi.vwi_type = VIDDEC_WORKLOAD_GOP_INFO;
-
-        wi.vc1_ep.size = 0;
-        wi.vc1_ep.flags = 0;
-        wi.vc1_ep.pad = 0;
-
-        viddec_fw_vc1_set_ep_size_flag(&wi.vc1_ep, ep.CODED_SIZE_FLAG);
-        viddec_fw_vc1_set_ep_horiz_size(&wi.vc1_ep, ep.ep_size.CODED_WIDTH);
-        viddec_fw_vc1_set_ep_vert_size(&wi.vc1_ep, ep.ep_size.CODED_HEIGHT);
-
-        viddec_fw_vc1_set_ep_broken_link(&wi.vc1_ep, ep.ep_flags.BROKEN_LINK);
-        viddec_fw_vc1_set_ep_closed_entry(&wi.vc1_ep, ep.ep_flags.CLOSED_ENTRY);
-        viddec_fw_vc1_set_ep_panscan_flag(&wi.vc1_ep, ep.ep_flags.PANSCAN_FLAG);
-        viddec_fw_vc1_set_ep_range_mapy_flag(&wi.vc1_ep, ep.RANGE_MAPY_FLAG);
-        viddec_fw_vc1_set_ep_range_mapy(&wi.vc1_ep, ep.RANGE_MAPY);
-        viddec_fw_vc1_set_ep_range_mapuv_flag(&wi.vc1_ep, ep.RANGE_MAPUV_FLAG);
-        viddec_fw_vc1_set_ep_range_mapuv(&wi.vc1_ep, ep.RANGE_MAPUV);
-
-        result = viddec_pm_append_workitem(ctxt, &wi, false);
-    }
-
     DEB("ep: res: %dx%d\n", ep.ep_size.CODED_WIDTH, ep.ep_size.CODED_HEIGHT);
     DEB("md: after ep: res: %dx%d\n", md->width, md->height);
     return status;
@@ -527,78 +420,3 @@
     return status;
 }
 
-/*------------------------------------------------------------------------------
- * This function parses the user data information as defined in SMPTE 421M annex F.
- * It then appends that data to the workload.
- * Assume the flush byte 0x80 is within the 3 bytes before next start code.
- * let's put 1 byte per item first
- *------------------------------------------------------------------------------
- */
-vc1_Status vc1_ParseAndAppendUserData(void* ctxt, uint32_t sc)
-{
-    vc1_Status status = VC1_STATUS_OK;
-    uint32_t user_data;
-    viddec_workload_item_t wi;
-    uint32_t ud_id;
-
-    /* find the scope based on start code sc */
-    switch (sc) {
-    case vc1_SCSequenceUser:
-        wi.vwi_type = VIDDEC_WORKLOAD_SEQ_USER_DATA;
-        break;
-    case vc1_SCEntryPointUser:
-        wi.vwi_type = VIDDEC_WORKLOAD_GOP_USER_DATA;
-        break;
-    case vc1_SCFrameUser:
-        wi.vwi_type = VIDDEC_WORKLOAD_FRM_USER_DATA;
-        break;
-    case vc1_SCFieldUser:
-        wi.vwi_type = VIDDEC_WORKLOAD_FLD_USER_DATA;
-        break;
-    case vc1_SCSliceUser:
-        wi.vwi_type = VIDDEC_WORKLOAD_SLC_USER_DATA;
-        break;
-    default:
-        wi.vwi_type = VIDDEC_WORKLOAD_INVALID; //ERROR - should not happen
-        break;
-    }
-
-    /* get identifier - 4 bytes*/
-    // Extract this information but discard it for now
-    VC1_GET_BITS(32, ud_id);
-
-    /* Read 1 byte of user data and store it in workitem for the current stream level (SEQ/GOP/PIC).
-       Keep adding data payloads till it reaches size 11. When it is 11, the maximum user data payload size,
-       append the workitem. This loop is repeated till all user data is extracted and appended. */
-    wi.user_data.size = 0;
-    while (viddec_pm_get_bits(ctxt, &user_data, 8) != -1)
-    {
-        /* Store the valid byte in data payload */
-        wi.user_data.data_payload[wi.user_data.size] = user_data;
-        wi.user_data.size++;
-
-        /* When size exceeds payload size, append workitem and continue */
-        if (wi.user_data.size >= 11)
-        {
-            viddec_pm_setup_userdata(&wi);
-            viddec_pm_append_workitem(ctxt, &wi,false);
-            wi.user_data.size = 0;
-        }
-        if (user_data == 0x80) // flushing byte
-            break;
-    }
-    /* If size is not 0, append remaining user data. */
-    if (wi.user_data.size > 0)
-    {
-        int i;
-        for (i=wi.user_data.size; i<11; i++)
-        {
-            wi.user_data.data_payload[i] = 0;
-        }
-        viddec_pm_setup_userdata(&wi);
-        viddec_pm_append_workitem(ctxt, &wi,false);
-        wi.user_data.size = 0;
-    }
-
-    return(status);
-} // vc1_ParseAndAppendUserData
diff --git a/mixvbp/vbp_plugin/vc1/vc1parse.h b/mixvbp/vbp_plugin/vc1/vc1parse.h
index e190fe1..e8c5167 100755
--- a/mixvbp/vbp_plugin/vc1/vc1parse.h
+++ b/mixvbp/vbp_plugin/vc1/vc1parse.h
@@ -130,11 +130,6 @@
 void vc1_parse_emit_current_slice(void *parent, vc1_viddec_parser_t *parser);
 
 
-
-
-/* function to handle user data */
-vc1_Status vc1_ParseAndAppendUserData(void* ctxt, uint32_t sc);
-
 /*@}*/
 
 #endif /* _VC1PARSE_H_. */
diff --git a/mixvbp/vbp_plugin/vc1/vc1parse_bitplane.c b/mixvbp/vbp_plugin/vc1/vc1parse_bitplane.c
index 4996e28..94e4d42 100755
--- a/mixvbp/vbp_plugin/vc1/vc1parse_bitplane.c
+++ b/mixvbp/vbp_plugin/vc1/vc1parse_bitplane.c
@@ -533,8 +533,7 @@
     if (bpp->imode != VC1_BITPLANE_RAW_MODE)
     {
         uint32_t* pl;
-        int sizeinbytes,nitems,i;
-        viddec_workload_item_t    wi;
+        int sizeinbytes,i;
         uint32_t *bit_dw;
 
         pInfo->metadata.bp_raw[bpnum - VIDDEC_WORKLOAD_VC1_BITPLANE0] = false;
@@ -544,22 +543,6 @@
         pl = bpp->databits;
         bit_dw = bpp->databits;
 
-        // How many payloads must be generated
-        nitems = (sizeinbytes + (sizeof(wi.data.data_payload) - 1)) /
-                 sizeof(wi.data.data_payload);
-
-        // Dump DMEM to an array of workitems
-        for ( i = 0; i < nitems; i++ )
-        {
-            wi.vwi_type           =  bpnum;
-            wi.data.data_offset   = (char *)pl - (char *)bit_dw; // offset within struct
-
-            wi.data.data_payload[0] = pl[0];
-            wi.data.data_payload[1] = pl[1];
-            pl += 2;
-
-            viddec_pm_append_workitem( ctxt, &wi, false);
-        }
     }
 
 #ifdef VBP
diff --git a/mixvbp/vbp_plugin/vc1/viddec_vc1_parse.c b/mixvbp/vbp_plugin/vc1/viddec_vc1_parse.c
index a9644d9..ad83a18 100755
--- a/mixvbp/vbp_plugin/vc1/viddec_vc1_parse.c
+++ b/mixvbp/vbp_plugin/vc1/viddec_vc1_parse.c
@@ -278,7 +278,6 @@
     case vc1_SCSliceUser:
     case vc1_SCFieldUser:
     {/* Handle user data */
-        status = vc1_ParseAndAppendUserData(parent, sc); //parse and add items
         parser->sc_seen_since_last_wkld |= VC1_SC_UD;
 #ifdef VBP
         parser->start_code = VC1_SC_UD;
diff --git a/mixvbp/vbp_plugin/vc1/viddec_vc1_workload.c b/mixvbp/vbp_plugin/vc1/viddec_vc1_workload.c
deleted file mode 100755
index cf6fa7f..0000000
--- a/mixvbp/vbp_plugin/vc1/viddec_vc1_workload.c
+++ /dev/null
@@ -1,960 +0,0 @@
-/* Any workload management goes in this file */
-
-#include "viddec_fw_debug.h"
-#include "vc1.h"
-#include "vc1parse.h"
-#include "viddec_fw_workload.h"
-#include <auto_eas/gen4_mfd.h>
-#include "viddec_pm_utils_bstream.h"
-
-/* this function returns workload frame types corresponding to VC1 PTYPES (frame types)
- * VC1 frame types: can be found in vc1parse_common_defs.h
- * workload frame types are in viddec_workload.h
-*/
-static inline uint32_t vc1_populate_frame_type(uint32_t vc1_frame_type)
-{
-    uint32_t viddec_frame_type;
-
-    switch (vc1_frame_type)
-    {
-    case VC1_I_FRAME:
-        viddec_frame_type = VIDDEC_FRAME_TYPE_I;
-        break;
-    case VC1_P_FRAME:
-        viddec_frame_type = VIDDEC_FRAME_TYPE_P;
-        break;
-    case VC1_B_FRAME:
-        viddec_frame_type = VIDDEC_FRAME_TYPE_B;
-        break;
-    case VC1_BI_FRAME:
-        viddec_frame_type = VIDDEC_FRAME_TYPE_BI;
-        break;
-    case VC1_SKIPPED_FRAME :
-        viddec_frame_type =  VIDDEC_FRAME_TYPE_SKIP;
-        break;
-    default:
-        viddec_frame_type = VIDDEC_FRAME_TYPE_INVALID;
-        break;
-    } // switch on vc1 frame type
-
-    return(viddec_frame_type);
-} // vc1_populate_frame_type
-
-static void translate_parser_info_to_frame_attributes(void *parent, vc1_viddec_parser_t *parser)
-{
-    viddec_workload_t        *wl = viddec_pm_get_header( parent );
-    viddec_frame_attributes_t *attrs = &wl->attrs;
-    vc1_Info        *info = &parser->info;
-    unsigned i;
-
-    /* typical sequence layer and entry_point data */
-    attrs->cont_size.height       = info->metadata.height * 2 + 2;
-    attrs->cont_size.width        = info->metadata.width  * 2 + 2;
-
-    /* frame type */
-    /* we can have two fileds with different types for field interlace coding mode */
-    if (info->picLayerHeader.FCM == VC1_FCM_FIELD_INTERLACE) {
-        attrs->frame_type = vc1_populate_frame_type(info->picLayerHeader.PTypeField1);
-        attrs->bottom_field_type = vc1_populate_frame_type(info->picLayerHeader.PTypeField2);
-    } else {
-        attrs->frame_type = vc1_populate_frame_type(info->picLayerHeader.PTYPE);
-        attrs->bottom_field_type = VIDDEC_FRAME_TYPE_INVALID; //unknown
-    }
-
-    /* frame counter */
-    attrs->vc1.tfcntr = info->picLayerHeader.TFCNTR;
-
-    /* TFF, repeat frame, field */
-    attrs->vc1.tff = info->picLayerHeader.TFF;
-    attrs->vc1.rptfrm = info->picLayerHeader.RPTFRM;
-    attrs->vc1.rff = info->picLayerHeader.RFF;
-
-    /* PAN Scan */
-    attrs->vc1.ps_present = info->picLayerHeader.PS_PRESENT;
-    attrs->vc1.num_of_pan_scan_windows = info->picLayerHeader.number_of_pan_scan_window;
-    for (i=0; i<attrs->vc1.num_of_pan_scan_windows; i++) {
-        attrs->vc1.pan_scan_window[i].hoffset =  info->picLayerHeader.PAN_SCAN_WINDOW[i].hoffset;
-        attrs->vc1.pan_scan_window[i].voffset =  info->picLayerHeader.PAN_SCAN_WINDOW[i].voffset;
-        attrs->vc1.pan_scan_window[i].width =  info->picLayerHeader.PAN_SCAN_WINDOW[i].width;
-        attrs->vc1.pan_scan_window[i].height =  info->picLayerHeader.PAN_SCAN_WINDOW[i].height;
-    } //end for i
-
-    return;
-} // translate_parser_info_to_frame_attributes
-
-/* sends VIDDEC_WORKLOAD_VC1_PAST_FRAME item */
-static inline void vc1_send_past_ref_items(void *parent)
-{
-    viddec_workload_item_t wi;
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_PAST_FRAME;
-    wi.ref_frame.reference_id = 0;
-    wi.ref_frame.luma_phys_addr = 0;
-    wi.ref_frame.chroma_phys_addr = 0;
-    viddec_pm_append_workitem( parent, &wi, false );
-    return;
-}
-
-/* send future frame item */
-static inline void vc1_send_future_ref_items(void *parent)
-{
-    viddec_workload_item_t wi;
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_FUTURE_FRAME;
-    wi.ref_frame.reference_id = 0;
-    wi.ref_frame.luma_phys_addr = 0;
-    wi.ref_frame.chroma_phys_addr = 0;
-    viddec_pm_append_workitem( parent, &wi, false );
-    return;
-}
-
-/* send reorder frame item to host
- * future frame gets push to past   */
-static inline void send_reorder_ref_items(void *parent)
-{
-    viddec_workload_item_t wi;
-    wi.vwi_type = VIDDEC_WORKLOAD_REFERENCE_FRAME_REORDER;
-    wi.ref_reorder.ref_table_offset = 0;
-    wi.ref_reorder.ref_reorder_00010203 = 0x01010203; //put reference frame index 1 as reference index 0
-    wi.ref_reorder.ref_reorder_04050607 = 0x04050607; // index 4,5,6,7 stay the same
-    viddec_pm_append_workitem( parent, &wi, false );
-    return;
-} // send_reorder_ref_items
-
-
-/* sends VIDDEC_WORKLOAD_VC1_PAST_FRAME item */
-static inline void vc1_send_ref_fcm_items(void *parent, uint32_t past_fcm, uint32_t future_fcm)
-{
-    viddec_workload_item_t wi;
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_REGS_REF_FRAME_TYPE;
-    wi.vwi_payload[0]= 0;
-    wi.vwi_payload[1]= past_fcm;
-    wi.vwi_payload[2]= future_fcm;
-    viddec_pm_append_workitem( parent, &wi, false );
-    return;
-}
-
-
-
-/* send reorder frame item to host
- * future frame gets push to past   */
-static inline void send_SEQ_ENTRY_registers(void *parent, vc1_viddec_parser_t *parser)
-{
-    uint32_t stream_format1 = 0;
-    uint32_t stream_format2 = 0;
-    uint32_t entrypoint1 = 0;
-    viddec_workload_item_t wi;
-
-    vc1_metadata_t *md = &(parser->info.metadata);
-
-
-
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_1, PROFILE, stream_format1, md->PROFILE);
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_1, LEVEL, stream_format1, md->LEVEL);
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_1, CHROMAFORMAT, stream_format1, md->CHROMAFORMAT);
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_1, FRMRTQ, stream_format1, md->FRMRTQ);
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_1, BITRTQ, stream_format1, md->BITRTQ);
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_1, POSTPRO, stream_format1, md->POSTPROCFLAG);
-
-
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_2, PULLDOWN, stream_format2, md->PULLDOWN);
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_2, INTERLACE, stream_format2, md->INTERLACE);
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_2, TFCNTRFLAG, stream_format2, md->TFCNTRFLAG);
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_2, FINTERPFLAG, stream_format2, md->FINTERPFLAG);
-    BF_WRITE(VC1_0_SEQPIC_STREAM_FORMAT_2, PSF, stream_format2, md->PSF);
-
-
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, BROKEN_LINK,   entrypoint1, md->BROKEN_LINK);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, CLOSED_ENTRY,  entrypoint1, md->CLOSED_ENTRY);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, PANSCAN_FLAG,  entrypoint1, md->PANSCAN_FLAG);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, REFDIST_FLAG,  entrypoint1, md->REFDIST_FLAG);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, LOOPFILTER,    entrypoint1, md->LOOPFILTER);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, FASTUVMC,      entrypoint1, md->FASTUVMC);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, EXTENDED_MV,   entrypoint1, md->EXTENDED_MV);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, DQUANT,        entrypoint1, md->DQUANT);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, VS_TRANSFORM,  entrypoint1, md->VSTRANSFORM);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, OVERLAP,       entrypoint1, md->OVERLAP);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, QUANTIZER,     entrypoint1, md->QUANTIZER);
-    BF_WRITE(VC1_0_SEQPIC_ENTRY_POINT_1, EXTENDED_DMV,  entrypoint1, md->EXTENDED_DMV);
-
-
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_REGS_SEQ_ENTRY;
-
-
-    wi.vwi_payload[0] = stream_format1;
-    wi.vwi_payload[1] = stream_format2;
-    wi.vwi_payload[2] = entrypoint1;
-
-    viddec_pm_append_workitem( parent, &wi, false );
-    return;
-} // send_reorder_ref_items
-
-
-/* send reorder frame item to host
- * future frame gets push to past   */
-static inline void send_SIZE_AND_AP_RANGEMAP_registers(void *parent, vc1_viddec_parser_t *parser)
-{
-    uint32_t coded_size = 0;
-    uint32_t ap_range_map = 0;
-
-    viddec_workload_item_t wi;
-
-    vc1_metadata_t *md = &(parser->info.metadata);
-
-
-    BF_WRITE(VC1_0_SEQPIC_CODED_SIZE, WIDTH, coded_size, md->width);
-    BF_WRITE(VC1_0_SEQPIC_CODED_SIZE, HEIGHT, coded_size, md->height);
-
-
-    /* if range reduction is indicated at seq. layer, populate range reduction registers for the frame*/
-    if (VC1_PROFILE_ADVANCED == md->PROFILE)
-    {
-
-
-        BF_WRITE( VC1_0_SEQPIC_RANGE_MAP, RANGE_MAP_Y_FLAG, ap_range_map, md->RANGE_MAPY_FLAG);
-        BF_WRITE( VC1_0_SEQPIC_RANGE_MAP, RANGE_MAP_Y, ap_range_map, md->RANGE_MAPY);
-        BF_WRITE( VC1_0_SEQPIC_RANGE_MAP, RANGE_MAP_UV_FLAG, ap_range_map, md->RANGE_MAPUV_FLAG);
-        BF_WRITE( VC1_0_SEQPIC_RANGE_MAP, RANGE_MAP_UV, ap_range_map, md->RANGE_MAPUV);
-
-
-
-
-    }
-    else
-    {
-        ap_range_map = 0;
-    }
-
-
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_REGS_SIZE_AND_AP_RANGEMAP;
-
-
-    wi.vwi_payload[0] = 0;
-    wi.vwi_payload[1] = coded_size;
-    wi.vwi_payload[2] = ap_range_map;
-
-    viddec_pm_append_workitem( parent, &wi, false );
-    return;
-} // send_reorder_ref_items
-
-
-
-/* send reorder frame item to host
- * future frame gets push to past   */
-static inline void send_SLICE_FRAME_TYPE_INFO_registers(void *parent, vc1_viddec_parser_t *parser)
-{
-    uint32_t alt_frame_type = 0;
-    uint32_t frame_type = 0;
-
-    vc1_PictureLayerHeader *pic = &(parser->info.picLayerHeader);
-    viddec_workload_item_t wi;
-
-    vc1_metadata_t *md = &(parser->info.metadata);
-
-
-    BF_WRITE(VC1_0_SEQPIC_FRAME_TYPE, FCM, frame_type, pic->FCM);
-    BF_WRITE(VC1_0_SEQPIC_FRAME_TYPE, PTYPE, frame_type, pic->PTYPE);
-
-    alt_frame_type = frame_type;
-
-    if (VC1_PROFILE_ADVANCED == md->PROFILE)
-    {
-        if ( (VC1_P_FRAME == pic->PTYPE)||(VC1_B_FRAME == pic->PTYPE) )
-        {
-            BF_WRITE(VC1_0_SEQPIC_ALT_FRAME_TYPE, PQUANT, alt_frame_type, pic->PQUANT);
-        }
-    }
-    else
-    {
-        if ( VC1_SKIPPED_FRAME== pic->PTYPE)
-        {
-            BF_WRITE(VC1_0_SEQPIC_ALT_FRAME_TYPE, PQUANT, alt_frame_type, 0);
-        } else {
-            BF_WRITE(VC1_0_SEQPIC_ALT_FRAME_TYPE, PQUANT, alt_frame_type, pic->PQUANT);
-        }
-    }
-
-
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_REGS_SLICE_FRAME_TYPE_INFO;
-
-
-    wi.vwi_payload[0] = 0;
-    wi.vwi_payload[1] = frame_type;
-    wi.vwi_payload[2] = alt_frame_type;
-
-    viddec_pm_append_workitem( parent, &wi, false );
-    return;
-} // send_reorder_ref_items
-
-/* send reorder frame item to host
- * future frame gets push to past   */
-static inline void send_SLICE_CONTROL_INFO_registers(void *parent, vc1_viddec_parser_t *parser)
-{
-    uint32_t recon_control = 0;
-    uint32_t mv_control = 0;
-    uint32_t blk_control = 0;
-
-    vc1_PictureLayerHeader *pic = &(parser->info.picLayerHeader);
-    viddec_workload_item_t wi;
-
-    int is_previous_ref_rr=0;
-
-    vc1_metadata_t *md = &(parser->info.metadata);
-
-
-    BF_WRITE( VC1_0_SEQPIC_RECON_CONTROL, RNDCTRL, recon_control, md->RNDCTRL);
-    BF_WRITE( VC1_0_SEQPIC_RECON_CONTROL, UVSAMP, recon_control, pic->UVSAMP);
-    BF_WRITE( VC1_0_SEQPIC_RECON_CONTROL, PQUANT, recon_control, pic->PQUANT);
-    BF_WRITE( VC1_0_SEQPIC_RECON_CONTROL, HALFQP, recon_control, pic->HALFQP);
-    BF_WRITE( VC1_0_SEQPIC_RECON_CONTROL, UNIFORM_QNT, recon_control, pic->UniformQuant);
-    BF_WRITE( VC1_0_SEQPIC_RECON_CONTROL, POSTPROC, recon_control, pic->POSTPROC);
-    BF_WRITE( VC1_0_SEQPIC_RECON_CONTROL, CONDOVER, recon_control, pic->CONDOVER);
-    BF_WRITE( VC1_0_SEQPIC_RECON_CONTROL, PQINDEX_LE8, recon_control, (pic->PQINDEX <= 8));
-
-    /* Get the range reduced status of the previous frame */
-    switch (pic->PTYPE)
-    {
-    case VC1_P_FRAME:
-    {
-        is_previous_ref_rr = parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].rr_frm;
-        break;
-    }
-    case VC1_B_FRAME:
-    {
-        is_previous_ref_rr = parser->ref_frame[VC1_REF_FRAME_T_MINUS_2].rr_frm;
-        break;
-    }
-    default:
-    {
-        break;
-    }
-    }
-
-    if (pic->RANGEREDFRM)
-    {
-
-        if (!is_previous_ref_rr)
-        {
-            BF_WRITE(VC1_0_SEQPIC_RECON_CONTROL, RANGE_REF_RED_EN, recon_control, 1);
-            BF_WRITE(VC1_0_SEQPIC_RECON_CONTROL, RANGE_REF_RED_TYPE, recon_control, 1);
-        }
-    }
-    else
-    {
-        /* if current frame is not RR but previous was RR,  scale up the reference frame ( RANGE_REF_RED_TYPE = 0) */
-        if (is_previous_ref_rr)
-        {
-            BF_WRITE(VC1_0_SEQPIC_RECON_CONTROL, RANGE_REF_RED_EN, recon_control, 1);
-            BF_WRITE(VC1_0_SEQPIC_RECON_CONTROL, RANGE_REF_RED_TYPE, recon_control, 0);
-        }
-    } // end for RR upscale
-
-
-
-
-
-    BF_WRITE( VC1_0_SEQPIC_MOTION_VECTOR_CONTROL, MVRANGE,   mv_control, pic->MVRANGE);
-    if ( pic->MVMODE == VC1_MVMODE_INTENSCOMP)
-        BF_WRITE( VC1_0_SEQPIC_MOTION_VECTOR_CONTROL, MVMODE,    mv_control, pic->MVMODE2);
-    else
-        BF_WRITE( VC1_0_SEQPIC_MOTION_VECTOR_CONTROL, MVMODE,    mv_control, pic->MVMODE);
-    BF_WRITE( VC1_0_SEQPIC_MOTION_VECTOR_CONTROL, MVTAB,  mv_control,  pic->MVTAB);
-    BF_WRITE( VC1_0_SEQPIC_MOTION_VECTOR_CONTROL, DMVRANGE,  mv_control, pic->DMVRANGE);
-    BF_WRITE( VC1_0_SEQPIC_MOTION_VECTOR_CONTROL, MV4SWITCH, mv_control, pic->MV4SWITCH);
-    BF_WRITE( VC1_0_SEQPIC_MOTION_VECTOR_CONTROL, MBMODETAB, mv_control, pic->MBMODETAB);
-    BF_WRITE( VC1_0_SEQPIC_MOTION_VECTOR_CONTROL, NUMREF,    mv_control,
-              pic->NUMREF || ((pic->PTYPE == VC1_B_FRAME) && ( pic->FCM == VC1_FCM_FIELD_INTERLACE )  ));
-    BF_WRITE( VC1_0_SEQPIC_MOTION_VECTOR_CONTROL, REFFIELD,  mv_control, pic->REFFIELD);
-
-
-
-    // BLOCK CONTROL REGISTER Offset 0x2C
-    BF_WRITE( VC1_0_SEQPIC_BLOCK_CONTROL, CBPTAB, blk_control, pic->CBPTAB);
-    BF_WRITE(VC1_0_SEQPIC_BLOCK_CONTROL, TTMFB, blk_control, pic->TTMBF);
-    BF_WRITE(VC1_0_SEQPIC_BLOCK_CONTROL, TTFRM, blk_control, pic->TTFRM);
-    BF_WRITE(VC1_0_SEQPIC_BLOCK_CONTROL, MV2BPTAB, blk_control, pic->MV2BPTAB);
-    BF_WRITE(VC1_0_SEQPIC_BLOCK_CONTROL, MV4BPTAB, blk_control, pic->MV4BPTAB);
-    if ((pic->CurrField == 1) && (pic->SLICE_ADDR))
-    {
-        int mby = md->height * 2 + 2;
-        mby = (mby + 15 ) / 16;
-        pic->SLICE_ADDR -= (mby/2);
-    }
-    BF_WRITE(VC1_0_SEQPIC_BLOCK_CONTROL, INITIAL_MV_Y, blk_control, pic->SLICE_ADDR);
-    BF_WRITE(VC1_0_SEQPIC_BLOCK_CONTROL, BP_RAW_ID2, blk_control, md->bp_raw[0]);
-    BF_WRITE(VC1_0_SEQPIC_BLOCK_CONTROL, BP_RAW_ID1, blk_control, md->bp_raw[1]);
-    BF_WRITE(VC1_0_SEQPIC_BLOCK_CONTROL, BP_RAW_ID0, blk_control, md->bp_raw[2]);
-
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_REGS_SLICE_CONTROL_INFO;
-
-
-    wi.vwi_payload[0] = recon_control;
-    wi.vwi_payload[1] = mv_control;
-    wi.vwi_payload[2] = blk_control;
-
-    viddec_pm_append_workitem( parent, &wi, false );
-    return;
-} // send_reorder_ref_items
-
-/* send reorder frame item to host
- * future frame gets push to past   */
-static inline void send_SLICE_OTHER_INFO_registers(void *parent, vc1_viddec_parser_t *parser)
-{
-    uint32_t trans_data = 0;
-    uint32_t vop_dquant = 0;
-    uint32_t ref_bfraction = 0;
-
-    vc1_PictureLayerHeader *pic = &(parser->info.picLayerHeader);
-    viddec_workload_item_t wi;
-
-    vc1_metadata_t *md = &(parser->info.metadata);
-
-    BF_WRITE(VC1_0_SEQPIC_REFERENCE_B_FRACTION, BFRACTION_DEN, ref_bfraction, pic->BFRACTION_DEN);
-    BF_WRITE(VC1_0_SEQPIC_REFERENCE_B_FRACTION, BFRACTION_NUM, ref_bfraction, pic->BFRACTION_NUM);
-    BF_WRITE(VC1_0_SEQPIC_REFERENCE_B_FRACTION, REFDIST, ref_bfraction, md->REFDIST);
-
-    if (md->DQUANT)
-    {
-        if (pic->PQDIFF == 7)
-            BF_WRITE( VC1_0_SEQPIC_VOP_DEQUANT, PQUANT_ALT, vop_dquant, pic->ABSPQ);
-        else if (pic->DQUANTFRM == 1)
-            BF_WRITE( VC1_0_SEQPIC_VOP_DEQUANT, PQUANT_ALT, vop_dquant, pic->PQUANT + pic->PQDIFF + 1);
-    }
-    BF_WRITE( VC1_0_SEQPIC_VOP_DEQUANT, DQUANTFRM, vop_dquant, pic->DQUANTFRM);
-    BF_WRITE( VC1_0_SEQPIC_VOP_DEQUANT, DQPROFILE, vop_dquant, pic->DQPROFILE);
-    BF_WRITE( VC1_0_SEQPIC_VOP_DEQUANT, DQES,      vop_dquant, pic->DQSBEDGE);
-    BF_WRITE( VC1_0_SEQPIC_VOP_DEQUANT, DQBILEVEL, vop_dquant, pic->DQBILEVEL);
-
-    BF_WRITE( VC1_0_SEQPIC_TRANSFORM_DATA, TRANSACFRM,  trans_data, pic->TRANSACFRM);
-    BF_WRITE( VC1_0_SEQPIC_TRANSFORM_DATA, TRANSACFRM2, trans_data, pic->TRANSACFRM2);
-    BF_WRITE( VC1_0_SEQPIC_TRANSFORM_DATA, TRANSDCTAB,  trans_data, pic->TRANSDCTAB);
-
-
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_REGS_SLICE_OTHER_INFO;
-
-
-    wi.vwi_payload[0] = trans_data;
-    wi.vwi_payload[1] = vop_dquant;
-    wi.vwi_payload[2] = ref_bfraction;
-
-    viddec_pm_append_workitem( parent, &wi, false );
-    return;
-} // send_reorder_ref_items
-
-
-
-/* send reorder frame item to host
- * future frame gets push to past   */
-static inline void send_STRUCT_FIELD_AND_SMP_RANGEMAP_INFO_registers(void *parent, vc1_viddec_parser_t *parser)
-{
-    uint32_t imgstruct = 0;
-    uint32_t fieldref_ctrl_id = 0;
-    uint32_t smp_rangemap = 0;
-
-    vc1_PictureLayerHeader *pic = &(parser->info.picLayerHeader);
-    viddec_workload_item_t wi;
-
-    vc1_metadata_t *md = &(parser->info.metadata);
-
-    if ( pic->FCM == VC1_FCM_FIELD_INTERLACE ) {
-        BF_WRITE(VC1_0_SEQPIC_IMAGE_STRUCTURE, IMG_STRUC, imgstruct, (pic->BottomField) ? 2 : 1);
-    }
-
-    BF_WRITE( VC1_0_SEQPIC_FIELD_REF_FRAME_ID, TOP_FIELD,    fieldref_ctrl_id, pic->BottomField);
-    BF_WRITE( VC1_0_SEQPIC_FIELD_REF_FRAME_ID, SECOND_FIELD, fieldref_ctrl_id, pic->CurrField);
-    if (parser->info.picLayerHeader.PTYPE == VC1_I_FRAME)
-    {
-        BF_WRITE(VC1_0_SEQPIC_FIELD_REF_FRAME_ID, ANCHOR, fieldref_ctrl_id, 1);
-    }
-    else
-    {
-        BF_WRITE(VC1_0_SEQPIC_FIELD_REF_FRAME_ID, ANCHOR, fieldref_ctrl_id, parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].anchor[pic->CurrField]);
-    }
-
-    if (VC1_PROFILE_ADVANCED != md->PROFILE)
-    {
-        if (pic->RANGEREDFRM)
-        {
-            //BF_WRITE( VC1_0_SEQPIC_RANGE_MAP, RANGE_MAP_Y_FLAG, smp_rangemap, md->RANGE_MAPY_FLAG);
-            //BF_WRITE( VC1_0_SEQPIC_RANGE_MAP, RANGE_MAP_UV_FLAG, smp_rangemap, md->RANGE_MAPUV_FLAG);
-            smp_rangemap = 0x11;
-        }
-
-    }
-
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_REGS_STRUCT_FIELD_AND_SMP_RANGEMAP_INFO;
-
-
-    wi.vwi_payload[0] = imgstruct;
-    wi.vwi_payload[1] = fieldref_ctrl_id;
-    wi.vwi_payload[2] = smp_rangemap;
-
-    viddec_pm_append_workitem( parent, &wi, false );
-    return;
-} // send_reorder_ref_items
-
-
-/* send reorder frame item to host
- * future frame gets push to past   */
-static inline void send_INT_COM_registers(void *parent, vc1_viddec_parser_t *parser)
-{
-    uint32_t intcomp_fwd_top = 0;
-    uint32_t intcomp_fwd_bot = 0;
-    uint32_t intcomp_bwd_top = 0;
-    uint32_t intcomp_bwd_bot = 0;
-    uint32_t intcomp_cur = 0;
-
-    uint32_t POS_2nd_INTCOMP = 13;
-    uint32_t MASK_1st_INTCOMP = 0x1fff;
-    uint32_t MASK_2nd_INTCOMP = 0x3ffe000;
-
-    vc1_PictureLayerHeader *pic = &(parser->info.picLayerHeader);
-    viddec_workload_item_t wi;
-
-    vc1_metadata_t *md = &(parser->info.metadata);
-
-
-
-    if (VC1_SKIPPED_FRAME == pic->PTYPE)
-    {
-        parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].intcomp_top =0;
-        return;
-    }
-
-    if ( VC1_FCM_FIELD_INTERLACE != pic->FCM )
-    {
-
-        BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, INT_COMP_1, intcomp_cur, 1);
-        BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, LUMA_SCALE_1, intcomp_cur, pic->LUMSCALE);
-        BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, LUMA_SHIFT_1, intcomp_cur, pic->LUMSHIFT);
-
-        if ( !((pic->MVMODE == VC1_MVMODE_INTENSCOMP) || (pic->INTCOMP)) )
-            intcomp_cur = 0;
-
-        if ( (VC1_BI_FRAME==pic->PTYPE)||(VC1_B_FRAME==pic->PTYPE)  )
-        {
-            parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].intcomp_top = 0;
-            parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].intcomp_bot = 0;
-
-            intcomp_bwd_top = parser->intcomp_top[0];
-            intcomp_bwd_bot = parser->intcomp_bot[0];
-            intcomp_fwd_bot = parser->intcomp_bot[1];
-
-
-            if ( parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].id != (-1) )
-            {
-                if (VC1_SKIPPED_FRAME != parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].type)
-                    intcomp_fwd_top = parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].intcomp_top;
-            }
-            else
-            {
-                if (VC1_SKIPPED_FRAME != parser->ref_frame[VC1_REF_FRAME_T_MINUS_2].type)
-                    intcomp_fwd_top = parser->intcomp_top[1];
-            }
-        }
-        else
-        {  //I,P TYPE
-
-            parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].intcomp_top = intcomp_cur;
-
-            if (VC1_FCM_FIELD_INTERLACE == parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].fcm)
-            {
-                intcomp_fwd_top = parser->intcomp_top[1];
-                intcomp_fwd_top |= intcomp_cur << POS_2nd_INTCOMP;
-
-                intcomp_fwd_bot = parser->intcomp_bot[1];
-                intcomp_fwd_bot |= intcomp_cur << POS_2nd_INTCOMP;
-            }
-            else
-            {
-                intcomp_fwd_top = intcomp_cur;// << POS_2nd_INTCOMP;
-                intcomp_fwd_bot = 0;
-            }
-        }
-    }
-    else
-    {
-        //FIELD INTERLACE
-        //if(0!=md->INTCOMPFIELD)
-        //No debugging
-
-        if (md->INTCOMPFIELD == VC1_INTCOMP_BOTTOM_FIELD)
-        {
-            BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, INT_COMP_2, intcomp_cur, 1);
-            BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, LUMA_SCALE_2, intcomp_cur, md->LUMSCALE2);
-            BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, LUMA_SHIFT_2, intcomp_cur, md->LUMSHIFT2);
-        }
-        else
-        {
-            BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, INT_COMP_1, intcomp_cur, 1);
-            BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, LUMA_SCALE_1, intcomp_cur, pic->LUMSCALE);
-            BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, LUMA_SHIFT_1, intcomp_cur, pic->LUMSHIFT);
-        }
-
-        if (md->INTCOMPFIELD == VC1_INTCOMP_BOTH_FIELD)
-        {
-            BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, INT_COMP_2, intcomp_cur, 1);
-            BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, LUMA_SCALE_2, intcomp_cur, md->LUMSCALE2);
-            BF_WRITE(VC1_0_SEQPIC_INTENSITY_COMPENSATION, LUMA_SHIFT_2, intcomp_cur, md->LUMSHIFT2);
-        }
-
-        if (pic->MVMODE != VC1_MVMODE_INTENSCOMP)
-        {
-            intcomp_cur = 0;
-        }
-
-        if (pic->CurrField == 0)
-        {
-            if (pic->TFF)
-            {
-                parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].intcomp_top = intcomp_cur;
-            }
-            else
-            {
-                parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].intcomp_bot = intcomp_cur;
-            }
-        }
-        else
-        {
-            if (pic->TFF)
-            {
-                parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].intcomp_bot = intcomp_cur;
-            }
-            else
-            {
-                parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].intcomp_top = intcomp_cur;
-            }
-        }
-
-        if (pic->CurrField == 1)
-        {  //SECOND FIELD
-
-            if (VC1_B_FRAME != pic->PTYPE)
-            {
-                if (pic->TFF)
-                {
-                    intcomp_bwd_top = intcomp_cur & MASK_1st_INTCOMP;
-
-                    intcomp_fwd_bot = (parser->intcomp_bot[1] & MASK_2nd_INTCOMP) >> POS_2nd_INTCOMP;  //???????
-                    intcomp_fwd_bot |= (intcomp_cur & MASK_2nd_INTCOMP);
-
-                    intcomp_fwd_top = parser->intcomp_top[1];
-                }
-                else
-                {
-                    intcomp_bwd_bot= (intcomp_cur & MASK_2nd_INTCOMP)>>POS_2nd_INTCOMP;
-
-                    intcomp_fwd_top = (parser->intcomp_top[1] & MASK_2nd_INTCOMP) >> POS_2nd_INTCOMP;
-                    intcomp_fwd_top |= (intcomp_cur&MASK_1st_INTCOMP) << POS_2nd_INTCOMP;
-
-                    intcomp_fwd_bot = parser->intcomp_bot[1];
-                }
-            }
-            else
-            {    //B TYPE
-                intcomp_fwd_top = parser->intcomp_top[1];
-                intcomp_fwd_bot = parser->intcomp_bot[1];
-
-                intcomp_bwd_top = parser->intcomp_top[0];
-                intcomp_bwd_bot = parser->intcomp_bot[0];
-            }
-        }
-        else
-        {  //FIRST FILED
-
-            if ( (VC1_B_FRAME==pic->PTYPE)||(VC1_BI_FRAME==pic->PTYPE) )
-            {
-                if (VC1_SKIPPED_FRAME!=parser->ref_frame[VC1_REF_FRAME_T_MINUS_2].type)
-                {
-                    intcomp_fwd_top = parser->intcomp_top[1];
-                    intcomp_fwd_bot = parser->intcomp_bot[1];
-                }
-
-                intcomp_bwd_top = parser->intcomp_top[0];
-                intcomp_bwd_bot = parser->intcomp_bot[0];
-
-            }
-            else
-            {  //I,P TYPE
-
-                intcomp_fwd_top = parser->intcomp_top[1] & MASK_1st_INTCOMP;
-                intcomp_fwd_top |= (intcomp_cur&MASK_1st_INTCOMP)<<POS_2nd_INTCOMP;
-
-                intcomp_fwd_bot = parser->intcomp_bot[1] & MASK_1st_INTCOMP;
-                intcomp_fwd_bot |= (intcomp_cur & MASK_2nd_INTCOMP);
-            }   //pic->PTYPE == I,P TYPE
-        }   //pic->CurrField == 0
-    }  //VC1_FCM_FIELD_INTERLACE != pic->FCM
-
-    if ( (VC1_B_FRAME != pic->PTYPE) && (VC1_BI_FRAME != pic->PTYPE) )
-    {
-        parser->intcomp_top[1] = intcomp_fwd_top;
-        parser->intcomp_bot[1] = intcomp_fwd_bot;
-
-        parser->intcomp_top[0] = intcomp_bwd_top;
-        parser->intcomp_bot[0] = intcomp_bwd_bot;
-    }
-
-    //OS_INFO("intcomp_fwd_top = %d\n", intcomp_fwd_top);
-    //OS_INFO("intcomp_fwd_bot = %d\n", intcomp_fwd_bot);
-
-
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_REGS_INT_COM_FW;
-
-    wi.vwi_payload[0] = 0;
-    wi.vwi_payload[1] = intcomp_fwd_top;
-    wi.vwi_payload[2] = intcomp_fwd_bot;
-
-    viddec_pm_append_workitem( parent, &wi, false );
-
-    wi.vwi_type = VIDDEC_WORKLOAD_VC1_REGS_INT_COM_BW;
-
-    wi.vwi_payload[0] = 0;
-    wi.vwi_payload[1] = intcomp_bwd_top;
-    wi.vwi_payload[2] = intcomp_bwd_bot;
-
-    viddec_pm_append_workitem( parent, &wi, false );
-
-
-    return;
-} // send_reorder_ref_items
-
-
-/** update workload with more workload items for ref and update values to store...
- */
-void vc1_parse_emit_frame_start(void *parent, vc1_viddec_parser_t *parser)
-{
-    vc1_metadata_t *md = &(parser->info.metadata);
-    viddec_workload_t *wl = viddec_pm_get_header(parent);
-    int frame_type = parser->info.picLayerHeader.PTYPE;
-    int frame_id = 1; // new reference frame is assigned index 1
-
-    /* init */
-    memset(&parser->spr, 0, sizeof(parser->spr));
-    wl->is_reference_frame = 0;
-
-    /* set flag - extra ouput frame needed for range adjustment (range mapping or range reduction */
-    if (parser->info.metadata.RANGE_MAPY_FLAG ||
-            parser->info.metadata.RANGE_MAPUV_FLAG ||
-            parser->info.picLayerHeader.RANGEREDFRM)
-    {
-        wl->is_reference_frame |= WORKLOAD_FLAGS_RA_FRAME;
-    }
-
-    LOG_CRIT("vc1_start_new_frame: frame_type=%d \n",frame_type);
-
-    parser->is_reference_picture = ((VC1_B_FRAME != frame_type) && (VC1_BI_FRAME != frame_type));
-
-    /* reference / anchor frames processing
-     * we need to send reorder before reference frames */
-    if (parser->is_reference_picture)
-    {
-        /* one frame has been sent */
-        if (parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].id != -1)
-        {
-            /* there is a frame in the reference buffer, move it to the past */
-            send_reorder_ref_items(parent);
-        }
-    }
-
-    /* send workitems for reference frames */
-    switch ( frame_type )
-    {
-    case VC1_B_FRAME:
-    {
-        vc1_send_past_ref_items(parent);
-        vc1_send_future_ref_items(parent);
-        vc1_send_ref_fcm_items(parent, parser->ref_frame[VC1_REF_FRAME_T_MINUS_2].fcm, parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].fcm);
-        break;
-    }
-    case VC1_SKIPPED_FRAME:
-    {
-        wl->is_reference_frame |= WORKLOAD_SKIPPED_FRAME;
-        vc1_send_past_ref_items(parent);
-        vc1_send_ref_fcm_items(parent, parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].fcm, vc1_PictureFormatNone);
-        break;
-    }
-    case VC1_P_FRAME:
-    {
-        vc1_send_past_ref_items( parent);
-        vc1_send_ref_fcm_items(parent, parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].fcm, vc1_PictureFormatNone);
-        break;
-    }
-    default:
-        break;
-    }
-
-    /* reference / anchor frames from previous code
-     * we may need it for frame reduction */
-    if (parser->is_reference_picture)
-    {
-        wl->is_reference_frame |= WORKLOAD_REFERENCE_FRAME | (frame_id & WORKLOAD_REFERENCE_FRAME_BMASK);
-
-        parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].id      = frame_id;
-        parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].fcm     = parser->info.picLayerHeader.FCM;
-        parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].anchor[0]  = (parser->info.picLayerHeader.PTYPE == VC1_I_FRAME);
-        if (parser->info.picLayerHeader.FCM == VC1_FCM_FIELD_INTERLACE)
-        {
-            parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].anchor[1] = (parser->info.picLayerHeader.PTypeField2 == VC1_I_FRAME);
-        }
-        else
-        {
-            parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].anchor[1] = parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].anchor[0];
-        }
-
-        parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].type = parser->info.picLayerHeader.PTYPE;
-        parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].rr_en = md->RANGERED;
-        parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].rr_frm = parser->info.picLayerHeader.RANGEREDFRM;
-        parser->ref_frame[VC1_REF_FRAME_T_MINUS_0].tff = parser->info.picLayerHeader.TFF;
-
-        LOG_CRIT("anchor[0] = %d, anchor[1] = %d",
-                 parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].anchor[0],
-                 parser->ref_frame[VC1_REF_FRAME_T_MINUS_1].anchor[1] );
-    }
-
-    if ( parser->info.picLayerHeader.PTYPE == VC1_SKIPPED_FRAME )
-    {
-        translate_parser_info_to_frame_attributes( parent, parser );
-        return;
-    }
-
-    translate_parser_info_to_frame_attributes( parent, parser );
-
-
-    send_SEQ_ENTRY_registers(parent, parser);
-    send_SIZE_AND_AP_RANGEMAP_registers(parent, parser);
-    send_SLICE_FRAME_TYPE_INFO_registers(parent, parser);
-    send_SLICE_CONTROL_INFO_registers(parent, parser);
-    send_SLICE_OTHER_INFO_registers(parent, parser);
-    send_STRUCT_FIELD_AND_SMP_RANGEMAP_INFO_registers(parent, parser);
-    send_INT_COM_registers(parent, parser);
-
-    {
-        viddec_workload_item_t wi;
-        uint32_t bit, byte;
-        uint8_t is_emul = 0;
-
-        viddec_pm_get_au_pos(parent, &bit, &byte, &is_emul);
-
-        // Send current bit offset and current slice
-        wi.vwi_type          = VIDDEC_WORKLOAD_VC1_BITOFFSET;
-
-        // If slice data starts in the middle of the emulation prevention sequence -
-        // Special Case1----[is_emul = 1]:
-        // Eg: 00 00 03 01 - slice data starts at the second byte of 0s, we still feed the data
-        // to the decoder starting at the first byte of 0s so that the decoder can detect the
-        // emulation prevention. But the actual data starts are offset 8 in this bit sequence.
-
-        // Specail Case 2----[is_emul = 2]:
-        // If slice data starts in the middle of the emulation prevention sequence -
-        // Eg: [00 00] 03 00 - slice data starts at the third byte (0x03), we need readout this byte.
-        //
-
-        wi.vwi_payload[0]    = bit + (is_emul*8) ;
-        wi.vwi_payload[1]    = 0xdeaddead;
-        wi.vwi_payload[2]    = 0xdeaddead;
-        viddec_pm_append_workitem( parent, &wi, false );
-    }
-
-
-    viddec_pm_append_pixeldata( parent );
-
-    return;
-} // vc1_start_new_frame
-
-
-void vc1_parse_emit_second_field_start(void *parent, vc1_viddec_parser_t *parser)
-{
-
-    send_SLICE_FRAME_TYPE_INFO_registers(parent, parser);
-    send_SLICE_CONTROL_INFO_registers(parent, parser);
-    send_SLICE_OTHER_INFO_registers(parent, parser);
-    send_STRUCT_FIELD_AND_SMP_RANGEMAP_INFO_registers(parent, parser);
-    send_INT_COM_registers(parent, parser);
-
-    {
-        viddec_workload_item_t wi;
-        uint32_t bit, byte;
-        uint8_t is_emul = 0;
-
-        viddec_pm_get_au_pos(parent, &bit, &byte, &is_emul);
-
-
-        // Send current bit offset and current slice
-        wi.vwi_type          = VIDDEC_WORKLOAD_VC1_BITOFFSET;
-        // If slice data starts in the middle of the emulation prevention sequence -
-        // Special Case1----[is_emul = 1]:
-        // Eg: 00 00 03 01 - slice data starts at the second byte of 0s, we still feed the data
-        // to the decoder starting at the first byte of 0s so that the decoder can detect the
-        // emulation prevention. But the actual data starts are offset 8 in this bit sequence.
-
-        // Specail Case 2----[is_emul = 2]:
-        // If slice data starts in the middle of the emulation prevention sequence -
-        // Eg: [00 00] 03 00 - slice data starts at the third byte (0x03), we need readout this byte.
-        //
-
-
-        wi.vwi_payload[0]	 = bit + (is_emul*8);
-        wi.vwi_payload[1]	 = 0xdeaddead;
-        wi.vwi_payload[2]	 = 0xdeaddead;
-        viddec_pm_append_workitem( parent, &wi, false );
-    }
-
-    viddec_pm_append_pixeldata( parent );
-
-    return;
-
-}
-
-
-void vc1_parse_emit_current_slice(void *parent, vc1_viddec_parser_t *parser)
-{
-    send_SLICE_FRAME_TYPE_INFO_registers(parent, parser);
-    send_SLICE_CONTROL_INFO_registers(parent, parser);
-    send_SLICE_OTHER_INFO_registers(parent, parser);
-    //send_STRUCT_FIELD_AND_SMP_RANGEMAP_INFO_registers(parent, parser);
-    //send_INT_COM_registers(parent, parser);
-
-    {
-        viddec_workload_item_t wi;
-        uint32_t bit, byte;
-        uint8_t is_emul = 0;
-
-        viddec_pm_get_au_pos(parent, &bit, &byte, &is_emul);
-
-        // Send current bit offset and current slice
-        wi.vwi_type          = VIDDEC_WORKLOAD_VC1_BITOFFSET;
-
-        // If slice data starts in the middle of the emulation prevention sequence -
-        // Special Case1----[is_emul = 1]:
-        // Eg: 00 00 03 01 - slice data starts at the second byte of 0s, we still feed the data
-        // to the decoder starting at the first byte of 0s so that the decoder can detect the
-        // emulation prevention. But the actual data starts are offset 8 in this bit sequence.
-
-        // Specail Case 2----[is_emul = 2]:
-        // If slice data starts in the middle of the emulation prevention sequence -
-        // Eg: [00 00] 03 00 - slice data starts at the third byte (0x03), we need readout this byte.
-        //
-
-        wi.vwi_payload[0]    = bit + (is_emul*8);
-        wi.vwi_payload[1]    = 0xdeaddead;
-        wi.vwi_payload[2]    = 0xdeaddead;
-        viddec_pm_append_workitem( parent, &wi, false );
-    }
-
-    viddec_pm_append_pixeldata( parent );
-
-    return;
-}
-
-
-void vc1_end_frame(vc1_viddec_parser_t *parser)
-{
-    /* update status of reference frames */
-    if (parser->is_reference_picture)
-    {
-        parser->ref_frame[VC1_REF_FRAME_T_MINUS_2] = parser->ref_frame[VC1_REF_FRAME_T_MINUS_1];
-        parser->ref_frame[VC1_REF_FRAME_T_MINUS_1] = parser->ref_frame[VC1_REF_FRAME_T_MINUS_0];
-    }
-
-    return;
-} // vc1_end_frame
-
diff --git a/mixvbp/vbp_plugin/vp8/viddec_vp8_parse.c b/mixvbp/vbp_plugin/vp8/viddec_vp8_parse.c
index 03726c6..4eb5919 100755
--- a/mixvbp/vbp_plugin/vp8/viddec_vp8_parse.c
+++ b/mixvbp/vbp_plugin/vp8/viddec_vp8_parse.c
@@ -25,7 +25,6 @@
 
 #include "viddec_parser_ops.h"
 
-#include "viddec_fw_workload.h"
 #include "viddec_pm.h"
 
 #include <utils/Log.h>