background image

 

 
 
 
 
 

H.264 1080p@30 BP Encoder on 
DM6467 
 

User’s Guide 

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Literature Number: SPRUGN8 

October 2009 

 
 
 
 
 
 
 
 
 
 
 

Summary of Contents for DM6467

Page 1: ...H 264 1080p 30 BP Encoder on DM6467 User s Guide Literature Number SPRUGN8 October 2009 ...

Page 2: ...ice TI is not responsible or liable for any such statements TI products are not authorized for use in safety critical applications such as life support where a failure of the TI product would reasonably be expected to cause severe personal injury or death unless officers of the parties have executed an agreement specifically governing such use Buyers represent that they have all necessary expertis...

Page 3: ...is document assumes that you are fluent in the C language have a good working knowledge of Digital Signal Processing DSP digital signal processors and DSP applications Good knowledge of eXpressDSP Algorithm Interface Standard XDAIS and eXpressDSP Digital Media XDM standard will be helpful How to Use This Manual This document includes the following chapters Chapter 1 Introduction provides a brief i...

Page 4: ...ely in a static system with limited memory The following documents describe TMS320 devices and related support tools TMS320c64x Megamodule literature number SPRAA68 describes the enhancements made to the internal memory and describes the new features which have been added to support the internal memory architecture s performance and protection TMS320C64x DSP Megamodule Reference Guide literature n...

Page 5: ... following abbreviations are used in this document Table 1 1 List of Abbreviations Abbreviation Description AVC Advanced Video Coding BP Base Profile CAVLC Context Adaptive Variable Length Coding CIF Common Intermediate Format COFF Common Object File Format DMA Direct Memory Access DMAN3 DMA Manager DSP Digital Signal Processing EVM Evaluation Module GOP Group Of Pictures HDVICP High Definition Im...

Page 6: ...d macro names parameters and command line commands are shown in a mono spaced font Product Support When contacting TI for support on this codec quote the product name H 264 1080p 30 Baseline Profile Encoder on DM6467 and version number The version number of the codec is included in the Title of the Release Notes that accompanies this codec Trademarks Code Composer Studio the DAVINCI Logo DAVINCI D...

Page 7: ...ftware 2 2 2 2 Installing the Component 2 2 2 3 Before Building the Sample Test Application 2 5 2 3 1 Installing DSP BIOS 2 5 2 3 2 Installing Codec Engine CE 2 5 2 3 3 Installing HDVICP API 2 6 2 4 Building and Running the Sample Test Application 2 6 2 5 Configuration Files 2 7 2 6 Uninstalling the Component 2 8 2 7 Evaluation Version 2 8 Sample Usage 3 1 3 1 Overview of the Test Application 3 2 ...

Page 8: ...oder Data Structures 4 22 4 3 Interface Functions 4 30 4 3 1 Creation APIs 4 30 4 3 2 Initialization API 4 32 4 3 3 Control API 4 34 4 3 4 Data Processing API 4 36 4 3 5 Termination API 4 39 Frequently Asked Questions 5 1 ...

Page 9: ...g of H 264 Video Encoder 1 4 Figure 2 1 Component Directory Structure 2 3 Figure 3 1 Test Application Sample Implementation 3 2 Figure 3 2 Process Call with Host Release 3 5 Figure 3 3 Interaction between Application and Codec 3 7 ...

Page 10: ...x This page is intentionally left blank ...

Page 11: ... Abbreviations v Table 2 1 Component Directories 2 3 Table 3 1 Process Implementation 3 9 Table 4 1 List of Enumerated Data Types 4 2 Table 4 2 H264 Encoder Specific Enumerations 4 7 Table 5 3 FAQs for H264 Encoder on DM6467 5 1 ...

Page 12: ...xii This page is intentionally left blank ...

Page 13: ...and XDM It also provides an overview of TI s implementation of the H 264 1080p 30 Baseline Profile on the DM6467 platform and its supported features Topic Page 1 1 Overview of XDAIS and XDM 1 2 1 2 Overview of H 264 Base Profile Encoder 1 3 1 3 Supported Services and Features 1 5 ...

