1    /* 
     2     * Copyright (c) 2012, Texas Instruments Incorporated
     3     * All rights reserved.
     4     *
     5     * Redistribution and use in source and binary forms, with or without
     6     * modification, are permitted provided that the following conditions
     7     * are met:
     8     *
     9     * *  Redistributions of source code must retain the above copyright
    10     *    notice, this list of conditions and the following disclaimer.
    11     *
    12     * *  Redistributions in binary form must reproduce the above copyright
    13     *    notice, this list of conditions and the following disclaimer in the
    14     *    documentation and/or other materials provided with the distribution.
    15     *
    16     * *  Neither the name of Texas Instruments Incorporated nor the names of
    17     *    its contributors may be used to endorse or promote products derived
    18     *    from this software without specific prior written permission.
    19     *
    20     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    21     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    22     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    23     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    24     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    25     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    26     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
    27     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    28     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
    29     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
    30     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    31     * 
    32     */
    33    /*!
    34     *  ======== ti.sdo.ce.video2.IVIDENC2 ========
    35     *  IVIDENC2-compliant video encoder interface
    36     *
    37     *  All IVIDENC2-compliant video encoder modules must implement this
    38     *  interface.
    39     */
    40    metaonly interface IVIDENC2 inherits ti.sdo.ce.ICodec
    41    {
    42        override config String serverFxns = "VIDENC2_SKEL";
    43        override config String stubFxns = "VIDENC2_STUBS";
    44    
    45        override readonly config Int rpcProtocolVersion = 0;
    46    
    47        override readonly config Bool codecClassConfigurable = true;
    48    
    49        /*!
    50         *  ======== manageInBufsPlaneDescCache =======
    51         *  Codec Class configuration param
    52         *
    53         *  Determines whether cache will be managed on the DSP for each of the
    54         *  3 planeDesc[] input buffers given to the codec's "process()" call.
    55         *
    56         *  If this flag is set to "false" for one or more
    57         *  elements, the cache for the corresponding input buffer will not be
    58         *  invalidated before the process() call. Skipping unnecessary cache
    59         *  invalidation improves performance, especially if a buffer is large.
    60         *
    61         *  (If element "i" in this array is set to true, cache for
    62         *  inBufs->planeDesc[i] will be invalidated only if the buffer is
    63         *  supplied, of course.)
    64         *
    65         *  For example, if you know that a particular codec of this class always
    66         *  reads the data from its inBufs->planeDesc[1] buffer only via DMA, you
    67         *  can set manageInBufsPlaneDescCache[1] = false;
    68         */
    69        config Bool manageInBufsPlaneDescCache[3] = [ true, true, true ];
    70    
    71        /*!
    72         *  ======== manageInBufsMetaPlaneDescCache =======
    73         *  Codec Class configuration param
    74         *
    75         *  Determines whether cache will be managed on the DSP for each of the
    76         *  3 metadataPlaneDesc[] input buffers given to the codec's process()
    77         *  call.
    78         *
    79         *  If this flag is set to "false" for one or more
    80         *  elements, the cache for the corresponding input buffer will not be
    81         *  invalidated before the process() call. Skipping unnecessary cache
    82         *  invalidation improves performance, especially if a buffer is large.
    83         *
    84         *  (If element "i" in this array is set to true, cache for
    85         *  inBufs->metadataPlaneDesc[i] will be invalidated only if the buffer is
    86         *  supplied, of course.)
    87         *
    88         *  For example, if you know that a particular codec of this class always
    89         *  reads the data from its inBufs->metadataPlaneDesc[1] buffer only via
    90         *  DMA, you can set manageInBufsMetaPlaneDescCache[1] = false;
    91         */
    92        config Bool manageInBufsMetaPlaneDescCache[3] = [ true, true, true ];
    93    
    94        /*!
    95         *  ======== manageOutBufsCache =======
    96         *  Codec Class configuration param
    97         *
    98         *  Determines whether cache will be managed on the DSP for each of the
    99         *  (up to 16) output buffers given to the codec's "process()" call.
   100         *
   101         *  If this flag is set to "false" for one or more
   102         *  elements, the cache for the corresponding output buffer will not be
   103         *  invalidated before the process() call.
   104         *  Skipping unnecessary cache invalidation improves
   105         *  performance. Whether the buffer will be written back after the process()
   106         *  call depends on the algorithm and cannot be controlled here.
   107         *
   108         *  For example, if you know that a particular codec of this class always
   109         *  writes the data to its outBufs->desc[2] buffer only via DMA, you can
   110         *  set manageOutBufsCache[2] = false;
   111         */
   112        config Bool manageOutBufsCache[ 16 ] = [
   113            true, true, true, true, true, true, true, true,
   114            true, true, true, true, true, true, true, true,
   115        ];
   116    }
   117    /*
   118     *  @(#) ti.sdo.ce.video2; 1, 0, 3,1; 2-24-2012 19:31:57; /db/atree/library/trees/ce/ce-t06/src/ xlibrary
   119    
   120     */
   121