Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions av2/av2_cx_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -3621,7 +3621,6 @@ static avm_codec_err_t ctrl_copy_reference(avm_codec_alg_priv_t *ctx,
AV2_COMMON *cm = &ctx->cpi->common;
avm_internal_error(&cm->error, AVM_CODEC_INVALID_PARAM,
"Incorrect buffer dimensions");
return cm->error.error_code;
}
image2yuvconfig(&frame->img, &sd);
av2_copy_reference_enc(ctx->cpi, frame->idx, &sd);
Expand Down Expand Up @@ -3678,7 +3677,6 @@ static avm_codec_err_t ctrl_copy_new_frame_image(avm_codec_alg_priv_t *ctx,
AV2_COMMON *cm = &ctx->cpi->common;
avm_internal_error(&cm->error, AVM_CODEC_INVALID_PARAM,
"Incorrect buffer dimensions");
return cm->error.error_code;
}
image2yuvconfig(new_img, &sd);
return av2_copy_new_frame_enc(&ctx->cpi->common, &new_frame, &sd);
Expand Down
2 changes: 0 additions & 2 deletions av2/av2_dx_iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,6 @@ static avm_codec_err_t ctrl_copy_reference(avm_codec_alg_priv_t *ctx,
AV2_COMMON *cm = &frame_worker_data->pbi->common;
avm_internal_error(&cm->error, AVM_CODEC_INVALID_PARAM,
"Incorrect buffer dimensions");
return cm->error.error_code;
}
image2yuvconfig(&frame->img, &sd);
return av2_copy_reference_dec(frame_worker_data->pbi, frame->idx, &sd);
Expand Down Expand Up @@ -1393,7 +1392,6 @@ static avm_codec_err_t ctrl_copy_new_frame_image(avm_codec_alg_priv_t *ctx,
AV2_COMMON *cm = &frame_worker_data->pbi->common;
avm_internal_error(&cm->error, AVM_CODEC_INVALID_PARAM,
"Incorrect buffer dimensions");
return cm->error.error_code;
}
image2yuvconfig(img, &sd);
return av2_copy_new_frame_dec(&frame_worker_data->pbi->common, &new_frame,
Expand Down
3 changes: 0 additions & 3 deletions av2/common/ccso.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,11 @@ void av2_apply_ccso_filter_for_row(AV2_COMMON *cm, MACROBLOCKD *xd,
avm_internal_error(
&cm->error, AVM_CODEC_ERROR,
"Invalid BRU activity in CCSO: only active SB can be filtered");
return;
}
if (cm->bridge_frame_info.is_bridge_frame) {
avm_internal_error(
&cm->error, AVM_CODEC_ERROR,
"Invalid Bridge frame activity in CCSO: can not be filtered");
return;
}

if (cm->features.has_lossless_segment) {
Expand Down Expand Up @@ -533,7 +531,6 @@ void apply_ccso_filter(AV2_COMMON *cm, MACROBLOCKD *xd, int plane,
avm_internal_error(&cm->error, AVM_CODEC_ERROR,
"Invalid BRU activity in CCSO: only "
"active SB can be filtered");
return;
}
if (cm->features.has_lossless_segment) {
ccso_filter_block_hbd_wo_buf_4x4_c(
Expand Down
1 change: 0 additions & 1 deletion av2/common/reconinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1972,7 +1972,6 @@ void av2_build_one_bawp_inter_predictor(
avm_internal_error(
(struct avm_internal_error_info *)&cm->error, AVM_CODEC_ERROR,
"Inter BAWP template cannot outside the valid reference range");
return;
} else {
uint16_t *recon_buf = xd->plane[plane].dst.buf;
int recon_stride = xd->plane[plane].dst.stride;
Expand Down
2 changes: 0 additions & 2 deletions av2/common/restoration.c
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,6 @@ static void pc_wiener_stripe_highbd(const RestorationUnitInfo *rui,
avm_internal_error(
rui->error, AVM_CODEC_ERROR,
"Invalid BRU activity in LR: only active SB can be filtered");
return;
}
MB_MODE_INFO **mbmi_ptr_procunit = rui->mbmi_ptr + mi_offset_x;

Expand Down Expand Up @@ -1592,7 +1591,6 @@ static void wiener_nsfilter_stripe_highbd(const RestorationUnitInfo *rui,
avm_internal_error(
rui->error, AVM_CODEC_ERROR,
"Invalid BRU activity in LR: only active SB can be filtered");
return;
}
MB_MODE_INFO **mbmi_ptr_procunit = rui->mbmi_ptr + mi_offset_x;
apply_wienerns_class_id_highbd(
Expand Down
8 changes: 0 additions & 8 deletions av2/decoder/decodeframe.c
Original file line number Diff line number Diff line change
Expand Up @@ -2676,7 +2676,6 @@ static AVM_INLINE void decode_restoration_mode(AV2_COMMON *cm,
avm_internal_error(&cm->error, AVM_CODEC_ERROR,
"Invalid RU size, RU size shall not be smaller than "
"stripe height which is 64 for 422 format");
return;
}
}
cm->rst_info[2].restoration_unit_size =
Expand All @@ -2697,7 +2696,6 @@ static AVM_INLINE void decode_restoration_mode(AV2_COMMON *cm,
&cm->error, AVM_CODEC_ERROR,
"Invalid RU size, RU size shall be an integer divisor of tiles "
"width or height, except right-most and bottom tiles");
return;
}
}

Expand All @@ -2710,7 +2708,6 @@ static AVM_INLINE void decode_restoration_mode(AV2_COMMON *cm,
&cm->error, AVM_CODEC_ERROR,
"Invalid RU size, RU size shall be an integer divisor of tiles "
"width or height, except right-most and bottom tiles");
return;
}
}

Expand Down Expand Up @@ -7223,7 +7220,6 @@ static int read_show_existing_frame(AV2Decoder *pbi, bool is_regular_obu,
avm_internal_error(&cm->error, AVM_CODEC_UNSUP_BITSTREAM,
"the reference frame should be a hidden frame when "
"derive_sef_order_hint is true");
return 0;
}
current_frame->order_hint = cm->cur_frame->order_hint =
frame_to_show->order_hint;
Expand Down Expand Up @@ -7748,7 +7744,6 @@ static void handle_sequence_header(AV2Decoder *pbi, OBU_TYPE obu_type,
"Sequence Header changed at OBU_OPEN_LOOP_KEY when "
"pbi->random_accessed %d",
pbi->random_accessed);
return;
}
}