Page 14: ...lient application The algFree API allows the algorithm to communicate the memory to be freed when an instance is no longer required Once an algorithm instance object is created it can be used to process data in real time The algActivate API provides a notification to the algorithm instance that one or more algorithm processing methods is about to be run zero or more times in succession After the p...

Page 15: ...tes the client application from component level changes Since TI s multimedia algorithms are XDM compliant it provides you with the flexibility to use any TI algorithm without changing the client application code For example if you have developed a client application using an XDM compliant MPEG4 video decoder then you can easily replace MPEG4 with another XDM compliant video decoder say H 263 with...

Page 16: ...ss the 4x4 block boundaries It is the second most computational task of H 264 encoding process after motion estimation In loop filtering is applied on all 4x4 edges as a post process and the operations depend on the edge strength of the particular edge The H 264 Encoder applies entropy coding methods to use context based adaptivity which improves the coding performance All the macro blocks which b...

Page 17: ...components interleaved to form the second plane formats Supports H 264 Baseline Profile for progressive I and P frames only Supports multiple slices per frame conforming to H 241 requirement of fixed bytes per slice Supports only one motion vector per macro block Supports rate control at row and frame level Supports DMA based framework Uses C64x HDVICP 0 and HDVICP 1 sub systems The 720p quality o...

Page 18: ...Introduction 1 6 This page is intentionally left blank ...

Page 19: ...ent It also provides information on building and running the sample test application Topic Page 2 1 System Requirements 2 2 2 2 Installing the Component 2 2 2 3 Before Building the Sample Test Application 2 5 2 4 Building and Running the Sample Test Application 2 6 2 5 Configuration Files 2 7 2 6 Uninstalling the Component 2 8 2 7 Evaluation Version 2 8 ...

Page 20: ... Code Generation Tools This project is compiled assembled archived and linked using the code generation tools version 6 0 8 2 2 Installing the Component The codec component is released as a compressed archive To install the codec extract the contents of the zip file onto your local hard disk The zip file extraction creates a top level directory called 200_V_H264AVC_E_1_10 under which another direc...

Page 21: ...e Note If you are installing an evaluation version of this codec the directory name will be 200E_V_H264AVC_E_1_10 Table 2 1 provides a description of the sub directories created in the DM6467_BP_001 directory Table 2 1 Component Directories Sub Directory Description ...

Page 22: ...oder Arm968 src asm Contains the ARM968 source assembly files H264Encoder Arm968 src c Contains the ARM968 source C files H264Encoder Client Build Contains the sample test application project pjt file H264Encoder Client Test Inc Contains header files needed for the application code H264Encoder Client Test Src Contains application C files H264Encoder Client Test TestVecs Config Contains configurati...

Page 23: ...ctory CCStudio_v3 3 bios_directory packages ti bios include directory Library file biosDM420 a64P available in the install directory CCStudio_v3 3 bios_directory packages ti bios lib directory Set a system environment variable named BIOS_INSTALL_DIR pointing to install directory CCStudio_v3 3 bios_directory 2 3 2 Installing Codec Engine CE Download CE version CE 2 10 01 or newer from TI external w...

Page 24: ...omponent will run in TI s Code Composer Studio development environment To build and run the sample test application in Code Composer Studio follow these steps 1 Extract the zip file from the package 2 Verify that you have installed TI s Code Composer Studio version 3 3 49 and code generation tools version 6 0 8 Start the Code Composer Studio to view the Parallel Debug Manager PDM window 3 In the P...

Page 25: ...088 yuv EncodedFile Test TestVecs Output airshow 264 ReconFile Test TestVecs Reference airshow_recon yuv ImageWidth 1920 Image width in Pels ImageHeight 1088 Image height in Pels ImagePitch 1920 Input Image pitch in Pels FrameRate 30000 Frame Rate per second 1000 1 100 BitRate 10000000 Bitrate bps if ZERO RC is OFF ChromaFormat 1 1 XMI_YUV_420P only supported IntraPeriod 30 Period of I Frames Fram...

