/* we assume pred is positive */
pred = FASTDIV((pred + (scale >> 1)), scale);
- if(encoding){
+ if (encoding) {
ret = level - pred;
- }else{
+ } else {
level += pred;
- ret= level;
- if(s->err_recognition&(AV_EF_BITSTREAM|AV_EF_AGGRESSIVE)){
- if(level<0){
- av_log(s->avctx, AV_LOG_ERROR, "dc<0 at %dx%d\n", s->mb_x, s->mb_y);
+ ret = level;
- if (s->err_recognition & AV_EF_BITSTREAM) {
++ if (s->err_recognition & (AV_EF_BITSTREAM | AV_EF_AGGRESSIVE)) {
+ if (level < 0) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "dc<0 at %dx%d\n", s->mb_x, s->mb_y);
return -1;
}
- if(level*scale > 2048 + scale){
- av_log(s->avctx, AV_LOG_ERROR, "dc overflow at %dx%d\n", s->mb_x, s->mb_y);
+ if (level * scale > 2048 + scale) {
+ av_log(s->avctx, AV_LOG_ERROR,
+ "dc overflow at %dx%d\n", s->mb_x, s->mb_y);
return -1;
}
}