AnsweredAssumed Answered

about H264_BPEncoder encode failed

Question asked by sinma on Mar 23, 2010
Latest reply on Mar 23, 2010 by CraigG

according to H264_BP_Encoder_Developer_Guide_Rel2.2.0.pdf,


1. Declare video_codec_objects of type vidcodec_t. A video codec object is declared for each instance of the encoder.
2. Allocate L3 memory for bitstream buffer and L3 state memory and temp memory usage of the encoder library. This should be done for every instance of the encoder.
3. Allocate L1 memory for bank A and bank B, required by the encoder library.
4. Initialize API members of video_codec_object, such as width, height, frame rate, bitrate … etc.
5. Call the function h264_encode_init (vidcodec_t *pvc, ADIMemMap *pMemMap, ubyte *bitstream, naltable_t *pnals) to initialize the encoder object. The application needs to pass the pointer to the video_codec_object structure, allocate memory blocks required by the encoder in ADIMemMap, bitstream buffer address and output nal list pointer.
6. Call the function h264_encode_init_me_subpel1(pvc) for enabling algorithm1, for sub pixel motion search.
7. The encoder is now ready to encode video frames. After an input video frame is grabbed and ready for encoding, call function h264_encode (vidcodec_t *pvc, ifrm_t *inframe, ubyte *bitstream,naltable_t *pnals) to encode. On successful encoding, encoder will return the inframe pointer to the caller, otherwise, return 0.
8. Use the output pnals->nallist to take compressed data out of the encoder.
9. When the encoder is no longer needed, call the function h264_encode_close (vidcodec_t *pvc) to release any system resource.


I use bf533 ,SDRAM 32MB ,

the function h264_encode_init() return return 0.

when  encoder call function h264_encode(),it always return0,encode failed

i dont know where is problem ,how to deal with it.