CONFIG_OPTFLOW_REFINEMENT: Question about allowed range for opfl_refine_type
How was the issue detected?
What version / commit were you testing with?
What steps will reproduce the problem?
We are making verification streams for CONFIG_OPTFLOW_REFINEMENT, but have a question about the intended behaviour.
The frame header is read in read_uncompressed_header:
#if CONFIG_OPTFLOW_REFINEMENT
if (cm->seq_params.enable_opfl_refine == AOM_OPFL_REFINE_AUTO) {
features->opfl_refine_type = aom_rb_read_literal(rb, 2);
} else {
features->opfl_refine_type = cm->seq_params.enable_opfl_refine;
}
#endif // CONFIG_OPTFLOW_REFINEMENT
If enable_opfl_refine is equal to 3 (a value defined in aom_encoder.h but used in the decoder), then the frame level field features->opfl_refine_type is read by taking 2 bits from the bitstream. This allows values of 0/1/2/3 to be sent. The first 3 make sense and correspond to values in the OPTFLOW_REFINE_TYPE enum defined in common/av1_common_int.h.
Question
What is the intended behaviour if a value of 3 is read for features->opfl_refine_type?
Perhaps this should trigger an error in the reference decoder?