avcodec/mjpegenc: use av_log2_16bit() in encode_block()