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