Rémi Denis-Courmont: > Le tiistaina 11. kesäkuuta 2024, 13.30.28 EEST Andreas Rheinhardt a écrit : >>> +static void h263_dct_unquantize_intra_c(int16_t *block, size_t nCoeffs, >>> + int qmul, int qadd) >>> +{ >>> + if (nCoeffs > 0) >> >> Great, a branch. > > Okay so you want sarcasms, have at it. > > If you had ever looked at optimised compilations, you would have noticed that > optimising compiler emits that branch implicitly in scenarii like the current > code to deal with that case, thus rewriting the code as > > if (nCoeffs > 0) { > do { ...; i++ } while (i < nCoeffs); > } > > This patch is simply making the branch explicit so we can share the otherwise > identical C code.
With the current code the initial branch can be avoided in the ac_pred case. > >> Why don't you just use a signed type? > > Just so you know, the correct type for positive sizes is size_t. > You know, a size, like *not* a stride. > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".