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.video2split.IVIDDEC2BACK ========
    40     *  Video decode split algorithm (BACK) configuration interface for xDM
    41     *  IVIDDEC2BACK interface.
    42     *
    43     *  All split video decoder codecs which implement IVIDDEC2BACK must
    44     *  implement this meta-only configuration interface.
    45     */
    46    metaonly interface IVIDDEC2BACK inherits ti.sdo.ce.ICodec
    47    {
    48        override config String serverFxns = "VIDDEC2BACK_SKEL";
    49        override config String stubFxns = "VIDDEC2BACK_STUBS";
    50    
    51        override readonly config Int rpcProtocolVersion = 0;
    52        override readonly config Bool codecClassConfigurable = true;
    53    
    54        const Int XDM_MAX_CONTEXT_BUFFERS = 32;
    55    
    56        /*!
    57         *  ======== manageInBufsCache =======
    58         *  Codec Class configuration param
    59         *
    60         *  Determines whether cache will be managed on the DSP for each of the
    61         *  (up to 16) input buffers given to the codec's "process()" call.
    62         *
    63         *  If this flag is set to "false" for one or more
    64         *  elements, the cache for the corresponding input buffer will not be
    65         *  invalidated before the process() call. Skipping unnecessary cache
    66         *  invalidation improves performance, especially if a buffer is large.
    67         *
    68         *  (If element "i" in this array is set to true, cache for inBufs[i] will
    69         *  be invalidated only if the buffer is supplied, of course.)
    70         *
    71         *  For example, if you know that a particular codec of this class always
    72         *  reads the data from its inBufs[1] buffer only via DMA, you can set
    73         *  manageInBufsCache[1] = false;
    74         */
    75        config Bool manageInBufsCache[ XDM_MAX_CONTEXT_BUFFERS ] = [
    76            true, true, true, true, true, true, true, true,
    77            true, true, true, true, true, true, true, true,
    78            true, true, true, true, true, true, true, true,
    79            true, true, true, true, true, true, true, true,
    80        ];
    81    
    82        /*!
    83         *  ======== manageOutBufsCache =======
    84         *  Codec Class configuration param
    85         *
    86         *  Determines whether cache will be managed on the DSP for each of the
    87         *  (up to 16) output buffers given to the codec's "process()" call.
    88         *
    89         *  If this flag is set to "false" for one or more
    90         *  elements, the cache for the corresponding output buffer will not be
    91         *  invalidated before the process() call.
    92         *  Skipping unnecessary cache invalidation improves
    93         *  performance. Whether the buffer will be written back after the process()
    94         *  call depends on the algorithm and cannot be controlled here.
    95         *
    96         *  For example, if you know that a particular codec of this class always
    97         *  writes the data to its outBufs[2] buffer only via DMA, you can set
    98         *  manageOutBufsCache[2] = false;
    99         */
   100        config Bool manageOutBufsCache[ XDM_MAX_CONTEXT_BUFFERS ] = [
   101            true, true, true, true, true, true, true, true,
   102            true, true, true, true, true, true, true, true,
   103            true, true, true, true, true, true, true, true,
   104            true, true, true, true, true, true, true, true,
   105        ];
   106    
   107        /*!
   108         *  ======== manageIntermediateBufsCache =======
   109         *  Codec Class configuration param
   110         *
   111         *  Determines whether cache will be managed on the DSP for each of the
   112         *  (up to 16) output buffers given to the codec's "process()" call.
   113         *
   114         *  If this flag is set to "false" for one or more
   115         *  elements, the cache for the corresponding intermediate buffer won't be
   116         *  invalidated before the process() call.
   117         *  Skipping unnecessary cache invalidation improves
   118         *  performance. Whether the buffer will be written back after the process()
   119         *  call depends on the algorithm and cannot be controlled here.
   120         */
   121        config Bool manageIntermediateBufsCache[ XDM_MAX_CONTEXT_BUFFERS ] = [
   122            true, true, true, true, true, true, true, true,
   123            true, true, true, true, true, true, true, true,
   124            true, true, true, true, true, true, true, true,
   125            true, true, true, true, true, true, true, true,
   126        ];
   127    }
   128    /*
   129     *  @(#) ti.sdo.ce.video2.split; 1, 0, 0,3; 6-13-2013 00:20:51; /db/atree/library/trees/ce/ce-w08/src/ xlibrary
   130    
   131     */
   132