Page 26: ... field Transform8x8DisableFlag 1 0 Enabled 1 Disabled Intra8x8EnableFlag 0 0 NONE 1 I Frame 2 P 3 IP Intra4x4EnableFlag 3 0 NONE 1 I Frame 2 P 3 IP ChromaConversionMode 1 0 line drop 1 Average Loop filter parameters LoopFilterDisable 0 Disable loop filter in slice header 0 Filter 1 No Filter 2 Disable filter across slice boundary LoopFilterAlphaC0Offset 0 Alpha C0 offset div 2 6 5 0 1 6 LoopFilter...

Page 27: ...r provides a detailed description of the sample test application that accompanies this codec component Topic Page 3 1 Overview of the Test Application 3 2 3 2 Handshaking Between Application and Algorithm 3 7 3 3 Sample Test Application 3 9 ...

Page 28: ... the H264 Encoder library The main test application files are TestEncoderApp c and TestEncoderApp h These files are available in the Client Test Src and Client Test Inc sub directories respectively Figure 3 1 depicts the sequence of APIs exercised in the sample test application Figure 3 1 Test Application Sample Implementation ...

Page 29: ...t buffer After successful completion of the above steps the test application does the algorithm instance creation and initialization 3 1 2 Algorithm Instance Creation and Initialization In this logical block the test application accepts the various initialization parameters and returns an algorithm instance pointer The following APIs are called in a sequence 1 algNumAlloc To query the algorithm ab...

Page 30: ...ss function call The input and output buffer descriptors are obtained by calling the control function with the XDM_GETBUFINFO command 3 Calls the process function to encode a single frame of data The behavior of the algorithm can be controlled using various dynamic parameters see Section 4 2 1 11 The inputs to the process function are input and output buffer descriptors pointer to the IVIDENC1_InA...

Page 31: ...ivate To activate the algorithm instance 2 control optional To query the algorithm on status or setting of dynamic parameters etc using the seven available control commands 3 process To call the Encoder with appropriate input output buffer and arguments information 4 control optional To query the algorithm on status or setting of dynamic parameters etc using the seven available control commands 5 ...

Page 32: ...it used 2 algFree To query the algorithm to get the memory record information A sample implementation of the delete function that calls algNumAlloc and algFree in a sequence is provided in the ALG_delete function implemented in the alg_create c file After successful execution of the algorithm the test application frees up the DMA and HDVICP Resource allocated for the algorithm This is implemented ...

Page 33: ...ong multiple threads ISR ownership is with the Host layer resource manager outside the codec process Codec int _doneSemaphore HDVICP_start handle hdVicpHandle ISRFunction installNonBiosISR handle hdvicpHandle ISRFunction HDVICP_wait handle hdVicpHandle SEM_pend _doneSemaphore HDVICP_done handle hdVicpHandle SEM_post _doneSemaphore include ires_hdvicp h void _MyCodecISRFunction MYCODEC IVIDENC1 pro...

Page 34: ...plemented by applications 1 HDVICP_initHandle void hdvicpHandle unction which initializes hdvicp handle that will be use HDVICP_Wait and HDVICP_Done functions are called by algorithm 2 HDVICP_configure IALG_Handle handl handle the algorith call when it receives interrupts pertaining to the video task 3 HDVICP_wait void hdvicpHan d by the algorithm to put the video task in SEM 4 HDVICP_done void hd...

Page 35: ...a given stream do Read the Input Frame in the Application Input Buffer validBytes ReadInputData inFile Optional Set Run time parameters in the Algorithm via control h264VENC_control handle XDM_SETPARAMS Start the process to start encoding a frame retVal h264VENC_encode handle IVIDEO1_BufDescIn inputBufDesc XDM_BufDesc outputBufDesc IVIDENC1_InArgs inArgs IVIDENC1_OutArgs outArgs Get the status of ...

Page 36: ...Sample Usage 3 10 This page is intentionally left blank ...

Page 37: ... chapter provides a detailed description of the data structures and interfaces functions used in the codec component Topic Page 4 1 Symbolic Constants and Enumerated Data Types 4 2 4 2 Data Structures 4 9 4 3 Interface Functions 4 30 ...

