android/ringlibsdl/project/jni/smpeg2-2.0.0/video/video.cpp
PictImage* NewPictImage( VidStream* vid_stream, int w, int h )
{
    PictImage* pi;

    /* Allocate memory space for pi structure. */

    pi = (PictImage *) malloc(sizeof(PictImage));

    /* Create a YV12 image (Y + V + U) */
    pi->image = (unsigned char *) malloc(w*h*12/8);
    pi->luminance = (unsigned char *)pi->image;
    pi->Cr = pi->luminance + (w*h);
    pi->Cb = pi->luminance + (w*h) + (w*h)/4;
  
    /* Alloc space for filter info */
    pi->mb_qscale = (unsigned short int *) malloc(vid_stream->mb_width * vid_stream->mb_height * sizeof(unsigned int));

    /* Reset locked flag. */
  
    pi->locked = 0;

    /* Return pointer to pi structure. */

    return pi;
}
/*
 *--------------------------------------------------------------
 *
 * NewPictImage --
 *
 *    Allocates and initializes a PictImage structure.
 *      The width and height of the image space are passed in
 *      as parameters.
 *
 * Results:
 *    A pointer to the new PictImage structure.
 *
 * Side effects:
 *    None.
 *
 *--------------------------------------------------------------
 */
NewPictImage
Allocates and initializes a PictImage structure.
The width and height of the image space are passed in
as parameters.

A pointer to the new PictImage structure.

Side effects:
None.
NewPictImage Allocates and initializes a PictImage structure . The width and height of the image space are passed in as parameters . A pointer to the new PictImage structure . Side effects : None .
PictImage* NewPictImage( VidStream* vid_stream, int w, int h )
{
    PictImage* pi;
    pi = (PictImage *) malloc(sizeof(PictImage));
    pi->image = (unsigned char *) malloc(w*h*12/8);
    pi->luminance = (unsigned char *)pi->image;
    pi->Cr = pi->luminance + (w*h);
    pi->Cb = pi->luminance + (w*h) + (w*h)/4;
    pi->mb_qscale = (unsigned short int *) malloc(vid_stream->mb_width * vid_stream->mb_height * sizeof(unsigned int));
    pi->locked = 0;
    return pi;
}
PictImage * NewPictImage ( VidStream * vid_stream , int w , int h ) { PictImage * pi ; pi = ( PictImage * ) malloc ( sizeof ( PictImage ) ) ; pi -> image = ( unsigned char * ) malloc ( w * h * 12 / 8 ) ; pi -> luminance = ( unsigned char * ) pi -> image ; pi -> Cr = pi -> luminance + ( w * h ) ; pi -> Cb = pi -> luminance + ( w * h ) + ( w * h ) / 4 ; pi -> mb_qscale = ( unsigned short int * ) malloc ( vid_stream -> mb_width * vid_stream -> mb_height * sizeof ( unsigned int ) ) ; pi -> locked = 0 ; return pi ; }
NewPictImage
    Allocates and initializes a PictImage structure.
NewPictImage Allocates and initializes a PictImage structure .
/* Allocate memory space for pi structure. */ /* Create a YV12 image (Y + V + U) */ /* Alloc space for filter info */ /* Reset locked flag. */ /* Return pointer to pi structure. */