Expand Down Expand Up @@ -9527,20 +9522,17 @@ static int32_t read_tile_indices_in_tilegroup(AV2Decoder *pbi,
avm_internal_error(&cm->error, AVM_CODEC_CORRUPT_FRAME,
"tg_start (%d) must be equal to %d", *start_tile,
pbi->next_start_tile);
return -1;
}
if (*start_tile > *end_tile) {
avm_internal_error(
&cm->error, AVM_CODEC_CORRUPT_FRAME,
"tg_end (%d) must be greater than or equal to tg_start (%d)", *end_tile,
*start_tile);
return -1;
}
if (*end_tile >= num_tiles) {
avm_internal_error(&cm->error, AVM_CODEC_CORRUPT_FRAME,
"tg_end (%d) must be less than NumTiles (%d)", *end_tile,
num_tiles);
return -1;
}
pbi->next_start_tile = (*end_tile == num_tiles - 1) ? 0 : *end_tile + 1;

Expand Down
2 changes: 0 additions & 2 deletions av2/decoder/decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,6 @@ avm_codec_err_t av2_copy_reference_dec(AV2Decoder *pbi, int idx,
const YV12_BUFFER_CONFIG *const cfg = get_ref_frame(cm, idx);
if (cfg == NULL) {
avm_internal_error(&cm->error, AVM_CODEC_ERROR, "No reference frame");
return AVM_CODEC_ERROR;
}
if (!equal_dimensions(cfg, sd))
avm_internal_error(&cm->error, AVM_CODEC_ERROR,
Expand Down Expand Up @@ -532,7 +531,6 @@ avm_codec_err_t av2_set_reference_dec(AV2_COMMON *cm, int idx,

if (ref_buf == NULL) {
avm_internal_error(&cm->error, AVM_CODEC_ERROR, "No reference frame");
return AVM_CODEC_ERROR;
}

if (!use_external_ref) {
Expand Down
2 changes: 0 additions & 2 deletions av2/decoder/obu_buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ uint32_t av2_read_buffer_removal_timing_obu(struct AV2Decoder *pbi,
"No matching operating point set OBU found for br_ops_id = %d. "
"Bitstream conformance requires an OPS OBU with ops_id = %d.",
brt_info->br_ops_id, brt_info->br_ops_id);
return 0;
}
// It is a requirement of bitstream conformance that br_ops_cnt[br_ops_id]
// when present shall be equal to the value of ops_cnt of the corresponding
Expand All @@ -69,7 +68,6 @@ uint32_t av2_read_buffer_removal_timing_obu(struct AV2Decoder *pbi,
"OBU (%d) and Operating Point set OBU (%d).",
brt_info->br_ops_cnt[brt_info->br_ops_id],
pbi->ops_list[xlayer_id][brt_info->br_ops_id].ops_cnt);
return 0;
}
// decoder model
for (int i = 0; i < brt_info->br_ops_cnt[brt_info->br_ops_id]; i++) {
Expand Down
4 changes: 0 additions & 4 deletions av2/encoder/bitstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -6828,7 +6828,6 @@ size_t av2_write_banding_hints_metadata(
&payload_size) != 0) {
avm_internal_error(&cm->error, AVM_CODEC_ERROR,
"Error encoding banding hints metadata");
return 0;
}

avm_metadata_t *metadata =
Expand All @@ -6837,7 +6836,6 @@ size_t av2_write_banding_hints_metadata(
if (!metadata) {
avm_internal_error(&cm->error, AVM_CODEC_MEM_ERROR,
"Error allocating banding hints metadata");
return 0;
}

// Set up metadata fields
Expand Down Expand Up @@ -6907,7 +6905,6 @@ size_t av2_write_metadata_user_data_unregistered(AV2_COMP *const cpi,
avm_internal_error(
&cpi->common.error, AVM_CODEC_ERROR,
"User data unregistered payload must be at least 16 bytes (UUID)");
return 0;
}

avm_metadata_t *metadata =
Expand All @@ -6916,7 +6913,6 @@ size_t av2_write_metadata_user_data_unregistered(AV2_COMP *const cpi,
if (!metadata) {
avm_internal_error(&cpi->common.error, AVM_CODEC_MEM_ERROR,
"Error allocating user data unregistered metadata");
return 0;
}
size_t total_bytes_written = 0;
OBU_TYPE obu_type = cpi->oxcf.tool_cfg.use_short_metadata
Expand Down
3 changes: 0 additions & 3 deletions av2/encoder/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -5245,7 +5245,6 @@ int av2_encode(AV2_COMP *const cpi, uint8_t *const dest,
if (cm->bridge_frame_info.bridge_frame_ref_idx == INVALID_IDX) {
avm_internal_error(&cm->error, AVM_CODEC_CORRUPT_FRAME,
"Cannot find bridge frame reference frame");
return AVM_CODEC_ERROR;
}
cm->bridge_frame_info.bridge_frame_overwrite_flag = 1;
cm->current_frame.refresh_frame_flags =
Expand Down Expand Up @@ -5291,15 +5290,13 @@ static int apply_denoise_2d(AV2_COMP *cpi, YV12_BUFFER_CONFIG *sd,
if (!cpi->denoise_and_model) {
avm_internal_error(&cm->error, AVM_CODEC_MEM_ERROR,
"Error allocating denoise and model");
return -1;
}
}
if (!cpi->film_grain_table) {
cpi->film_grain_table = avm_malloc(sizeof(*cpi->film_grain_table));
if (!cpi->film_grain_table) {
avm_internal_error(&cm->error, AVM_CODEC_MEM_ERROR,
"Error allocating grain table");
return -1;
}
memset(cpi->film_grain_table, 0, sizeof(*cpi->film_grain_table));
}
Expand Down
13 changes: 0 additions & 13 deletions avm_dsp/grain_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ static void grain_table_entry_read(FILE *file,
if (num_read != 5) {
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read entry header. Read %d != 5", num_read);
return;
}
if (pars->update_parameters) {
num_read = fscanf(
Expand All @@ -63,45 +62,38 @@ static void grain_table_entry_read(FILE *file,
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read entry params. Read %d != 13",
num_read);
return;
}
if (!fscanf(file, "\tsY %d ", &pars->fgm_points[0])) {
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read num y points");
return;
}
for (int i = 0; i < pars->fgm_points[0]; ++i) {
if (2 != fscanf(file, "%d %d", &pars->fgm_scaling_points_0[i][0],
&pars->fgm_scaling_points_0[i][1])) {
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read y scaling points");
return;
}
}
if (!fscanf(file, "\n\tsCb %d", &pars->fgm_points[1])) {
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read num cb points");
return;
}
for (int i = 0; i < pars->fgm_points[1]; ++i) {
if (2 != fscanf(file, "%d %d", &pars->fgm_scaling_points_1[i][0],
&pars->fgm_scaling_points_1[i][1])) {
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read cb scaling points");
return;
}
}
if (!fscanf(file, "\n\tsCr %d", &pars->fgm_points[2])) {
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read num cr points");
return;
}
for (int i = 0; i < pars->fgm_points[2]; ++i) {
if (2 != fscanf(file, "%d %d", &pars->fgm_scaling_points_2[i][0],
&pars->fgm_scaling_points_2[i][1])) {
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read cr scaling points");
return;
}
}

Expand All @@ -111,23 +103,20 @@ static void grain_table_entry_read(FILE *file,
if (1 != fscanf(file, "%d", &pars->ar_coeffs_y[i])) {
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read Y coeffs");
return;
}
}
fscanf(file, "\n\tcCb");
for (int i = 0; i <= n; ++i) {
if (1 != fscanf(file, "%d", &pars->ar_coeffs_cb[i])) {
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read Cb coeffs");
return;
}
}
fscanf(file, "\n\tcCr");
for (int i = 0; i <= n; ++i) {
if (1 != fscanf(file, "%d", &pars->ar_coeffs_cr[i])) {
avm_internal_error(error_info, AVM_CODEC_ERROR,
"Unable to read Cr coeffs");
return;
}
}
fscanf(file, "\n");
Expand Down Expand Up @@ -262,7 +251,6 @@ avm_codec_err_t avm_film_grain_table_read(
if (!file) {
avm_internal_error(error_info, AVM_CODEC_ERROR, "Unable to open %s",
filename);
return error_info->error_code;
}
error_info->error_code = AVM_CODEC_OK;

Expand Down Expand Up @@ -304,7 +292,6 @@ avm_codec_err_t avm_film_grain_table_write(
if (!file) {
avm_internal_error(error_info, AVM_CODEC_ERROR, "Unable to open file %s",
filename);
return error_info->error_code;
}

if (!fwrite(kFileMagic, 8, 1, file)) {
Expand Down
Loading