Page 38: ... IVIDEO_II_FRAME Interlaced frame both fields are I frames Not supported in this version of H264 Encoder IVIDEO_IP_FRAME Interlaced frame first field is an I frame second field is a P frame Not supported in this version of H264 Encoder IVIDEO_IB_FRAME Interlaced frame first field is an I frame second field is a B frame Not supported in this version of H264 Encoder IVIDEO_PI_FRAME Interlaced frame ...

Page 39: ...MBAFF frame that can be used for refreshing video content Not supported in this version of H264 Encoder IVIDEO_FRAMETYPE_DEFAU LT Default is set to IVIDEO_I_FRAME IVIDEO_CONTENTTYPE_NA Content type is not applicable IVIDEO_PROGRESSIVE Progressive video content IVIDEO_PROGRESSIVE_FRA ME Progressive video content IVIDEO_INTERLACED Interlaced video content Not supported in this version of H264 Encode...

Page 40: ...er IVIDEO_RATECONTROLPRES ET_DEFAULT Default value is set to IVIDEO_LOW_DELAY Not supported in this version of H264 Encoder IVIDEO_FRAME_ENCODED Input content encoded IVIDEO_FRAME_SKIPPED Input content skipped that is not encoded IVIDEO_SkipMode IVIDEO_SKIPMODE_DEFAUL T Default value is set to IVIDEO_FRAME_ENCODED XDM_BYTE Big endian stream default value Not supported in this version of H264 Encod...

Page 41: ...XDM_YUV_444P YUV 4 4 4 planar Not supported in this version of H264 Encoder XDM_YUV_411P YUV 4 1 1 planar Not supported in this version of H264 Encoder XDM_GRAY Gray format Not supported in this version of H264 Encoder XDM_RGB RGB color format Not supported in this version of H264 Encoder XDM_ChromaFormat XDM_CHROMAFORMAT_DEFAU LT Default value is set to XDM_YUV_422ILE XDM_GETSTATUS Query algorith...

Page 42: ...Y Set algorithm specific creation time parameters for high quality default setting Not supported in this version of H264 Encoder XDM_HIGH_SPEED Set algorithm specific creation time parameters for high speed Not supported in this version of H264 Encoder XDM_EncodingPreset XDM_USER_DEFINED User defined configuration using advanced parameters Not supported in this version of H264 Encoder XDM_ENCODE_A...

Page 43: ... the out put buffer allocated by the application 0 Ignore Bit 1 1 The encoding of an MB pair exceeds the sliceUnitSize set by the application 0 Ignore The algorithm can set multiple bits to 1 depending on the error condition Table 4 2 H264 Encoder Specific Enumerations Group or Enumeration Class Symbolic Constant Name Description or Evaluation METADATA_NALU_INFO Meta data containing the informatio...

Page 44: ...ODE_OFFSET 3 Slices are controlled based on user defined offset in unit of rows Not supported in this version of H264 Encoder IH264_SLICEMODE_DEFAUL T Default slice coding mode single slice Not supported in this version of H264 Encoder IH264FHDVENC_SliceMode IH264_SLICEMODE_MAX Reserved for future use IH264_BYTE_STREAM 0 bit stream contains the start code identifier IH264_NALU_STREAM 1 bit stream ...

Page 45: ...ementation specific parameters for a codec component 4 2 1 Common XDM Data Structures This section includes the following common XDM data structures XDM_BufDesc XDM1_BufDesc XDM_SingleBufDesc XDM1_SingleBufDesc XDM_AlgBufInfo IVIDEO_BufDesc IVIDEO1_BufDesc IVIDEO1_BufDescIn IVIDENC1_Fxns IVIDENC1_Params IVIDENC1_DynamicParams IVIDENC1_InArgs IVIDENC1_Status IVIDENC1_OutArgs IVIDENC1_MbData ...

Page 46: ...es 4 2 1 2 XDM1_BufDesc Description This structure defines the buffer descriptor for input and output buffers Fields Field Datatype Input Output Description numBufs XDAS_Int32 Input Number of buffers descs XDM_MA X_IO_BUFFERS XDM1_SingleBufDesc Input Array of buffer descriptors 4 2 1 3 XDM_SingleBufDesc Description This structure defines the buffer descriptor for single input and output buffers Fi...

