All pastes #784691 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-11-19 20:18 UTC
rendered paste body
static void                                                                                           |                          "Error (Yuv420CreateFrame): unable to allocate memory\n");
encode (void)                                                                                         |                        return NULL;
{                                                                                                     |                        }
  int          y_cols;                                                                                |
  int          y_rows;                                                                                |                }
  double       fps;                                                                                   |
  int          ret;                                                                                   |        else
  Yuv420Frame *frame;                                                                                 |                frame->buffer = buffer;
  int         *estimates, *y_est, *u_est, *v_est;                                                     |
  int         *residuals, *y_res, *u_res, *v_res;                                                     |        if(!(frame->y = (uChar **)malloc(frame->yRows  * sizeof(uChar *))) ||
                                                                                                      |           !(frame->u = (uChar **)malloc(frame->uvRows * sizeof(uChar *))) ||
  ret = Yuv420GetHeaderFromFile (src_fp, &y_cols, &y_rows, &fps);                                     |           !(frame->v = (uChar **)malloc(frame->uvRows * sizeof(uChar *))))
  if (ret != 0)                                                                                       |                {
    error (EXIT_FAILURE, 0, "the input file isn't recognized");                                       |                fprintf(stderr,
                                                                                                      |                  "Error (Yuv420CreateFrame): unable to allocate memory\n");
  frame = Yuv420CreateFrame (y_rows, y_cols, NULL);                                                   |                return NULL;
  if (frame == NULL)                                                                                  |                }
    error (EXIT_FAILURE, 0, "Yuv420CreateFrame");                                                     |
                                                                                                      |        for(row = 0 ; row < frame->yRows ; row++)
  Yuv420WriteFileHeader (dest_fp, ycols, y_rows, fps);                                                |                frame->y[row] = frame->buffer + row * frame->yCols;
                                                                                                      |
  while (Yuv420LoadFrame (frame, src_fp))                                                             |        for(row = 0 ; row < frame->uvRows ; row++)
    {                                                                                                 |                {
                                                                                                      |                frame->u[row] = frame->buffer + frame->yRows *
    }                                                                                                 |                  frame->yCols + row * frame->uvCols;
}                                                                                                     |                frame->v[row] = frame->buffer + frame->yRows *