Transplant facial recognition to davince codec engine record

Source: Internet
Author: User
Tags define null

1) Develop an embedded video processing system based on the ti6000 series DSP;

2) transplantation and optimization of image and video processing algorithms on DSP; job requirements:

3) Experience in porting and developing DSP for image and video processing algorithms;
4) have certain experience in DSP algorithm optimization, be familiar with C language optimization and assembly-level optimization on DSP, be familiar with the DaVinci system architecture of ti dsp, and have excellent experience in DaVinci development; understand how to port codec engine algorithms;
5) proficient in compiling tools in the CCS and Linux environments, proficient in C Programming, understanding of fixed-point algorithms, and familiar with Assembly optimization and logic optimization of programs;
6) Understand image processing and pattern recognition, and have experience in algorithm transplantation;

/*************************************** **************************************** *********\

* Common declarations *
\*************************************** **************************************** *********/

/*********************************** Alloca ** **************************************/

# Ifndef alloca/* else probably defined as _ builtin_alloca */

# Ifdef _ stdc __

# Include <stdlib. h>

Typedef void * pointer;/* generic pointer type (STD c )*/

# Else /*! Defined (_ stdc _) * // * assume pre-ANSI; no prototypes */

Extern void abort (/* void */);
Extern void free (/* pointer */);
Extern pointer malloc (/* size_t */);

Typedef char * pointer;/* generic pointer type (K & r c )*/

# Define null 0/* NULL pointer constant */

# Endif /*! Defined (_ stdc __)*/

# Define linearize (p)

# Ifndef stack_direction
# Define stack_direction 0/* Initially unknown */
# Endif

# If stack_direction! = 0

# Define stk_dir stack_direction/* known at compile-time */

# Else/* stack_direction = 0; need run-time probe */

Static int stack_dir = 0;/* 1 or-1 once known */
# Define stk_dir stack_dir

Static void
Find_stack_direction (/* void */)
{
Static char * ADDR = (char *) NULL;/* address
First "Dummy ",
Once known */
Auto char dummy;/* to get stack address */

If (ADDR = NULL)
{/* Initial entry */
ADDR = linearize (& dummy );

Find_stack_direction ();/* recurse once */
}
Else/* Second entry */
If (linearize (& dummy)> ADDR)/* crucial test */
Stack_dir = 1;/* stack grew upward */
Else
Stack_dir =-1;/* stack grew downward */
}

# Endif/* stack_direction = 0 */

/*
An "alloca Header" is used:
(A) chain together all alloca () Ed blocks;
(B) keep track of stack depth.

It is very important that sizeof (header) agree with malloc ()
Alignment chunk size. The following default shocould work okay.
*/

# Ifndef align_size
# Define align_size sizeof (double)
# Endif

Typedef Union HDR
{
Char align [align_size];/* to force sizeof (header )*/
Struct
{
Union HDR * Next;/* for chaining headers */
Char * deep;/* For stack depth measure */
} H;
} Header;

/*
Alloca (size) returns a pointer to at least "size" bytes
Storage which will be automatically reclaimed upon exit from
The procedure that called alloca (). Originally, this space
Was supposed to be taken from the current stack frame of
Caller, but that method cannot be made to work for some
Implementations of C, for example under gocould's utx/32.
*/

Pointer
Alloca (size_t size)
{
Static header * Last = NULL;/*-> last alloca header */
Auto char probe;/* probes stack depth :*/
Register char * depth = & probe;

# If stack_direction = 0
If (stk_dir = 0)/* unknown growth ction */
Find_stack_direction ();
# Endif

/* Reclaim garbage, defined as all alloca () Ed storage that
Was allocated from deeper in the stack than currently .*/

{
Register header * HP;/* traverses linked list */

For (HP = last; HP! = NULL ;)
If (stk_dir> 0 & HP-> H. Deep> depth
| Stk_dir <0 & HP-> H. Deep <depth
){
Register header * NP = hp-> H. Next;

Free (pointer) HP);/* collect garbage */

HP = NP;/*-> next header */
}
Else
Break;/* rest are not deeper */

Last = hp;/*-> last valid storage */
}

If (size = 0)
Return (pointer) NULL;/* No allocation required */

/* Allocate combined header + User Data Storage .*/

{
Register pointer newa = malloc (sizeof (header) + size );
/* Address of header */

If (newa = NULL)
# Ifdef return_null_on_failure
Return (pointer) NULL;
# Else
Abort ();/* abort () is traditional */
# Endif

(Header *) newa)-> H. Next = last;
(Header *) newa)-> H. Deep = depth;

Last = (header *) newa;

/* User storage begins just after header .*/

Return (pointer) (char *) newa + sizeof (header ));
}
}

# Endif /*! Defined (alloca )*/

/*************************************** **************************************/

When Haar detect is used, alloc is used for color conversion, so this section must be added.

This function is used here.
# Define cvstackalloc (size) cvalignptr (alloca (size) + cv_malloc_align), cv_malloc_align)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.