Page 47: ...ructure defines the buffer information descriptor for input and output buffers This structure is filled when you invoke the control function with the XDM_GETBUFINFO command Fields Field Datatype Input Output Description minNumInBufs XDAS_Int32 Output Number of input buffers minNumOutBufs XDAS_Int32 Output Number of output buffers minInBufSize XDM_ MAX_IO_BUFFERS XDAS_Int32 Output Size in bytes req...

Page 48: ...s Field Datatype Input Output Description numBufs XDAS_Int32 Input Number of buffers width XDAS_Int32 Input Padded width of the video data bufs XDM_MAX_IO_BUFFERS XDAS_Int8 Input Pointer to the vector containing buffer addresses bufSizes XDM_MAX_IO_BUFFERS XDAS_Int32 Input Size of each buffer in bytes 4 2 1 7 IVIDEO1_BufDesc Description This structure defines the buffer descriptor for input and ou...

Page 49: ...mber of times the display process needs to repeat the displayed progressive frame Not supported in this version of H264 Encoder contentType XDAS_Int32 Input Content type of the buffer chromaFormat XDAS_Int32 Input See XDM_ChromaFormat enumeration 4 2 1 8 IVIDEO1_BufDescIn Description This structure defines the buffer descriptor for input buffers Fields Field Datatype Input Output Description numBu...

Page 50: ... Description This structure defines the creation parameters for an algorithm instance object Set this data structure to NULL if you are not sure of the values to be specified for these parameters Fields Field Datatype Input Output Description size XDAS_Int32 Input Size of the basic or extended if being used data structure in bytes encodingPreset XDAS_Int32 Input Encoding preset See XDM_EncodingPre...

Page 51: ...nness XDAS_Int32 Input Endianness of input data See XDM_DataFormat enumeration for details Default XDM_LE_32 Only the default value XDM_LE_32 is supported maxInterFrameInterval XDAS_Int32 Input Distance from I frame to P frame 1 If no B frames 2 To insert one B frame Not supported in this version of H264 Encoder Default 0 inputChromaFormat XDAS_Int32 Input Input chroma format See XDM_ChromaFormat ...

Page 52: ...inMbs value for level 4 0 as per Table A 1 Level limits is 8192 Compute the expression as maxFrameSizeinMbs 1920 1088 256 The value of maxFrameSizeinMbs is 8160 and hence the condition is true Therefore the above values of maxHeight and maxWidth are supported for level 4 0 Use the following expression to check the supported maxFrameRate values for each level maxFrameRate maxMbsPerSecond FrameSizei...

Page 53: ...ault 30000 targetFrameRate XDAS_Int32 Input Target frame rate in fps 1000 For example if the frame rate is 30 set this field to 30000 Default 30000 targetBitRate XDAS_Int32 Input Target bit rate in bits per second For example if the bit rate is 2 Mbps set this field to 2097152 Default 1000000 intraFrameInterval XDAS_Int32 Input Interval between two consecutive intra frames 0 Only the first frame i...

Page 54: ...ate control used in H 264 Encoder can work for a target bit rate of a minimum of 32 kbps and a maximum of 10 mbps up to level 3 However the recommended range varies with the format For example for NTSC D1 the recommended range is 1 5 mbps to 6 0 mbps The bit rate achieved by the encoder may deviate largely from the value specified by the targetBitRate field of the IVIDENC1_DynamicParams data struc...

Page 55: ...ication should allocate the buffer for 1920x1088 resolution Then the encoder rounds off the height to 1088 and sets the cropping flags in the bitstream to crop 8 lines at the bottom of the image 4 2 1 12 IVIDENC1_InArgs Description This structure defines the run time input arguments for an algorithm instance object Fields Field Datatype Input Output Description size XDAS_Int32 Input Size of the ba...

Page 56: ...nt32 Output Extended error code See XDM_ErrorBit enumeration for details bytesGenerated XDAS_Int32 Output The number of bytes generated encodedFrameType XDAS_Int32 Output Frame types for video See IVIDEO_FrameType enumeration for details inputFrameSkip XDAS_Int32 Output Frame skipping modes for video See IVIDEO_SkipMode enumeration for details outputID XDAS_Int32 Output Output ID corresponding wit...

