av1/encoder/encoder.c
// Returns 1 if the assigned width or height was <= 0.
Returns 1 if the assigned width or height was <= 0.
Returns 1 if the assigned width or height was < = 0 .
int av1_set_size_literal(AV1_COMP *cpi, int width, int height) {
  AV1_COMMON *cm = &cpi->common;
  const int num_planes = av1_num_planes(cm);
  av1_check_initial_width(cpi, cm->seq_params.use_highbitdepth,
                          cm->seq_params.subsampling_x,
                          cm->seq_params.subsampling_y);
  if (width <= 0 || height <= 0) return 1;
  cm->width = width;
  cm->height = height;
  if (cpi->initial_width && cpi->initial_height &&
      (cm->width > cpi->initial_width || cm->height > cpi->initial_height)) {
    av1_free_context_buffers(cm);
    av1_free_pc_tree(&cpi->td, num_planes);
    alloc_compressor_data(cpi);
    realloc_segmentation_maps(cpi);
    cpi->initial_width = cpi->initial_height = 0;
  }
  update_frame_size(cpi);
  return 0;
}
int av1_set_size_literal ( AV1_COMP * cpi , int width , int height ) { AV1_COMMON * cm = & cpi -> common ; const int num_planes = av1_num_planes ( cm ) ; av1_check_initial_width ( cpi , cm -> seq_params . use_highbitdepth , cm -> seq_params . subsampling_x , cm -> seq_params . subsampling_y ) ; if ( width <= 0 || height <= 0 ) return 1 ; cm -> width = width ; cm -> height = height ; if ( cpi -> initial_width && cpi -> initial_height && ( cm -> width > cpi -> initial_width || cm -> height > cpi -> initial_height ) ) { av1_free_context_buffers ( cm ) ; av1_free_pc_tree ( & cpi -> td , num_planes ) ; alloc_compressor_data ( cpi ) ; realloc_segmentation_maps ( cpi ) ; cpi -> initial_width = cpi -> initial_height = 0 ; } update_frame_size ( cpi ) ; return 0 ; }
Returns 1 if the assigned width or height was <= 0.
Returns 1 if the assigned width or height was < = 0 .