Page 57: ... 0x02 for P Frame macro block 0x03 for B Frame macro block 0x04 for I Field macro block 0x05 for P Field macro block 0x06 for B Field macro block 0xFF for mbMode not specified QP XDAS_Int32 Output QP estimate Value of 0xFF for QP is not specified mvFwdXY XDAS_Int32 Output Forward motion vector estimate If MVx XDAS_Int16 and MVy XDAS_Int16 are the motion vectors in the x and y directions in quarter...

Page 58: ...nce object The creation parameters are defined in the XDM data structure IVIDENC1_Params Fields Field Datatype Input Output Description videncParams IVIDENC1_Params Input See IVIDENC1_Params data structure for details profileIdc XDAS_Int32 Input Profile identification for the Encoder Default 66 BASELINE_PROFILE levelIdc XDAS_Int32 Input Level identification for the Encoder Default 40 EntropyCoding...

Page 59: ...HDVENC_SliceCodin gParams data structure for details outBufSize XDAS_Int32 Input Size of the output buffer for the encoded bit stream Default size of the frame to be encoded in bytes QPISlice XDAS_UInt8 Input Initial Quantization Parameter QP of I frames The valid range is 0 51 Default 28 QPSlice XDAS_UInt8 Input Initial Quantization Parameter QP of P frames The valid range is 0 51 Default 28 rate...

Page 60: ...fault 0 LFBetaOffset XDAS_Int8 Input This is the beta offset for the H 264 loop filter value divided by 2 The valid range 6 6 Default 0 chromaQPOffset XDAS_Int8 Input The chroma QP offset for determining the QP of the chrominance blocks based on the QP of the luminance blocks Valid range is 12 12 Default 0 secChromaQPOffset XDAS_Int8 Input The Second Chroma QP Offset for determining the QP of the ...

Page 61: ...or future use This should always be set to NULL 0 Not supported in this version of H264 Encoder skipStartCodesInCall back XDAS_UInt8 Input Reserved for future use This should always be set to 1 Not supported in this version of H264 Encoder intra4x4EnableFlag XDAS_UInt8 Input 0 Disable 4x4 modes 1 Enable 4x4 intra modes in I picture 2 Enable 4x4 intra modes in P picture 3 Enable 4x4 intra modes in ...

Page 62: ...8 Input 0 Disable 4x4 modes 1 Enable 4x4 intra modes in I picture 2 Enable 4x4 intra modes in P picture 3 Enable 4x4 intra modes in both I and P Pictures Default Disable 8x8 modes Not supported in this version of H264 Encoder interlaceReferenceMo de XDAS_UInt8 Input Reference filed selection in high profile 0 One field default 1 Predictions from the same parity field 2 Most recently coded referenc...

Page 63: ...oded with QPSlice value as the QP 4 2 2 3 IH264FHDVENC_InArgs Description This structure defines the run time input arguments for H 264 Encoder instance object Fields Field Datatype Input Output Description videncInArgs IVIDENC1_InArgs Input See IVIDENC1_InArgs data structure for details 4 2 2 4 IH264FHDVENC_Status Description This structure defines parameters that describe the status of the H 264...

Page 64: ...64FHDVENC_SliceMode enum in Table 4 2 for more details sliceUnitSize XDAS_Int32 Input This parameter depends on slice mode If sliceMode IH264_SLICEMODE_MBUNIT then this parameter informs the number of macro blocks in one slice If sliceMode IH264_SLICEMODE_BYTES then this parameter informs the number of bytes in one slice If sliceMode IH264_SLICEMODE_OFFSET then this parameter informs the number of...

Page 65: ...ffer containing the meta data information numPayLoadUni ts XDAS_Int32 Output Number of payload units existing in the meta data payLoadUnitSi ze XDAS_Int32 Output Size of each payload unit 4 2 2 7 IH264FHDVENC_OutArgs Description This structure defines the run time output arguments for the H 264 Encoder instance object Fields Field Datatype Input Output Description videncOutArgs IVIDENC1_OutArg s O...

Page 66: ...owing sequence 1 algNumAlloc 2 algAlloc 3 algInit 4 algActivate 5 process 6 algDeactivate 7 algFree control can be called any time after calling the algInit API algNumAlloc algAlloc algInit algActivate algDeactivate and algFree are standard XDAIS APIs This document includes only a brief description for the standard XDAIS APIs For more details see TMS320 DSP Algorithm Standard API Reference literat...

Page 67: ...lloc returns the number of buffers that the algAlloc method requires This operation allows you to allocate sufficient space to call the algAlloc method algNumAlloc may be called at any time and can be called repeatedly without any side effects It always returns the same result The algNumAlloc API is optional For more details see TMS320 DSP Algorithm Standard API Reference literature number SPRU360...

Page 68: ...s This pointer may be NULL however in this case algAlloc must assume default creation parameters and must not fail The second argument to algAlloc is an output parameter algAlloc may return a pointer to its parent s IALG functions If an algorithm does not require a parent object to be created this pointer must be set to NULL The third argument is a pointer to a memory space of size nbufs sizeof IA...

Page 69: ...ct is ready to be used to process data The first argument to algInit is a handle to an algorithm instance This value is initialized to the base field of memTab 0 The second argument is a table of memory records that describe the base address size alignment type and memory space of all buffers allocated for an algorithm instance The number of initialized records is identical to the number returned ...

Page 70: ... status algorithm instance status parameters Return Value IALG_EOK status indicating success IALG_EFAIL status indicating failure Description This function changes the run time parameters of an algorithm instance and queries the algorithm status control must only be called after a successful call to algInit and must never be called after a call to algFree The first argument to control is a handle ...

Page 71: ...dle for the algorithm instance object Postconditions The following conditions are true immediately after returning from this function If the control operation is successful the return value from this operation is equal to IALG_EOK otherwise it is equal to either IALG_EFAIL or an algorithm specific return value If the control command is not recognized the return value from this operation is not equ...

Page 72: ... Void Description algActivate initializes any of the instance scratch buffers using the persistent memory that is part of the algorithm instance object The first and only argument to algActivate is an algorithm instance handle This handle is used by the algorithm to identify various buffers that must be initialized prior to calling any of the algorithm processing methods For more details see TMS32...

Page 73: ... to process is a handle to an algorithm instance The second argument is a pointer to the input buffer descriptor data structure see IVIDEO1_BufDescIn data structure for details The third argument is a pointer to the output buffer descriptor data structure see XDM_BufDesc data structure for details The fourth argument is a pointer to the IVIDENC1_InArgs data structure that defines the run time inpu...

Page 74: ...turn value from this operation is equal to IALG_EOK otherwise it is equal to either IALG_EFAIL or an algorithm specific return value After successful return from process function algDeactivate can be called Example See test application file TestAppEncoder c available in the Client Test Src sub directory See Also algInit algDeactivate control Note A video encoder or decoder cannot be pre empted by ...

Page 75: ...tent memory that is part of the algorithm instance object The first and only argument to algDeactivate is an algorithm instance handle This handle is used by the algorithm to identify various buffers that must be saved prior to next cycle of algActivate and processing For more details see TMS320 DSP Algorithm Standard API Reference literature number SPRU360 See Also algActivate 4 3 5 Termination A...

Page 76: ...ription algFree determines the addresses of all memory buffers used by the algorithm The primary aim of doing so is to free up these memory regions after closing an instance of the algorithm The first argument to algFree is a handle to the algorithm instance The second argument is a table of memory records that describe the base address size alignment type and memory space of all buffers previousl...

Page 77: ...L size To enable this the profileIdc parameter should be set to 66 Baseline Profile and following dynamic input parameters needs to set sliceMode 2 Slice based on packet size sliceUnitSize 1500 size of the NAL unit numRowsInSlice 0 How to disable slice based encoding To disable slice based encoding configure the sliceMode dynamic input parameter as 0 no slice How to enable disable loop filtering i...

Page 78: ...supported is 352 x 288 In case the width is not a multiple of 32 the encoder rounds the width to the next multiple of 32 and sets the cropping flags appropriately to not display the padded pixels Similarly in case the height is not a multiple of 16 then the encoder rounds the height to the next multiple of 16 and sets the cropping flags to not display the padded lines ...

Reviews: